Pages

Thursday, January 23, 2014

How to find the number of user accounts via shell

There is no control panel installed on the server. So, how can the total number of user accounts on the system be determined?

Use the following command to find the total number of accounts on the system :
cat /etc/passwd | wc -l
Note : This will also include system accounts like root, mail etc.
To list all the accounts on the system then use the following :
cat /etc/passwd | cut -d”:” -f1

No comments:

Post a Comment