Listing users having UID above 1000 and not UID 65534 from your /etc/passwd file

Hi,

In Fedora unprivileged user id starts from 10000 and id 65534 represents user nfsnobody so want to negate UID of nfsnodby i need unprivileged user list

so here we go…

awk -v LIMIT=1000 -F: ‘{if (($3>=LIMIT) && ($3!=65534)) print $1}’ /etc/passwd

Little explanation for options used with awk

used LIMIT varible on column 3($3) but printed coulmn 1 ($1) as usernames are in 1st column
-v assigning values to a variable

-F: field separator