On Thursday, April 14, 2016 09:03:08 AM Neil Bothwick wrote:
> On Thu, 14 Apr 2016 02:58:09 -0500, Dale wrote:
> > While at it, what is a command that lists all the users that are set up
> > on a system?  I tried a couple things but only found one that lists who
> > is currently logged in.  I would like them all listed.
> 
> cat /etc/passwd ;-)
> 
> Or if you want to get clever and give just a list of usernames
> 
> awk -F: '{print $1}' /etc/passwd

This doesn't work when using LDAP authentication or similar:

nas ~ # cat /etc/passwd | grep joost
nas ~ # getent passwd | grep joost
joost:x:1000:1000:System User:/home/joost:/bin/bash
nas ~ # 

--
Joost

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to