1846819 Members
11131 Online
110256 Solutions
New Discussion

Re: Restricted Shell

 
SOLVED
Go to solution
mvr
Regular Advisor

Restricted Shell

Hello,

I would like to lock users in their home directory. I'm confused with the rsh command. Is the rsh command restricted shell command or remote shell command ?
When I put rsh in my passwd file, user cannot login at all.
In redhat 9.0 I don't have krsh command. Please let me know what would be the correct way to configure the existing users.

Thank you,
Miro
7 REPLIES 7
Pete Randall
Outstanding Contributor

Re: Restricted Shell

Miro,

From man sh:

rsh Restricted version of the POSIX or Bourne shell command
interpreter. Sets up a login name and execution
environment whose capabilities are more controlled
(restricted) than normal user shells.



Pete


Pete
James R. Ferguson
Acclaimed Contributor

Re: Restricted Shell

Hi Miro:

If you have an 'etc/shells' file, be sure to include the restricted shell you want to use in it. If you do *not* have '/etc/shells', then by default, the following shells are valid:

/sbin/sh
/usr/bin/sh
/usr/bin/rsh
/usr/bin/ksh
/usr/bin/rksh
/usr/bin/csh
/usr/bin/keysh

Note that the "restricted" shell versions begin with "r". You transposed "rkrsh" to "krsh".

As for the "remote shell" command, that's 'remsh'. See its man pages for more information.

Regards!

...JRF...
Steve Steel
Honored Contributor

Re: Restricted Shell

Umapathy S
Honored Contributor
Solution

Re: Restricted Shell

Miro,
Adding some more.

In Linux/RH9 rsh stands for Remote shells. In hpux rsh stands for restricted shell. rsh in RH9 is bash based.

HTH,
Umapathy

Arise Awake and Stop NOT till the goal is Reached!
mvr
Regular Advisor

Re: Restricted Shell

Could be the part of a problem that I'm using SSH client to log in (putty) ? Now when I added /usr/bin/rsh in to /etc/shells, after typing the user name and password, my screnn jut go away (it closes it self).

Miro
mvr
Regular Advisor

Re: Restricted Shell

Umapathy,

Thank you, now I now that I was not going crazy!
So what would be the correct way to do this?
Do I put bash -r in a /etc/passwd file?

Miro

Umapathy S
Honored Contributor

Re: Restricted Shell

Miro,
yes, you need to put /bin/bash -r in /etc/passwd.
But the shell is highly restricted. Consult the RESTRICTED SHELL section of man pages for more info on your requirements.

HTH,
Umapathy

Arise Awake and Stop NOT till the goal is Reached!