1834019 Members
2892 Online
110063 Solutions
New Discussion

Restrict Shell

 
Fernando Ferri Wollner
Frequent Advisor

Restrict Shell

Hi,
I need to restrict a user in his $HOME directory but the user must be allowed to move to his $HOME subdirectories.
Does any one knows how to restrict this?
4 REPLIES 4
Patrick Wallek
Honored Contributor

Re: Restrict Shell

Have a look at chroot.

I think that would suit your needs.

# man 1m chroot

for more information
Steven E. Protter
Exalted Contributor

Re: Restrict Shell

Restricted shell can by done as follows

vipw /etc/passwd

You will see the user shell, change it to this.

/usr/bin/rsh

That will give restricted shell and place the user in a chroot jail where they can't cd up the actual directory tree.

Their home directory will appear to be root to them.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Chris Wong
Trusted Contributor

Re: Restrict Shell

http://newfdawg.com/SHP-RestShell

Here is an overview on configuring the restricted shell. If you don't follow all steps, the user may be able to move outside their home directory.

- Chris
Fernando Ferri Wollner
Frequent Advisor

Re: Restrict Shell

i can not user rsh because rsh does not allow the user to change his directory, how i use chroot with this case?
thanks