Adduser command:

Adduser is a linux command that adds a user to the system. After adding a user to the system using:

We set the user password using:

After adding a user using "adduser", when we try to copy a file into the user home directory "
/home/user_name" or when we try to access the home directory of the newly created user, we get the below error:

Could not chdir to home directory /home/user: No such file or directory 

Creating the directory with the right permissions:

To fix the above error, we would need to create a home directory for the user "user_name":

We also need to set the right permissions for the directory:

Then we set the right ownership to it using :

Brando Sabatini and Ikbal C ©. Powered by Blogger.