[TriLUG] possible awk/grep question
Kevin Hunter
hunteke at earlham.edu
Mon Dec 31 00:49:00 EST 2007
At 11:53p -0500 on 30 Dec 2007, Magnus wrote:
>> I need to find all "users" on a machine.
>
> getent passwd | cut -d \: -f 1
Rather than just those in group 100, or with a with a numeric ID above
some threshold, you might also consider all accounts that have a login
other than false or nologon:
$ getent passwd | egrep -v ":/bin/false$" | cut -d : -f 1,5
Should give you the username, and associated contact info of all those
who could ostensibly log in.
Kevin
More information about the TriLUG
mailing list