Error saying "useradd: warning: the home directory already exists. Not copying any file from skel directory into it."

0 votes

I'm trying to create a new user for my Ubuntu, used this command:

sudo useradd -d /home/dinesh -m ansi

But I keep getting this error

useradd: warning: the home directory already exists.
Not copying any file from skel directory into it.

Why do I keep getting this error?

Jan 10, 2019 in Linux Administration by Dinesh
3,951 views

2 answers to this question.

0 votes
Best answer

Hey @Dinesh, this isn't an error, its a warning. 

You're trying to create a new user on the /home/dinesh directory but the system tries to create a new home directory. Hence the warning saying home directory already exists. But if you check your system a new user has already been created. Warnings don't interrupt like errors. 

answered Jan 10, 2019 by Sitara

selected Jan 10, 2019 by Kalgi

Why is the system trying to create a new home directory? 

When infact the command was correct: 

sudo useradd -d /home/dinesh -m ansi
0 votes

Hey @Dinesh, have a look at this thread - https://www.edureka.co/community/35292/create-new-user-on-ubuntu

It explains all the steps used to create a new user on ubuntu

Hope it helps :)

answered Jan 10, 2019 by Kalgi
• 51,950 points

Related Questions In Linux Administration

0 votes
1 answer
0 votes
1 answer

Proxy Error the proxy server received an invalid response from an upstream server.

Hi@akhtar, I think you did not configure your ...READ MORE

answered Apr 22 in Linux Administration by MD
• 57,300 points
624 views
0 votes
1 answer
0 votes
1 answer

Not able to access /etc/sudoers.d/python file

I think your system is not allowing ...READ MORE

answered Feb 6, 2019 in Linux Administration by Lohit
709 views
0 votes
1 answer
0 votes
1 answer

How do I set variable if a specific package version is installed in CFEngine?

Here is what you can do.Just use packagesmatching to ...READ MORE

answered Jul 12, 2018 in Other DevOps Questions by Atul
• 10,240 points
186 views
0 votes
1 answer

Install postgreSQL on Ubuntu

Installing PostgreSQL on Ubuntu is very simple, ...READ MORE

answered Mar 22, 2019 in Database by Nitesh
155 views
0 votes
1 answer

Access progrs prompt without switching accounts

Use the following to get the postgres prompt ...READ MORE

answered Mar 22, 2019 in Database by Mahi
105 views
0 votes
1 answer

Error saying "Failed to start httpd.service: Unit httpd.service not found."

Execute the following steps or make sure ...READ MORE

answered May 13, 2019 in Linux Administration by Kiara
8,029 views
0 votes
1 answer