Results 1 to 3 of 3

Thread: useradd not creating directory

Hybrid View

  1. #1
    Just burned his ISO
    Join Date
    Feb 2010
    Posts
    7

    Default useradd not creating directory

    I'm trying to create a standard user account since sometimes I do some work that doesn't require root. However, for some reason it doesn't seem to create the home directory for the user. I've tried

    useradd -d /home/username username

    and it creates the user just fine, /etc/passwd shows that the home directory should be as listed, but when you visit /home no directories are listed.

    Furthermore, when I log in with the user and run startx, the desktop shows all items in / , as if / is the current home directory.

    Does anyone know what the problem is? I tried just doing a simple mkdir /home/username as well to make the directory, but then other errors come up saying some files are missing in the directory for the user. I imagine if useradd creates the home directory, it would create all necessary files as well. However, it's just not creating it.

    Also, I did notice that in addition to the home directory not being correct, when logged into KDE the menu wasn't nice either. There was no backtrack menu item with all the tools organized well - instead they are all in a lost+found menu item, but there are so many they don't all fit on the screen. Is there an easy way to get the menu working the same for additional users as it does for root?
    Any ideas?

  2. #2
    Junior Member
    Join Date
    Mar 2010
    Posts
    44

    Default

    I don't have the backtrack manual in front of me, but the version supplied with Fedora suggests that you ought to (if I'm reading this correctly)have done it with the -k option, which copies skeleten files. Could you do
    rmuser username
    and then
    useradd -kd /home/username username
    That might do nothing,I'm not sure I understand that part of the manual. I've never heard of this with useradd. Good Luck.

  3. #3
    Just burned his ISO
    Join Date
    Feb 2010
    Posts
    7

    Default

    Quote Originally Posted by oldcrank View Post
    I don't have the backtrack manual in front of me, but the version supplied with Fedora suggests that you ought to (if I'm reading this correctly)have done it with the -k option, which copies skeleten files. Could you do
    rmuser username
    and then
    useradd -kd /home/username username
    That might do nothing,I'm not sure I understand that part of the manual. I've never heard of this with useradd. Good Luck.
    I tried the k flag but couldn't seem to get it to work. It said the k flag is only allowed with the m flag. So I tried -km and I got the same message. I tried -k -m and got the same message. A little weird. But, I tried just m, and it worked. m creates the directory. I suppose d just sets the directory.

    Thanks!

Posting Permissions

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