0

I am learning server stuff and I have one chapter about /etc/passwd

i have this:

root:x:0:0:root:/root:/bin/bash
bin:x:2:2:bin:/bin:/bin/sh
sys:x:3:3:sys:/dev:/bin/sh
sync:x:4:65534:sync:/bin:/bin/sync
games:x:5:60:games:/usr/games:/bin/sh
man:x:6:12:man:/var/cache/man:/bin/sh
lp:x:7:7:lp:/var/spool/lpd:/bin/sh
mail:x:8:8:mail:/var/mail:/bin/sh
news:x:9:9:news:/var/spool/news:/bin/sh
uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
proxy:x:13:13:proxy:/bin:/bin/sh
...some otehrs...
irc:x:39:39:ircd:/var/run/ircd:/usr/sbin/nologin
whoopsie:x:105:114::/nonexistent:/bin/false
vmail:x:150:8:Virtual maildir:/var/zpanel/vmail:/sbin/nologin

I want to know what is the difference between /bin/false - /sbin/nologin and /usr/sbin/nologin

1
  • S you are learning it seems appropriate to point you at the documentation man man, man false and man nologin
    – user9517
    Dec 16, 2013 at 20:25

1 Answer 1

0

From the standpoint of the /etc/passwd file, there is no practical difference. The detailed difference is that nologin is intended as a shell that (optionally) prints a message tot he terminal and then exits, effectively refusing a login. The false binary, on the other hand, is intended to be a command that returns a status code indicating an error. It is not intended as a shell, even though it can be used as one.

Not the answer you're looking for? Browse other questions tagged .