Default Shell

arutha

Verified User
Joined
Aug 25, 2005
Messages
38
Location
Australia
I want to change the default shell from sh to bash, I have attempted to link /bin/sh to /usr/local/bin/bash however this caused some issues with some make from ports.

Is there a way to do this? Previous threads mentioning this were never answered.
 
i've changed the default shell with adduser -C

but when i add someone from DirectAdmin it use sh default shell...what can i do?
 
Create a post-create script for DA, to change the shell immediately after creating the user. Search these forums or the DA knowledgebase for more information.

Jeff
 
thanks, initially i was unsure how this would work with users not allowed to ssh but completly forgot ssh ristrictions via allowuser in sshd_config :)

Searching the knowledge base however only found

http://help.directadmin.com/item.php?id=53

and mentions /usr/local/directadmin/scripts/custom/user_create_post.sh

which i assume is run automatically after the creation of each user

so
PHP:
chsh -s /usr/local/bin/bash ${username}

should work?
 
You can install bash from ports:

Code:
 cd /usr/ports/shells/bash2 ; make install clean
echo "/usr/local/bin/bash" >> /etc/shells

And set it as default:

Code:
 echo "defaultshell=/usr/local/bin/bash" > /etc/adduser.conf

For more info about adduser.conf see "man 5 adduser.conf"
 
see my post above, I tested it as working on my system

add to user_create_post in custom scripts and added a line to chsh -s /usr/local/bin/bash username
 
Hope it helps. jmstacey pointed me in the right direction so I spose the thanks should go to him :)
 
Just put /bin/bash or /usr/local/bin/bash as the first line in /etc/shells
 
Back
Top