LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris and OpenSolaris.
General Sun, SunOS and Sparc related questions also go here.

Notices

Reply
 
Search this Thread
Old 01-27-2010, 02:01 PM   #1
magnusprime
LQ Newbie
 
Registered: Aug 2003
Posts: 10

Rep: Reputation: 0
useradd not creating home directory


I have searched google, these threads and read the useradd man page, but I am still having issues with creating a user and getting their home directory created at the same time.

This is on Solaris 10 64 bit SPARC.

Command I am running as root
Code:
useradd -m -d /home/user001 -s /bin/bash user001
I am getting this error
Code:
UX: useradd: ERROR: unable to create the home directory: Operation not applicable
I tried making the /home directory write-able as its currently only readable, but that did not work either, and gave the following error
Code:
chmod: WARNING: can't change /home
Ideas?

I am in no way a Solaris expert, but I am fairly competent in CentOS and Fedora... where the useradd command has worked for me in the past.
 
Old 01-27-2010, 02:06 PM   #2
leosgb
Member
 
Registered: Nov 2004
Location: Brazil
Distribution: Gentoo
Posts: 363

Rep: Reputation: 31
Hi

I believe all you need is:

useradd -m -s /bin/bash username

you can also add the -G option if you know the groups you want for this user...

Good luck.
 
Old 01-27-2010, 02:12 PM   #3
magnusprime
LQ Newbie
 
Registered: Aug 2003
Posts: 10

Original Poster
Rep: Reputation: 0
Nope.. that gives me the same error about not being able to create the users directory.. Operation not applicable...

I think it has to do with the /home directory not being writeable, and me not being able to change it, even as root.
 
Old 01-27-2010, 02:23 PM   #4
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,527
Blog Entries: 1

Rep: Reputation: 999Reputation: 999Reputation: 999Reputation: 999Reputation: 999Reputation: 999Reputation: 999Reputation: 999
Quote:
Originally Posted by leosgb View Post
Hi

I believe all you need is:

useradd -m -s /bin/bash username

you can also add the -G option if you know the groups you want for this user...

Good luck.
Yeah, that should be enough to create a user with its home directory and bash as a default shell.
What permissions do you have on /home?
 
Old 01-27-2010, 02:33 PM   #5
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,527
Blog Entries: 1

Rep: Reputation: 999Reputation: 999Reputation: 999Reputation: 999Reputation: 999Reputation: 999Reputation: 999Reputation: 999
btw,
1. could you post the exact output from your shell?
2. have you tried doing the same with adduser?
 
Old 01-27-2010, 03:37 PM   #6
agnar
LQ Newbie
 
Registered: Jul 2009
Distribution: Arch Linux, Ubuntu
Posts: 6

Rep: Reputation: 1
Is /home a local directory on the computer, or is it a network mounted directory? If it's a network mounted directory you need root permissions on the server where the home directory resist.
 
Old 01-27-2010, 03:53 PM   #7
scoban
Member
 
Registered: Nov 2004
Location: Turkey
Distribution: Slackware
Posts: 145

Rep: Reputation: 16
In Solaris you cannot use /home. It is used by automounter. Just use /export/home/<username> and you are fine...
 
Old 01-27-2010, 05:08 PM   #8
magnusprime
LQ Newbie
 
Registered: Aug 2003
Posts: 10

Original Poster
Rep: Reputation: 0
Yeah... that seems to be what resolves this issue. I didnt know that i couldnt use /home Solaris. using /export/home is working.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
useradd: cannot create directory /home/ amirzkria Red Hat 4 05-17-2011 02:52 PM
[SOLVED] useradd and the home directory. stf92 Linux - Newbie 7 09-16-2009 08:42 AM
useradd - No home directory is created ]SK[ Linux - Newbie 16 07-14-2008 01:35 PM
Useradd not creating home directory when creating newuser meneedham Linux - Newbie 4 10-05-2007 12:11 PM


All times are GMT -5. The time now is 08:48 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration