5 replies
by vinnyd
There is no built-in command to count the number of users accounts.
There is a command "who" that can tell you how many accounts are logged in.
In most versions on Unix in the /etc folder you will find the passwd file.
You can make a copy of it and then use the vi editor to delete all the system accounts.
Then go to the botton of the file.
use the vi command :nu
That will display the line number of the last line showing how many user accounts are configured.
by maggiebo
by gazzb
Use the word count command on the /etc/passwd file :-
wc -l /etc/passwd
This will give you a numeric result including the system accounts. Just deduct the number of system accounts from this number (usually about 10)
by maggiebo
by maggiebo
This discussion is closed to new replies.
Trending Linux posts
Sort by Trending