- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- useradd fails
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2004 11:11 AM
05-10-2004 11:11 AM
useradd -g users -d /home/users -s /bin/sh -c test x.xxx
I get this error:
'/home/users' is not a valid directory
What could be invalid about /home/users?
Thanks,
Brad
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2004 11:13 AM
05-10-2004 11:13 AM
Re: useradd fails
Does it exist prior to the command?
If not then you need a -m to "make" it.
HTH,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2004 11:17 AM
05-10-2004 11:17 AM
Re: useradd fails
Yes it does.
Further, I found that if i add a trailing "/"; making it "-d /home/users/" it works, except the ownership of /home/users changes from root:sys to the user being added (in this case x.xxx:users)!?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2004 11:18 AM
05-10-2004 11:18 AM
Re: useradd fails
I just tried that on a test server and it works perfectly fine. I had to later create the directory. Please advice if the directory is already there and also if you are doing it with sufficient priveleges.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2004 11:20 AM
05-10-2004 11:20 AM
Re: useradd fails
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2004 11:25 AM
05-10-2004 11:25 AM
Re: useradd fails
A clueless admin doing chown username:groupname .* inside a user's home dir can change the ownership of /home& that can result in these symptoms.
Rgds,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2004 11:26 AM
05-10-2004 11:26 AM
Re: useradd fails
drwxrwxrwx 2 root users 96 May 10 16:07 .
drwxrwxrwx 32 root root 1024 May 4 11:18 ..
-rw-r--r-- 1 root users 893 May 10 13:42 .profile
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2004 11:27 AM
05-10-2004 11:27 AM
Solutionerror '/home/users' is not a valid directory
the comamd some times the directory does not create
in my case
made mkdiir /home/users or option:
-m Creates the home directory for the new login if it
does not exist. If the home directory exists, the
directory must have read and execute permission by
group, where group is the primary group of the new
login.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2004 11:36 AM
05-10-2004 11:36 AM
Re: useradd fails
This fixed it.
Thanks to all!
Brad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2004 02:19 PM
05-10-2004 02:19 PM
Re: useradd fails
Bill Hassell, sysadmin