LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Solaris / OpenSolaris (https://www.linuxquestions.org/questions/solaris-opensolaris-20/)
-   -   useradd not creating home directory (https://www.linuxquestions.org/questions/solaris-opensolaris-20/useradd-not-creating-home-directory-785146/)

magnusprime 01-27-2010 02:01 PM

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.

leosgb 01-27-2010 02:06 PM

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.

magnusprime 01-27-2010 02:12 PM

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.

sycamorex 01-27-2010 02:23 PM

Quote:

Originally Posted by leosgb (Post 3842622)
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?

sycamorex 01-27-2010 02:33 PM

btw,
1. could you post the exact output from your shell?
2. have you tried doing the same with adduser?

agnar 01-27-2010 03:37 PM

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.

scoban 01-27-2010 03:53 PM

In Solaris you cannot use /home. It is used by automounter. Just use /export/home/<username> and you are fine...

magnusprime 01-27-2010 05:08 PM

Yeah... that seems to be what resolves this issue. I didnt know that i couldnt use /home Solaris. using /export/home is working.


All times are GMT -5. The time now is 11:43 PM.