LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices

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

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


Hi,

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
Code:
/bin/sh
/bin/bash
/sbin/nologin
/bin/bash2
/bin/ash
/bin/bsh
/bin/tcsh
/bin/csh
So I assume this will be what I need?:
Code:
#/bin/sh
/bin/bash
/sbin/nologin
#/bin/bash2
#/bin/ash
#/bin/bsh
#/bin/tcsh
#/bin/csh
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, 06:25 AM   #2
Oliv'
Senior Member
 
Registered: Jan 2004
Location: Montpellier (France)
Distribution: Gentoo
Posts: 1,014

Rep: Reputation: 36
Hello,

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

Oliv'
 
Old 12-03-2004, 10:59 AM   #3
LasseW
Member
 
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, 03:20 PM   #4
subhashb
LQ Newbie
 
Registered: Dec 2004
Posts: 3

Rep: Reputation: 0
Lightbulb

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:-)
 
  


Reply


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 10:21 AM
Is this a bug? (BASH and Z shells) KingofBLASH Linux - Software 4 09-14-2004 06:14 PM
Shells, editing and grep -- questions re: howto Jiawen Linux - Software 3 09-17-2003 03:00 PM
wait in bash shells raypen Linux - Software 1 04-18-2003 02:19 PM
bash and other linux shells crealkiller175 Linux - General 9 03-02-2003 03:02 PM


All times are GMT -5. The time now is 11:22 AM.

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