Sunday, October 24, 2010

List users or groups with IDs of 500 or greater

Listing all the users created by System administrator can be done with the powerful "awk" command...

#awk -F: '($3>=500)  && ($3!=65534)' /etc/passwd

Here the "awk" command will check the 3rd filed(uid) in the /etc/passwd file
and it will list uids which are equal and greater than 500. And here we are
mentioning not to list uid 65534, because this is nfs account account created
by system when we have installed nfs pakage.....