WHM: How to search for accounts
If you watched the previous tutorial, you should have seen the advanced account search tool in WHM. This tool is accessible on the List Accounts page as well as on its own page.
1) Start by navigating to Account Information.
2) Then, click Search Accounts.
This search form is exactly the same as the one on the List Accounts page. In fact, any results from searches made here will be displayed using that system.
The default search query is to be performed on the domains of your accounts, matching all domain names ending with .net. Up to 30 accounts will be displayed.
This search tool operates using regular expressions, if you’re at all familiar with those. Regular expressions are far too complex to describe here in detail, but we will give you a few helpful hints.
The backslash preceeding the period in .net needs to be there because a period in regular expressions is a wildcard — it can represent any character, not just a period. Placing a backslash in front of a special character such as the period will disable its special functionality.
A dollar sign $ in regular expressions signifies the end of a string of text. Since a top-level domain such as .net always comes at the end of the domain name, that’s why a dollar sign is used here.
Similarly, a caret ^ can be used to signify the start of a string. So, we could search for all accounts with an IP address beginning with 12.202 using the following regular expression:^12.202
This may seem overly complicated, but regular expressions can be a very powerful tool, and would be especially useful if ever you have hundreds of accounts on this server.
You can always just treat this form as the search forms you’re used to. A standard search query is a valid regular expression, after all.
Now… let’s perform a search.
3) First, choose a Selector from the list. This controls which setting of the accounts will be searched through.
4) In Match, enter a value that will be used to search through the accounts’ selectors.
5) Change the number of accounts per page, if you want.
We’ve successfully performed a search for all accounts whose owner contains the phrase “root”.
7) Click the Forget Search link to revert to the standard account list.
As you can see here, the identical form is available at the bottom of the page.
This completes the tutorial. You now know how to search for accounts on your WHM server, and you may have learned a little bit about regular expressions in the process.