Skip to content

Instantly share code, notes, and snippets.

@freen
Created January 29, 2016 12:43
Show Gist options
  • Save freen/7f306195983e1bc8f7a2 to your computer and use it in GitHub Desktop.
Save freen/7f306195983e1bc8f7a2 to your computer and use it in GitHub Desktop.
Even though SHELL=/bin/bash in /etc/default/useradd, useradd fails to set the default shell as bash for new users.
vagrant@local:~$ cat /etc/default/useradd | grep SHELL
# The SHELL variable specifies the default login shell on your
SHELL=/bin/bash
vagrant@local:~$ sudo useradd -D
GROUP=100
HOME=/home
INACTIVE=-1
EXPIRE=
SHELL=/bin/bash
SKEL=/etc/skel
CREATE_MAIL_SPOOL=no
vagrant@local:~$ sudo useradd testing123
vagrant@local:~$ sudo tail -n 1 /etc/passwd
testing123:x:2013:2013::/home/testing123:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment