March 13, 2018

Directory /etc/default/useradd

Directory /etc/default/useradd

❑ useradd(/etc/default/useradd) : This is the file to set the default values of passwd and shadow that is used in creating an account.
* Useradd command references /etc/login.defs(Link) and /etc/default/useradd when creates an user account.

❑ You can modify the useradd file directly or use useradd command to modify the file.
* useradd -D [Option] [Argument]

OptionDescription
-bSet the default value of the home directory field in /etc/passwd.
-eSet the default value of the expire field in /etc/shadow.
-fSet the default value of the inactive field in /etc/shadow.
-gSet the default value of the GID field in /etc/passwd.
* If "CREATE_HOME" in /etc/login.defs is "no", this value is used.
-sSet the default value of the shell field in /etc/passwd.


Check environment
O      S Ubuntu 15.10 (64bit) CPU Intel i7-4710MQ 2.50GHz
SHELL GNU bash (4.3.42) RAM 1 GB