Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Solaris 8 /home dir permissions

Status
Not open for further replies.

nfaber

Technical User
Oct 22, 2001
446
US
I have just installed Solaris 8 and when I add a user and try to make the users home directory in /home/[userid] it seems I do not have permissions to do this even as root. I tried to change the permisions of /home and could not because even though root owns /home, root does not have write permissions. What is going on here? Is /home used for some other perpuose than creating home directories?
 
make sure that execute permission is set on the directory.

Greg.
 
Greg,

Execute permissions are set for root. I still cannot add a directory to /home.
 
In Solaris, the folder /home is always a part of root partition where, system will not allow anybody to create their folders.
Even if you try to change the permissions on /home folder, the kernel will not allow doing that, even to root.

The user home directories should be stored in /export/home directory which is normally a seperate partition on the hard disk.

Regds,

- Hemant
 
From
Under Solaris, home directories are conventionally kept on one of two places, /home or /export/home. The /home directory is under control of the automounter and only the automounter can create directories there. The /export/home directory is where users home directories can be created by the system administrator.

To create an account for user 'oops' where the UID is 400 and users home directory is not automounted:

useradd -u 400 -g user -c useroops -m -d /export/home/oops oops
passwd oops (To set the password)
chown oops /export/home/oops
chgrp user /export/home/oops
To create an account for 'oops' where the home directory is automounted and the mount point for /home is /etc/auto_home:

useradd -u 400 -g user -c useroops oops
passwd oops (To set the password)
mkdir /export/home/oops
chown oops /export/home/oops
chgrp user /export/home/oops
vi /etc/auto_home and add the line:
oops remotehost:/home/&

This sets the user oops' home directory to /home/oops exported from a remote host
Ged Jones

Top man
 
U can also stop the automount and create users with -m option which will create home directories in /home

ex:

useradd -u 400 -m -g user -c "user oops" oops

will create user with id 400 and gid user and home dir /home/oops
 
Hi nfaber,
if you didn't use automount feature. just excute below as root.
#umount /home
mount /home to any available disk slice, edit /etc/vfstab.
now you can treat /home as your home directory we full access.
regards
fissa
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top