How To Add New User With Home Directory To Linux
Adding new user to the linux generally done with useradd command. This command is not create a home directory by default. Let me explain home directory. Home directory is place where user have full rights to change, delete remove files. User related settings are saved into this directory. User ssh configuration files are save into users home directory too.
Add User With Home Directory
We will add user name test with home directory
$useradd -m test
useradd: warning: the home directory already exists.
Not copying any file from skel directory into it.
Creating mailbox file: File exists
- useradd: warning: the home directory already exists.
As we see that we get a warning that user have all ready a home directory.
- Not copying any file from skel directory into it. To do not overwrite existing files skel directory is not copied.
- Creating mailbox file: File exists says the user have allready mail box