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
17,708 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. 

Hope this helps!

Get your Linux certification today to become certified.

Thanks.

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
• 52,350 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, 2020 in Linux Administration by MD
• 95,460 points
4,009 views
0 votes
1 answer
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
1,180 views
0 votes
2 answers

Install postgreSQL on Ubuntu

Follow the below commands to install PostgreSQL (PSQL) ...READ MORE

answered Nov 12, 2020 in Database by Prachi
• 140 points
1,266 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
843 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 14, 2019 in Linux Administration by Kiara
37,975 views
0 votes
1 answer

bash: /home/XXX/.rvm/scripts/rvm: No such file or directory

Install RVM  gpg --keyserver hkp:// keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 ​Now ...READ MORE

answered May 27, 2022 in Linux Administration by Korak
• 5,820 points
3,570 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP