Name
useradd [options] username — shadow-utils
Synopsis
/usr/sbin stdin stdout - file -- opt --help --versionThe useradd command lets the superuser create a new user account.
# useradd smith
Its defaults are not very useful (run useradd -D to see them), so be sure to supply all desired options. For example:
# useradd -d /home/smith -s /bin/bash -g users smith
Useful options | |
| Set the user’s home directory to be |
| Set the user’s login shell to be |
| Set the user’s ID to be |
| Set the user’s initial (default) group to |
| Make the user a member of the additional, existing groups |
| Copy all files from your system skeleton directory, /etc/skel, into the newly created home directory. The skeleton directory traditionally contains minimal (skeletal) versions of initialization files, like ~/.bash_profile, to get new users started If you prefer to copy from a different directory, add the |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access