Restricted Shell - does it still exist.

Pete French pcf at galadriel.bt.co.uk
Fri Aug 18 17:41:52 AEST 1989


>From article <20623 at adm.BRL.MIL>, by FAUSETT at tops20.radc.af.mil:
> 
> I'm looking for something like the old AT&T restricted shell (found in System
> III and possibly later?) for a Sun system.  I've got a guest user I need to 
> set up on the system with whom I have a good bit of trust, but still want to 
> discourage from poking around tyhe system.
> 
> Does anyone know if such a beastie still exists?


The restricted shell was exactly the same as the original shell - execpt it was
invoked with the name "rsh". /bin/rsh was a link to /bin/sh. On a SUn (or
any ethernet box indeed) this is a problem since rsh already exists.

The restricted shell can, luckily, still be run. You just invoke it with
a '-r' option. So put in your users .profile ...

exec sh -r

And he will have a restricted shell.
If you want yoiur user to have his own .profile that is run on shell startup
then write a C program to run as the login shell that execs /bin/sh with the
'-r' option and an argv[0] of '-sh'. The '-' in front of the name causes the
shell to run the .profile on startup.

		-Pete.



More information about the Comp.unix.questions mailing list