troubleshooting Question

How to use 'usermod' command to add user's login directory

Avatar of tzk
tzk asked on
5 Comments1 Solution2131 ViewsLast Modified:
hi, everybody:
    When I created a new user account with useradd command, I found the user directory was not created, because I didn't use any options in the useradd command. Now, I want to add the new user's login directory with 'usermod' command. But it doesn't work, look:

   sudo usermod -d /home/newuser newuser
   sudo usermod -d -m /home/newuser newuser
   The commands above don't work, The directory wasn't created. How should I do?

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 5 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros