Find the answer to your Linux question:
Results 1 to 8 of 8
CentOS 5.5 I am trying to add new users, when I use the command: # useradd newuser I get: useradd: cannot create directory /home/users/newuser I went to my /etc/skel and ...
  1. #1
    Just Joined!
    Join Date
    Jan 2011
    Posts
    87

    [SOLVED] Problems with useradd

    CentOS 5.5

    I am trying to add new users, when I use the command:
    # useradd newuser

    I get:
    useradd: cannot create directory /home/users/newuser

    I went to my /etc/skel and when I use the command ls it displays:
    home

    and when I go into /etc/skel/home I have the two directories that I created.

    I am logged in as root, and when I ls cd / it shows /home, when I cd into /home everything looks normal.

    How do I get this error to stop so I can add new users?

  2. #2
    Linux Enthusiast meton_magis's Avatar
    Join Date
    Oct 2006
    Location
    arizona
    Posts
    665
    does /home/users exist?

    also, I think /etc/skel is supposed to map to a home directory directly. For instance, mine has

    [meton@server1 ~]$ ls -a /etc/skel
    . .. .bash_logout .bash_profile .bashrc .gnome2 .mozilla

    you should have files directly in there, not in /etc/skel/home
    New to the internet, technical forums, or the hacker / open source community??
    Read this to learn good posting habits http://www.catb.org/~esr/faqs/smart-questions.html

    RHCE for RHEL version 5
    RHCT for RHEL version 4

  3. #3
    Just Joined!
    Join Date
    Mar 2009
    Posts
    13
    Can you paste the output of the below command.

    useradd -D

  4. #4
    ved
    ved is offline
    Linux User ved's Avatar
    Join Date
    Jan 2008
    Location
    New Delhi
    Posts
    309
    Quote Originally Posted by pauhn View Post
    CentOS 5.5

    I am trying to add new users, when I use the command:
    # useradd newuser

    I get:
    useradd: cannot create directory /home/users/newuser

    I went to my /etc/skel and when I use the command ls it displays:
    home

    and when I go into /etc/skel/home I have the two directories that I created.

    I am logged in as root, and when I ls cd / it shows /home, when I cd into /home everything looks normal.

    How do I get this error to stop so I can add new users?
    Try to login as root user and than command is work
    Take risks: if you win, you will be happy; if you lose, you will be wise.
    New Users : Read This First

  5. #5
    Just Joined!
    Join Date
    Apr 2011
    Posts
    2
    I remember confusion between "useradd" and "adduser". Maby it's that..

  6. #6
    Trusted Penguin jayd512's Avatar
    Join Date
    Feb 2008
    Location
    Kentucky
    Posts
    4,071
    Quote Originally Posted by LinuxFreakA View Post
    I remember confusion between "useradd" and "adduser". Maby it's that..
    That wouldn't be it. Red Hat/Fedora distros use useradd.
    Jay

    New users, read this first.
    New Member FAQ
    Registered Linux User #463940
    I do not respond to Private Messages asking for Linux help. Please, keep it on the public boards.

  7. #7
    Just Joined!
    Join Date
    Jan 2011
    Posts
    87
    I'm not quite sure what I was doing wrong, but it's working for me now.

    must have been one of those id10t errors I hear so much about.

  8. #8
    Trusted Penguin jayd512's Avatar
    Join Date
    Feb 2008
    Location
    Kentucky
    Posts
    4,071
    Quote Originally Posted by pauhn View Post
    must have been one of those id10t errors I hear so much about.
    Maybe not... could be a PEBKAC* issue!
    Those are serious!!!

    *Problem Exists Between Keyboard And Chair

    Seriously, glad you got it going!
    Jay

    New users, read this first.
    New Member FAQ
    Registered Linux User #463940
    I do not respond to Private Messages asking for Linux help. Please, keep it on the public boards.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...