/usr/bin/ksh default -- can this be changed?

5 posts / 0 new
Last post
#1 Thu, 10/18/2007 - 22:29
markedwards

/usr/bin/ksh default -- can this be changed?

What is the reasoning behind making /usr/bin/ksh the default shell for server administrators? Shouldn't /bin/bash be the default on systems like Debian and Ubuntu where it is the default shell?

I have searched for where this default setting is located, in vain. How can I change it?

Thanks!

Fri, 10/19/2007 - 05:57
jaldeguer

You can find it in webmin,system,users and groups,username you want to apply change,shell then click on the drop down arrow to change your default shell.

Fri, 10/19/2007 - 20:06 (Reply to #2)
markedwards

Right, but I don't want users being created with ksh as the default shell. I want the system default shell. Why does Virtualmin insist on ksh, when it isn't even installed on my system??

Sat, 10/20/2007 - 12:13 (Reply to #3)
Joe
Joe's picture

Don't be ridiculous. Virtualmin isn't insisting on anything. We certainly don't have a preference for ksh (I've never used ksh in my life, as far as I know). ;-)

On all of my systems it uses /bin/sh (which is bash on Linux systems), by default, because that's what is first in the /etc/shells list. And, of course, as jaldeguer hinted, but didn't quite get to the heart of the matter, the default for Webmin created users can be configured in the Module Configuration for the Users and Groups module. Look in the "New user defaults" section for the option labeled "Default shell for new users".

I'm not sure why ksh would be the first shell listed in /etc/shells on your system, but that's the source of the confusion here. Since "default" shell on Linux and UNIX systems is not a well-defined concept (it depends on the adduser or useradd command in use, which is different on most UNIX systems), and often not even configurable on a system-wide basis, Webmin merely guesses based on the contents of /etc/shells.

Virtualmin is not out to get you, or make you use a funny shell. ;-)

--

Check out the forum guidelines!

Sat, 10/20/2007 - 13:21
markedwards

Well, I certainly didn't mean to offend. Oddly, the first shell in my /etc/shells is /bin/csh. /usr/local/ksh is fourth.

I set /bin/bash in Virtualmin's Module Config - Defaults for New Domains, and it works.

Oddly, that setting was defaulted to /bin/sh, but domains were getting created with /usr/local/ksh as the admin user shell. When I chose /bin/sh again and saved, it started using /bin/sh. Now I set it to /bin/bash and its good.

Perhaps something got bungled in my install, but this could be a bug.