[Rocks-Discuss] Rocks 5.0 useradd can't create home directory

233 views
Skip to first unread message

est...@darwin.bu.edu

unread,
Sep 26, 2008, 11:57:17 AM9/26/08
to npaci-rocks...@sdsc.edu
Dear experts,

I've just built the Rocks 5.0 cluster and having problems creating
users accounts:

-------------------------------------------------------------------------
# useradd -c 'Esther Epstein' -n esther
useradd: cannot create directory /home/esther
# userdel esther
# rocks sync users
make: Entering directory `/var/411'
rm -rf /etc/411.d/*
make
make[1]: Entering directory `/var/411'
/opt/rocks/sbin/411put --comment="#" /etc/auto.home
411 Wrote: /etc/411.d/etc.auto..home
Size: 417/129 bytes (encrypted/plain)
Alert: sent on channel 255.255.255.255:8649 with master 10.1.1.1

/opt/rocks/sbin/411put --comment="#" /etc/auto.master
411 Wrote: /etc/411.d/etc.auto..master
Size: 417/134 bytes (encrypted/plain)
Alert: sent on channel 255.255.255.255:8649 with master 10.1.1.1

/opt/rocks/sbin/411put --comment="#" /etc/auto.misc
411 Wrote: /etc/411.d/etc.auto..misc
Size: 1098/637 bytes (encrypted/plain)
Alert: sent on channel 255.255.255.255:8649 with master 10.1.1.1

/opt/rocks/sbin/411put --comment="#" /etc/auto.net
411 Wrote: /etc/411.d/etc.auto..net
Size: 2058/1347 bytes (encrypted/plain)
Alert: sent on channel 255.255.255.255:8649 with master 10.1.1.1

/opt/rocks/sbin/411put --comment="#" /etc/auto.share
411 Wrote: /etc/411.d/etc.auto..share
Size: 425/136 bytes (encrypted/plain)
Alert: sent on channel 255.255.255.255:8649 with master 10.1.1.1

/opt/rocks/sbin/411put --comment="#" /etc/auto.smb
411 Wrote: /etc/411.d/etc.auto..smb
Size: 1280/770 bytes (encrypted/plain)
Alert: sent on channel 255.255.255.255:8649 with master 10.1.1.1

/opt/rocks/sbin/411put --nocomment /etc/passwd
411 Wrote: /etc/411.d/etc.passwd
Size: 2946/2001 bytes (encrypted/plain)
Alert: sent on channel 255.255.255.255:8649 with master 10.1.1.1

/opt/rocks/sbin/411put --nocomment /etc/group
411 Wrote: /etc/411.d/etc.group
Size: 1292/778 bytes (encrypted/plain)
Alert: sent on channel 255.255.255.255:8649 with master 10.1.1.1

/opt/rocks/sbin/411put --nocomment /etc/shadow
411 Wrote: /etc/411.d/etc.shadow
Size: 1896/1229 bytes (encrypted/plain)
Alert: sent on channel 255.255.255.255:8649 with master 10.1.1.1

make[1]: Leaving directory `/var/411'
make: Leaving directory `/var/411'
### compute-0-2(stat: 0, dur(s): 6.65):
Reloading maps
### compute-0-1(stat: 0, dur(s): 6.76):
Reloading maps
### compute-0-0(stat: 0, dur(s): 6.76):
Reloading maps
--------------------------------------------------------------------------

The same problem with System -> Administration -> Users & Groups -> Add User

What I am doing wrong?

Thank you in advance!
Esther Epstein

Mason J. Katz

unread,
Sep 26, 2008, 12:22:42 PM9/26/08
to Discussion of Rocks Clusters
This sounds like a network configuration issue:

1) Do you have two network interfaces on your frontend, and were they
configured during installation of Rocks?
2) Did any network information (address, names, etc) change since installation?
3) Does /export/home exists?
4) What happens if you "cd /home/install; ls"?

Thom Savage

unread,
Sep 26, 2008, 2:22:36 PM9/26/08
to Discussion of Rocks Clusters
Yesterday, I reinstalled a Rocks 5 cluster and ran into a similar situation with the useradd. The message I was getting was similar as well, "useradd: cannot create directory /home/woowoo". If you look at what the `rocks sync users` python code does, one of its actions (in plugin_fixnewusers.py) is to update the user account's home dir path from "/export/home/testuser" to "/home/user" so the autofs will mount correctly. It smells like rocks expects the default homedir path to be in /export/home, but my useradd is defaulting to /home. To create users correctly, I used the command `useradd -d /export/home/tester tester`. Then the `rocks sync users` worked fine.

