Search This Blog

Linux: List of all user

Run command as superuser:
awk -F:  '{ print $1 }'  /etc/passwd


More...
Check user UID minimum on system by useradd command:
grep "^UID_MIN" /etc/login.defs
in my systemoutput is 500

Check user UID maximum on system by useradd command:
grep "^UID_MAX" /etc/login.defs
in my system output is 6000


So, we can check user list by:
awk -F':' -v "min=500" -v "max=60000" '{ if ( $3 >= min && $3 <= max ) print $0}' /etc/passwd 
  

Example output in my virtualbox CentOS:

share and comment


Related Posts :