Fedora 19 "useradd" failure, GUI success

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat Fedora 19 "useradd" failure, GUI success
# 1  
Old 10-21-2013
SOLVED: 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
Code:
[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:
Code:
[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:
Code:
[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? Smilie

Last edited by jjinno; 10-22-2013 at 06:46 PM.. Reason: Problem Solved
# 2  
Old 10-22-2013
that's really strange, could you provide more info about you system configuration?
# 3  
Old 10-22-2013
Are you sure that /home/test didn't already exist?
# 4  
Old 10-22-2013
ah! try with selinux in permissive mode, never forget about its contexts on RH systems
This User Gave Thanks to spider_fingers For This Post:
# 5  
Old 10-22-2013
SOLVED!

Thanks spider_fingers, totally forgot about selinux blocking...
Code:
[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!
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies

2. Shell Programming and Scripting

Failure: if grep "$Var" "$line" inside while read line loop

Hi everybody, I am new at Unix/Bourne shell scripting and with my youngest experiences, I will not become very old with it :o My code: #!/bin/sh set -e set -u export IFS= optl="Optl" LOCSTORCLI="/opt/lsi/storcli/storcli" ($LOCSTORCLI /c0 /vall show | grep RAID | cut -d " "... (5 Replies)
Discussion started by: Subsonic66
5 Replies

3. UNIX for Dummies Questions & Answers

Using "mailx" command to read "to" and "cc" email addreses from input file

How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address and column 3 contains “cc” e-mail address to include with same email. Sample input file, email.txt Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies

4. Shell Programming and Scripting

Perl failure with "main::$fn" used only once:" in error logs

Hi all, Can anyone guess why this is happening? I am new to Perl, so please help me to fix this error: - I have a static html file which calls the cgi-perl script. HTML Code: <html> <head> <title> Hey Dude! </title> </head> <body> <form method="POST"... (3 Replies)
Discussion started by: bashily
3 Replies

5. Cybersecurity

"authentication failure" then "session opened". Why?

Ssh connections using shared public keys issue “authentication failure” messages, then succeed with “session opened”. I have found a few other threads with similar issue, but no solutions offered. :wall: How can I eliminate the failure messages? Environment: $ uname -a Linux... (0 Replies)
Discussion started by: KennyCason
0 Replies

6. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

7. SuSE

VMDB Failure" followed by "Unable to open snapshot file"

keep getting an error when I try to revert to a snapshot: "VMDB Failure" followed by "Unable to open snapshot file" Im using vmware server 1.0.4, host OS is windows xp and guest OS is SLES. Is there anything I can do to recover the snapshot or am I in trouble!?!?! (0 Replies)
Discussion started by: s_linux
0 Replies

8. UNIX for Dummies Questions & Answers

Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`"

Hi Friends, Can any of you explain me about the below line of code? mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'` Im not able to understand, what exactly it is doing :confused: Any help would be useful for me. Lokesha (4 Replies)
Discussion started by: Lokesha
4 Replies

9. UNIX for Dummies Questions & Answers

Want to create new users without using "useradd" command and user Interaction.

Don't want to use useradd command to create a new user I am doing manual addition of accounts. Actually I am writing a script and I am working on RedHat7.1 system. What I am trying to do is run the script and pass all the values of the username password and group as command line parameters. Now... (2 Replies)
Discussion started by: syedifti
2 Replies
Login or Register to Ask a Question