The file /etc/defaults/useradd on my Rocks 5 system has the value "HOME=/home" whereas the same file on my Rocks 4.3 system has "HOME=/export/home". Perhaps changing this would solve the problem "for good". :)

Thom

~~
Thom Savage
Systems Analyst
Computer and Information Sciences
University of Alabama at Birmingham
http://www.cis.uab.edu/

----- Original Message -----
From: est...@darwin.bu.edu
To: npaci-rocks...@sdsc.edu
Sent: Friday, September 26, 2008 12:25:30 PM GMT -06:00 US/Canada Central
Subject: Re: [Rocks-Discuss] Rocks 5.0 useradd can't create home directory

Hi Mason,

a month ago I've just installed Rocks 5.0 on a frontend and tested one
compute node with a crosscable. I have not tried "useradd" at this time.

Today I've built three compute nodes with boot CDs.

http://vayu.bu.edu/ganglia/

It were no network information change since installation

-------------------------------------------------------------------
root@vayu install]# cd /export/home
[root@vayu home]# ls -slag
total 16
4 drwxr-xr-x 4 root 4096 Aug 21 07:55 .
4 drwxr-xr-x 7 root 4096 Apr 30 18:44 ..
4 drwx------ 2 condor 4096 Aug 21 07:55 condor
4 drwxr-xr-x 8 root 4096 Aug 21 11:59 install

[root@vayu /]# cd /home/install; ls
cachedir contrib rocks-dist rolls sbin site-profiles
-------------------------------------------------------------------

Thanks,
Esther

Mason J. Katz writes,

est...@darwin.bu.edu

unread,
Sep 26, 2008, 2:46:39 PM9/26/08
to npaci-rocks...@sdsc.edu, npaci-rocks...@sdsc.edu
Thank you *VERY* much Thom!

I've just played with /export/home (where I could make a directory) when
I got your solution to the problem.

The "HOME=/export/home" replacement in /etc/default/useradd solves the
problem.

Esther

Thom Savage writes,

est...@darwin.bu.edu

unread,
Sep 26, 2008, 2:46:39 PM9/26/08
to npaci-rocks...@sdsc.edu, npaci-rocks...@sdsc.edu
Thank you *VERY* much Thom!

I've just played with /export/home (where I could make a directory) when
I got your solution to the problem.

The "HOME=/export/home" replacement in /etc/default/useradd solves the
problem.

Esther

Thom Savage writes,
>

Hamilton, Scott L.

unread,
Sep 26, 2008, 4:11:43 PM9/26/08
to Discussion of Rocks Clusters
I think I would be inclined to call this a ROCKS bug. I never ran into
it because we use kerbos authentication to our cluster which was a
modification nightmare in itself.

Scott

Mason J. Katz

unread,
Sep 26, 2008, 5:27:41 PM9/26/08
to Discussion of Rocks Clusters
This sounds like /etc/default/useradd has been modified. The default
file created by Rocks is:

/etc/default/useradd:
# useradd defaults file
GROUP=100
INACTIVE=-1
EXPIRE=
SHELL=/bin/bash
SKEL=/etc/skel
HOME=/export/home

If the HOME variable is changed to /home (from /export/home) yes, it
will break useradd. What does this file look like on your clusters?

Kevin Doman

unread,
Oct 9, 2008, 9:48:52 AM10/9/08
to Discussion of Rocks Clusters
Funny - Something must had changed and I didn't know what. When I
initially install Rocks 5.0 on a new system and added a user, I didn't
recall running into this issue. But today (Oct. 9), I ran into this
error and searched my gmail inbox for this thread.

The /etc/default/useradd file has HOME=/home and I had to change it to
HOME=/export/home.

There existed also a useradd.rpmsave with the correct "/export/home"
setting, so, some of the RPMs I installed probably moved the file? But
which RPM?

K.

Bart Brashers

unread,
Oct 9, 2008, 12:10:58 PM10/9/08
to Discussion of Rocks Clusters
Which RPM owns/supplies a particular file?

# rpm -qf /etc/default/useradd
shadow-utils-4.0.17-12.el5

Bart


This message contains information that may be confidential, privileged or otherwise protected by law from disclosure. It is intended for the exclusive use of the Addressee(s). Unless you are the addressee or authorized agent of the addressee, you may not review, copy, distribute or disclose to anyone the message or any information contained within. If you have received this message in error, please contact the sender by electronic reply to em...@environcorp.com and immediately delete all copies of the message.

Reply all
Reply to author
Forward
0 new messages