Differences
This shows you the differences between two versions of the page.
— | useradd [2015/08/25 23:08] (current) – created - external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== useradd ====== | ||
+ | * [[getent]] | ||
+ | * [[usermod]] | ||
+ | * vipw | ||
+ | |||
+ | == Create a new user, with a home == | ||
+ | |||
+ | * **-g** Primary group of '' | ||
+ | * **-m** Create the user's home directory | ||
+ | * **-N** Do not create a group with the same name as the user | ||
+ | * **-s** login shell of the new account | ||
+ | |||
+ | < | ||
+ | useradd -g users -m -N -s /bin/bash < | ||
+ | </ | ||
+ | |||
+ | == Create a new cloned user == | ||
+ | |||
+ | < | ||
+ | useradd -g primary-group -o -u `id -u primary-user` username | ||
+ | </ |