View the Most Wanted LQ Wiki articles.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 12-03-2004, 07:04 AM   #1
LQ Newbie
Registered: Oct 2004
Posts: 7

Rep: Reputation: 0
editing /etc/shells to only allow bash


I want to only allow users to use the bash shell. This it to enforce ulimit's - which I believe only works with bash(?). So I plan to make users bash_priofile read only, and set the various ulimits on a per user basis.

Now I know I have to edit /etc/shells and by commenting out lines I can dissalow the use of various shells. This is my /etc/shell from fedora2
So I assume this will be what I need?:
Is the sh shell controllable via ulimit? Would be my 2nd question.. And the third would be should I be allowing any of these other shells?

Thanks for any advice
Old 12-03-2004, 07:25 AM   #2
Senior Member
Registered: Jan 2004
Location: Montpellier (France)
Distribution: Gentoo
Posts: 1,014

Rep: Reputation: 36

in general /bin/sh is a symlink to /bin/bash, so you probably can add it...

Old 12-03-2004, 11:59 AM   #3
Registered: Oct 2004
Distribution: Fedora 7, OpenSuse 10.2
Posts: 108

Rep: Reputation: 15
Note that the users can still change to another shell after logging in to bash by simply typing the shellname, eg csh. To prevent that you could remove the execute permissions from the shell binaries you don't want anybody to use.
Old 12-05-2004, 04:20 PM   #4
LQ Newbie
Registered: Dec 2004
Posts: 3

Rep: Reputation: 0

1) what u have done to /etc/shells is correct, if you know what you are doin'.
2) it is ok to allow all other shells :- It has been well thought and some of the most powerful shells listed there.(except ash, bsh, maybe )
3) sh can be controlled by using ulimit- see "man sh" pages:-)


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Bash and login shells Adrohak Linux - Software 3 11-18-2004 11:21 AM
Is this a bug? (BASH and Z shells) KingofBLASH Linux - Software 4 09-14-2004 07:14 PM
Shells, editing and grep -- questions re: howto Jiawen Linux - Software 3 09-17-2003 04:00 PM
wait in bash shells raypen Linux - Software 1 04-18-2003 03:19 PM
bash and other linux shells crealkiller175 Linux - General 9 03-02-2003 04:02 PM

All times are GMT -5. The time now is 02:34 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration