Fedora 19 "useradd" failure, GUI success

Hey guys/gals,

I have a Fedora 19 box with a 26TB RAID set mounted as my home directory

[root@localhost ~]# mount|grep home
/dev/md0 on /home type xfs (rw,relatime,seclabel,attr2,inode64,logbsize=128k,sunit=256,swidth=3584,noquota)

I have been able to add/modify user accounts using VNC + system-config-users... however, when I try to do just a simple "useradd test" I get the following:

[root@localhost ~]# useradd test
useradd: cannot create directory /home/test

As for permissions, please remember that I can already *successfully* add users via the GUI... but just for completeness:

[root@localhost ~]# ls -lad /home
drwxr-xr-x. 2 root root 6 Oct 21 16:20 /home
[root@localhost ~]# ls -la /home/deleteme
-rw-r--r--. 1 root root 0 Oct 21 16:42 /home/deleteme
[root@localhost ~]# mkdir /home/test
[root@localhost ~]# ls -lad /home/test/
drwxr-xr-x. 2 root root 6 Oct 21 16:42 /home/test/
[root@localhost ~]# rm -rf /home/deleteme /home/test
[root@localhost ~]# useradd test
useradd: cannot create directory /home/test

Am I crazy/old, or did they perhaps change the user addition process without telling me? :stuck_out_tongue:

that's really strange, could you provide more info about you system configuration?

Are you sure that /home/test didn't already exist?

ah! try with selinux in permissive mode, never forget about its contexts on RH systems

1 Like

Thanks spider_fingers, totally forgot about selinux blocking...

[root@localhost ~]# setenforce 0
[root@localhost ~]# getenforce
Permissive
[root@localhost ~]# useradd test
[root@localhost ~]# ls -lad /home/test/
drwx------. 2 test test 75 Oct 22 14:42 /home/test/
[root@localhost ~]#

To make it stick, I also edited /etc/selinux/config and changed the SELINUX parameter to be "permissive"

Thanks again!