Profile

Cover photo
bodhi zazen
59 followers|2,637 views
AboutPostsPhotosVideos

Stream

bodhi zazen

commented on a post on Blogger.
Shared publicly  - 
 
I see this is an old post, but ... awk can do all this for you assuming you go with the default min uid of 1,000 (which is very standard these days) . `awk -F: '!/nobody/ { if ($3 >=1000) { print $1 }}' /etc/passwd`

The !/nobody/ filters out 'nobody' users .

And with complex commands, best to use a function

so ....

lsusers () { awk -F: '!/nobody/ { if ($3 >=1000) { print $1 }}' /etc/passwd; }
alias lsusers='getent passwd | tr ":" " " | awk "\$3 >= $(grep UID_MIN /etc/login.defs | cut -d " " -f 2) { print \$1 }" | sort'   Above command to list non-system users. It should be portable though won't work on systems wit...
1
Add a comment...
Have him in circles
59 people
Donald Allison's profile photo
krishn rock's profile photo
Chuck McGuire's profile photo
Simon Rosenaa's profile photo
isabelle duchatelle's profile photo
DJ TeKKnaTroN's profile photo
Josh Mint (Maddeth)'s profile photo
Isabelle Duchatelle's profile photo
Scott Sewell (Hotvle Haco)'s profile photo

bodhi zazen

Discussion  - 
 
Hello Fluxbox =)
2
Add a comment...
People
Have him in circles
59 people
Donald Allison's profile photo
krishn rock's profile photo
Chuck McGuire's profile photo
Simon Rosenaa's profile photo
isabelle duchatelle's profile photo
DJ TeKKnaTroN's profile photo
Josh Mint (Maddeth)'s profile photo
Isabelle Duchatelle's profile photo
Scott Sewell (Hotvle Haco)'s profile photo
Basic Information
Gender
Male
Story
Tagline
bodhi.zazen
Apps with Google+ Sign-in