Operating System - HP-UX
1832455 Members
3257 Online
110043 Solutions
New Discussion

Re: Restricted shell on user

 
Carlos Munoz Lopez
Frequent Advisor

Restricted shell on user

Hi guys. I've been trying to restrict a user so he cannot change to other directory rather than his home directory. I could see in different posts you adviced the use of rsh or rksh. I implemented restricted shell (rsh), but I would like to know if there's a way so the user can access directories created in his own home, and also can delete or create files within it. I would like some help on this.
3 REPLIES 3
Raj D.
Honored Contributor

Re: Restricted shell on user

Hi Carlos ,


If directories created in that users home , without having write permission to the user , or user's group, it cannot be writable or can not be delete. Unix permission applies in that case.

And for restricting user rsh can be use.

check this link:
http://newfdawg.com/SHP-RestShell.htm

Cheers,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "
Carlos Munoz Lopez
Frequent Advisor

Re: Restricted shell on user

For instance, I have user test1 and his home directory is "/home/test1", but within his home directory exists a directory named "dir1", when I try to cd this directory (dir1) the system display error:

rsh: cd: The operation is not allowed in a restricted shell.

I know cd command is not allowed when using this shell, but is there a way so the user can access dir1?? dir1 was created with the following permissions:


drwxr-xr-x 2 test1 users 96 Sep 28 14:17 dir1
Raj D.
Honored Contributor

Re: Restricted shell on user

Carlos ,

Restricted shell rsh, will not allow cd.

The actions of rsh are identical to those of sh, except that the following actions are not allowed:


1. Changing directories. The cd command is deactivated.

2. Specifying pathnames or command names containing a slash (/).

3. Setting the value of the PATH or the SHELL variables.

4. Redirecting output with the right-angle brackets (> and >>).

You need to plan other way...

cheers,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "