How can I list all human users that I've created? I've tried cat /etc/passwd and it just lists a lot of stuff.
Tell me more
×
Ask Ubuntu is a question and answer site for
Ubuntu users and developers. It's 100% free, no registration required.
|
|
|
Human users have UIDs starting at 1000, so you can use that fact to filter out the non-humans:
This cuts the first (username) and third (UID) colon-delimited fields from If you have more than nine thousand users on your system, this will fail - but it's necessary to restrict the result to 4-digit UIDs in order not to catch |
|||
|
|
