Help - Search - Members - Calendar
Full Version: Preventing Shell Change
Linuxhelp > Support > Technical Support
Beethovan
Ok people, I've got another Linux security question for ya! I have setup my box as a server using ssh. I've made each user use rbash shell. i've disabled all the available shells except for rbash (duh), bash, and sh. If I disable bash or sh, all shells above them die (i.e., if i disable sh, bash and rbash die, if bash is disabled, rbash dies). I need to know how to prevent users from switching shells out. i dont know if sudo would work for this, but i need to keep them from accessing it. Any help would be greatly appreciated. Thanks.

Thomas
Corey
I don't know much about shells and how (or if) they interact with each other. The only thing I can think of off the top of my head is just change the permssions of the bash and sh executables to 700.

eg.
chmod 700 /bin/bash
chmod 700 /bin/sh

That will let root have RWX perms on them and no one else has any. This might not be a proper fix, and I don't know if it'll break anything else. Your best bet is to try it and wait to see if there are any problems.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2017 Invision Power Services, Inc.