04-15-2011
85,
7
Join Date: Jan 2011
Last Activity: 26 October 2011, 4:48 PM EDT
Posts: 85
Thanks Given: 7
Thanked 7 Times in 7 Posts
A simple cat /etc/passwd | wc -l will give the total system users.
However, if are you trying to separate actual user's from system usernames?
You will need to test $UID's above the base user ID number, depending on your distro.
In my Fedora 13 system the base user ID is 500, and in my ubuntu 10.04 system, the base user ID is 1000.