[KLUG Members] restricted bash

Peter Buxton members@kalamazoolinux.org
Fri, 22 Nov 2002 10:53:23 -0500 (EST)


Just checking: am I nuts or should this work?

/bin/rbash is a symlink to /bin/bash. According to the man page, if bash
sees that it is called as rbash, it should run restricted: i.e., it should
run as if it had been called as 'bash -r'.

It does not do this on my Debian box. It does not do this on someone
else's RH 8.0 box. It sets the BASH and SHELL vars right, but is not in
restricted mode. This makes it impossible to set restricted accounts in
/etc/passwd. 'bash -r' does work properly. I suppose if we set a block in
/etc/profile:

if [ $BASH == /bin/rbash ] ; then
  exec bash -r
fi

that would work, but really, it should already -- unless I am missing
something important.

grimace:10:52:29:~$ bash --version
GNU bash, version 2.05b.0(1)-release (i386-pc-linux-gnu)
Copyright (C) 2002 Free Software Foundation, Inc.


-- 
for gpg key - http://www.killdevil.org/~peter
You can fill my head with Gummi Bears,
but I won't talk! -- Tom Servo, K13.