Operating System - HP-UX
1833589 Members
4355 Online
110061 Solutions
New Discussion

mounting /home to external storage

 
SOLVED
Go to solution
Rgomes
Valued Contributor

mounting /home to external storage

Hi All,

I am trying to mount /home to external disk system2100. It is RAID 5. I created a new lvol in a new vg( vg01) and mount it as

mount /dev/vg01/lvol1 /webuser,

Now, what I am trying to do is, mount my /home dir to this new lvol: /dev/vg01/lvol1. New /dev/vg01/lvol1 is mounting to /home w/o any probelm. I have also changed users home dir into this new lvol1 through SAM.
user1---->home dir---->/webuser/user1

but whenever, user1 login to the system, that user1 get "/" path as his home dir. How can I get /webuser/user1 as my home dir.

Thanks and best regards
Richard
7 REPLIES 7
Stefan Farrelly
Honored Contributor
Solution

Re: mounting /home to external storage

The only way logins default to / as a home dir is because either the correct homedir (as in /etc/passwd) doesnt exist OR its permissions are wrong - not allowing access to the user. Check the permissions on /webuser and /webuser/user1
Im from Palmerston North, New Zealand, but somehow ended up in London...
Mark Grant
Honored Contributor

Re: mounting /home to external storage

I suspect you might have a permissions problem here. If the system can't access a home directory on login, it will dump you in / instead.I would check that all users have access to there home directory before going on!
Never preceed any demonstration with anything more predictive than "watch this"
Robert-Jan Goossens
Honored Contributor

Re: mounting /home to external storage

Hi Richard,

Check the permissions on /webuser and /webuser/user1 if the users can read his files.

Chech the passwd file if sam changed the home directory for the user.

Hope it helps,

Robert-Jan.
Rgomes
Valued Contributor

Re: mounting /home to external storage

Thank you all. Now, its working!!

Richard
Rgomes
Valued Contributor

Re: mounting /home to external storage

HI Again,

I can login into my home dir, like /webuser/user1.

How can I stop accessing user to go up-ward of dir. Like "cd /". I don't want our users able to go "/" by "cd"ing.

For disk quota, I am confused about the blocks=?B. I knew,
1 block=512Byte. So, I gave 16384Blocks( =8MB) for an user, but he can upload almost 16MB file to his home dir, say to /webuser/user1.

Pls advise.

Thanks and best regards

Richard

Pete Randall
Outstanding Contributor

Re: mounting /home to external storage

Richard,

The only way to restrict use of the cd command is to use the "restricted" shell: rsh or rksh, for example. Try doing a man on rksh (you'll have to search through for occurences of the "rksh" phrase) to get some idea of the restrictions this sets up.


Pete


Pete
Bill Hassell
Honored Contributor

Re: mounting /home to external storage

When you remove the ability to cd above the cirrent directory or access anything outside of the user's home directory, the user can no longer access any programs that are not in the home directory. The command chroot will demonstrate this feature. If the users cannot access any commands or filesm then they likely do not need a shell. The restricted shell is VERY restrictive, so much so that many sysadmins will create a simple menu program to replace a standard shell.


Bill Hassell, sysadmin