OpenSolaris

Printable Version Enter a New Search
Bug ID 6436577
Synopsis useradd gives obscure error message when colliding with autofs
State 1-Dispatched (Default State)
Category:Subcategory utility:security
Keywords opensolaris | oss-bite-size | oss-request
Sponsor
Submitter dp
Reported Against snv_40 , snv_93 , snv_102
Duplicate Of
Introduced In
Commit to Fix
Fixed In
Release Fixed
Related Bugs
Submit Date 9-June-2006
Last Update Date 13-October-2009
Description
Category
   utility
Sub-Category
   sys_maintenance
Description
   useradd -m -d /home/dp dp
Will fail as follows:
UX: useradd: ERROR: Unable to create the home directory: Operation not applicable.
As reporting on #opensolaris, for users not familiar with autofs, this is confusing.  Why would creating this directory fail when others work fine?
Useradd could do much better.
Frequency
   Always
Regression
   No
Steps to Reproduce
   See above.
Expected Result
   
It'd be great to get a good clear error message.
Actual Result
   See above.
Error Message(s)
   
Test Case
   
Workaround
   
Submitter wants to work on bug
   No
Additional configuration information
Rich Lowe pointed out that SMC may solve this differently--
he reported that if you specify /home/foo, it will actually
create /export/home/foo and add an automount entry locally.
I can't confirm this at the moment.

The behavior should be investigated and potentially reconciled.
This is still being seen on snv_93.

If you have autofs and nfs/client enabled, then running

# useradd -u $uid -m $logname

will work.

If nfs/client is disabled, then it will fail, with

UX: useradd: ERROR: Unable to create the home directory: Operation not applicable.

However, any subsequent enabling or restarting of autofs and nfs/client
*will not make this work*
so the only workaround is the ditch the "-m" flag, and create the directory by hand.


With the OpenSolaris world domination push gaining momentum by the day, it is
vital that we get this fixed.
Work Around
add "-b /path/to/homedirectory" to your useradd command line.
Comments
N/A