Single blog// see post details
List User Accounts
This is a fairly simple script, but immensely useful. Listing user accounts can be very important. However, there are commonly multiple lists of user accounts. One of them is “System users”, while the other is “cpanel users”. Here’s how to list system users:
cat /etc/passwd | grep /home | cut -d: -f1
And here’s how to list cPanel users:
You could take this a step further and get even more information from the cPanel accounts. The users folder used to list accounts within /var/cpanel actually contains a list of files. Each file is titled after the users registered with cPanel. Inside those files is useful information like DNS data, website data, IP information, etc. By using grep, you could undoubtedly pull any information you might need from said files.