and...@msu.edu (STeve Andre'), 2017.05.06 (Sat) 20:37 (CEST): > On 05/06/17 14:27, Luke Small wrote: > > Is there a way to determine all users on a system that the users command > > doesn't seem to show? like _x11 and _ntpd
users(1) - list current users I'd try ps(1) and get all active users from there. If you are after *all* users (inactive ones as well) you could use "getent(1) passwd" and parse from there. Marcus > What's a user? > > Maybe you want to look at /etc/passwd. The first four lines are > > root:*:0:0:Charlie &:/root:/bin/ksh > daemon:*:1:1:The devil himself:/root:/sbin/nologin > operator:*:2:5:System &:/operator:/sbin/nologin > bin:*:3:7:Binaries Commands and Source:/:/sbin/nologin > > You can parse that with awk and do stuff. Read about passwd(5) to > understand the format. A login shell of /sbin/nologin means > it isn't interactive. That might get you started? > > --STeve Andre' > > > !DSPAM:590e28ea17913841584367! >