This is a small how to on listing all the users in a box. This is bit tricky but if you give a thought you will realize that user info is in passwd file, so if you can grep the first field then its done.
The passwd file content for your reference
gdm:x:113:120:Gnome Display Manager:/var/lib/gdm:/bin/false
surendra:x:1000:1000:surendra,,,:/home/surendra:/bin/bash
mediatomb:x:114:123:MediaTomb Server,,,:/var/lib/mediatomb:/usr/sbin/nologin
haldaemon:x:115:124:Hardware abstraction layer,,,:/var/run/hald:/bin/false
ntop:x:116:126::/var/lib/ntop:/bin/false
How to get only user values?
Use cut command to cut the fields..… Continue Reading







