-4

Can someone tell me the difference between these 3 versions, specifically what is -s and what's the difference between the 2nd and 3rd versions?

useradd -g vmail -u 5000 vmail -d /var/vmail -m 
useradd -g vmail -u 5000 vmail -d /var/vmail -m -s /usr/sbin/nologin
useradd -g vmail -u 5000 vmail -d /var/vmail -m -s /bin/false
sameold
  • 993
  • 3
  • 11
  • 20

1 Answers1

3
       -s, --shell SHELL
      The name of the user’s login shell. The default is to leave this field blank, which causes the system to select the default login shell.

The difference between the three above are the 'shell' the system will run after the user logs in.

Provided your system has man pages installed you can find this info by doing 'man adduser'. You can find out what the shells do by looking at their man pages, 'man nologin' and 'man false'.

nologin displays a message to the user (if you have one configured), false just exits.