I was implementing a series of recommendations to 'harden' my linux server, involving lots and lots of changes. Linux is CentOS 6.2, kernel 2.6.32-220.*.
I'm currently using
tty5 (no X/GUI etc) switching between them via
Now when I login as root in a tty, I find I am in 'bash restricted mode'.
The first thing I checked was
/etc/passwd which still has
root:x:0:0:root:/root:/bin/bash as the first line.
My question is this:
Apart from invoking the root shell with
/bin/rbash (which didn't exist) or
/bin/bash -r is there any other way that bash can be defaulted to restricted mode?
If a particular file is unreadable or unexecutable, will bash start in restricted mode? If so, which file(s)?
Could this happen if I've botched up the SELinux security context for a particular file? (Policy is 'targeted')
I haven't listed the changes since there are far too many, my fault
nb: shell is definitely bash, since running '# ps ' lists only "bash & ps" ...