Find the answer to your Linux question:
Results 1 to 10 of 10
Hi, I am not able to create a user on my Redhat Linux machine . I get the below error : useradd: cannot create directory /home/ Can someone please advise? ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2012
    Posts
    8

    useradd: cannot create directory /home/


    Hi,

    I am not able to create a user on my Redhat Linux machine . I get the below error :

    useradd: cannot create directory /home/

    Can someone please advise?

    Pls let me know , if any more details are needed .

    I tried searching forum for this problem , but could not find any post regarding this .

    Thanks,
    Vishal Chugh

  2. #2
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    3,217
    Post the complete command, please.

    But judging from the output, you try to have a dir /home instead of /home/<username>
    You must always face the curtain with a bow.

  3. #3
    Just Joined!
    Join Date
    Jun 2012
    Posts
    8
    [root@XYZ ~]# useradd vishal
    useradd: cannot create directory /home/vishal

  4. #4
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    3,217
    Is there a /home and if yes: Is it writeable?
    Code:
    ls -lad /home
    ls -la /home
    mount |grep home
    touch /home/deleteme
    ls -al /home/deleteme
    You must always face the curtain with a bow.

  5. #5
    Just Joined!
    Join Date
    Jun 2012
    Posts
    8
    [root@XYZ ~]# ls -lad /home
    drwxrwxrwx 2 root root 0 Jun 7 19:42 /home

    [root@XYZ ~]# ls -la /home
    total 8
    drwxrwxrwx 2 root root 0 Jun 7 19:42 .
    drwxr-xr-x 45 root root 4096 Jun 8 00:41 ..

    [root@XYZ ~]# mount |grep home

    [root@XYZ ~]# touch /home/deleteme
    touch: cannot touch `/home/deleteme': Permission denied

  6. #6
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    3,217
    Code:
    mount
    df -h
    please post the output in CODE tags.
    You must always face the curtain with a bow.

  7. #7
    Just Joined!
    Join Date
    Jun 2012
    Posts
    8
    Code:
    [root@XYZ ~]# mount
    /dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw)
    proc on /proc type proc (rw)
    sysfs on /sys type sysfs (rw)
    devpts on /dev/pts type devpts (rw,gid=5,mode=620)
    /dev/sda1 on /boot type ext3 (rw)
    tmpfs on /dev/shm type tmpfs (rw)
    /dev/mapper/VolGroup01-LogVol00 on /mnt/disk1 type ext3 (rw)
    none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
    sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
    nfsd on /proc/fs/nfsd type nfsd (rw)
    
    
    [root@XYZ ~]# df -h
    Filesystem            Size  Used Avail Use% Mounted on
    /dev/mapper/VolGroup00-LogVol00
                           93G   11G   78G  13% /
    /dev/sda1              99M   27M   68M  28% /boot
    tmpfs                 2.0G     0  2.0G   0% /dev/shm
    /dev/mapper/VolGroup01-LogVol00
                           99G   33G   61G  35% /mnt/disk1

  8. #8
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    3,217
    Are there maybe file attributes?
    Code:
    lsattr -d /
    lsattr -d /home
    Or is the disk broken?
    Search for signs in dmesg and smartctl
    Code:
    dmesg
    smartctl -i /dev/sda
    smartctl -x /dev/sda
    You must always face the curtain with a bow.

  9. #9
    Just Joined!
    Join Date
    Jun 2012
    Posts
    8
    Code:
    [root@XYZ ~]# lsattr -d /
    ------------- /
    
    
    [root@XYZ ~]# lsattr -d /home
    lsattr: Inappropriate ioctl for device While reading flags on /home
    Sorry , output of other commands , is out of my understanding ... ..

  10. #10
    Just Joined!
    Join Date
    Jun 2012
    Posts
    8
    dmesg
    smartctl -i /dev/sda
    smartctl -x /dev/sda

    give very very weird output .

Posting Permissions

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