Web Hosting Talk







View Full Version : which shell for users/customers


greenalien
04-07-2002, 08:17 PM
I've spent the afternoon in trying to understand the differences between the different shells on unix servers but I'm still unsure. Which shell is the best (in terms of security) for the users of my servers? bash? sh?

thanks

Shyne
04-08-2002, 12:12 AM
sh is old. bash is the most used one.

Starhost
04-08-2002, 05:38 AM
I use bash. And for my root and other own accounts csh

ToastyX
04-08-2002, 05:49 AM
I don't think any is more secure than any other. Most people use bash since it's the default shell in many distributions. sh is usually a symbolic link to bash on many distributions. The others that I know of are ash, csh, ksh, and tcsh.

cyrusTvirus
04-08-2002, 06:31 AM
Giving the users shell access is a risk..... we do not grant any users shell access....

priyadi
04-08-2002, 07:02 AM
Most people are more familiar with bash. So I guess bash is a good default shell. On most system users can change their shells by themselves. On Linux the command is chsh.

Starhost
04-08-2002, 10:02 AM
I agree,

don't give all users shell access. That way you have more risks being hacked and so on! So be very very careful!

DaHOST
04-08-2002, 12:10 PM
I would go with "bash". However everyone does bring up a good point. When you grant shell access you open a whole new door when it comes to security.

jstout
04-08-2002, 12:23 PM
Most newbie users will want bash. Bash does have a larger memory footprint and will use more resources though.

Ahmad
04-08-2002, 12:52 PM
There are really no differences between shells in terms of security. Shells are just normal programs and they inherit their security properties from the login program.

Shell access can be very useful to the users. I don't see why it can cause any security problems. SSH is actually more secure than FTP. If a somebody gets the FTP password to a users account, he can delete the users files, edit them, read them, get any MySQL passwords from them, run CGI or PHP files on the server, .. etc.

billyjoe
04-08-2002, 01:23 PM
There are frequently security problems found in programs that require shell access to attempt to exploit. Unless you are really vigilant about keeping up to date on patches you may be asking for trouble. The other problem with giving shell access is the user has the potential to cause problems for other users if you haven't taken precautions. Users really need a quota set on processor time if they're able to get a shell. Otherwise you may have one user using up all the available processor and/or memory. Ahhhh, nothing like having a user open up a 1 gigabyte log file using PICO : )

stlouislouis
04-08-2002, 01:34 PM
From billyjoe:


****************
Ahhhh, nothing like having a user open up a 1 gigabyte log file using PICO : )
*******************************

Good one! LOL Imagine a user doing that with 256 to 512 MB of memory! I'm sure all the other users would be sooooo happy....not!

Take care,

Louis

Starhost
04-08-2002, 02:15 PM
Originally posted by billyjoe
There are frequently security problems found in programs that require shell access to attempt to exploit. Unless you are really vigilant about keeping up to date on patches you may be asking for trouble. The other problem with giving shell access is the user has the potential to cause problems for other users if you haven't taken precautions. Users really need a quota set on processor time if they're able to get a shell. Otherwise you may have one user using up all the available processor and/or memory. Ahhhh, nothing like having a user open up a 1 gigabyte log file using PICO : )

Speaking out of expirience? ;)

Shyne
04-08-2002, 02:39 PM
You shouldn't be really using csh or ksh, unless you want to explore it options. Just executing "top" and "pico" command is nothing big.

ToastyX
04-08-2002, 03:08 PM
I don't understand why so many people say that giving out shell access is dangerous. It's not like DOS where you have access to everything, unless you're root. CGI access is just as "dangerous" as shell access. Heck, CGI can be used to gain shell access.

billyjoe
04-08-2002, 03:10 PM
<<<<< Speaking out of expirience? >>>>>


Hehe, yeah. Basically it boils down to the need to be able to trust your users completely, and you can't usually do that.

Smirks
04-08-2002, 03:13 PM
How about requiring some sort of ID before giving the user shell access? If a user wants a shell say "Ok, but before I do that I need you to fax me a copy of your Drivers Liscense or other type of ID (passport, Visa, greencard, etc)". That way you'll weed out the bad seeds and the people who really do need it won't have a problem faxing or mailing you that info.

bitserve
04-08-2002, 09:12 PM
I agree with toastyx. Giving shell access is no less secure than giving your user CGI access. The only thing it does is enable them to use programs that require a tty.

There is generally no need for your users to be running those types of programs to publish a web site or use email. Therefore, you are opening yourself up more to an abuse of service type of problem than a security problem.

Of course, if you're not giving your users CGI access, then there is a big difference whether you give them shell acces or not.

We make it easier to micromanage our shell users by only having one shell available to them, bash.

bacid
04-08-2002, 09:53 PM
if you are going to give your users a shell, at LEAST setup "jail"

priyadi
04-08-2002, 10:23 PM
Originally posted by bacid
if you are going to give your users a shell, at LEAST setup "jail"

Jail is not always possible or practical. It requires various files and programs to be copied inside each jail, and therefore wasting a lot of resources.

bitserve
04-09-2002, 07:03 PM
Originally posted by bacid
if you are going to give your users a shell, at LEAST setup "jail"

Again, unless you are also going to "jail" their CGI access, this will not improve your security. Also, jails are not inescapable.