bash shell for virtual server admins doesn't use .bashrc (tab completion, colors, etc)?

8 posts / 0 new
Last post
#1 Fri, 12/11/2009 - 12:13
BassKozz

bash shell for virtual server admins doesn't use .bashrc (tab completion, colors, etc)?

It's almost as if it's not using the .bashrc for the user. I checked the .bashrc for the user and it contains:

# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if [ -f /etc/bash_completion ]; then
    . /etc/bash_completion
fi

I also checked /etc/bash.bashrc and it contains:

# enable bash completion in interactive shells
#if [ -f /etc/bash_completion ]; then
#    . /etc/bash_completion
#fi

So I uncommented it to look like:

# enable bash completion in interactive shells
if [ -f /etc/bash_completion ]; then
    . /etc/bash_completion
fi

Yet my users (Virtualmin Server Admin) don't have tab completion, or colors (i.e. "ls -la /" doesn't display different colors for folders vs files etc).

When I login as my main root account (that I created when I first installed Ubuntu 8.04 server) all of these features are available?

It's probably something simple, but I can't seem to find the switch to fix this in Virtualmin. Thanks, -BassKozz

Fri, 12/11/2009 - 13:06
andreychek

Howdy,

Are you certain that your users are using the bash shell, and not something like /bin/sh?

You may want to verify which shell they have, that could certainly explain the .bash related files not being processed :-)

-Eric

Fri, 12/11/2009 - 17:23 (Reply to #2)
BassKozz

Looks like the user is using /bin/sh

$ echo $SHELL
/bin/sh

so to fix I simply: chsh -s /bin/bash exited and logged back in and it was fixed... But I don't want to have to do this everytime I add a user... is it possible to have Virtualmin default new users to /bin/bash rather then /bin/sh?

Fri, 12/11/2009 - 22:03 (Reply to #3)
andreychek

Yup! Take a peek in System Customization -> Custom Shells. It sounds like /bin/sh is setup in there, you can set it to /bin/bash.

-Eric

Fri, 12/11/2009 - 23:38 (Reply to #4)
BassKozz

That did the trick. Thanks

Mon, 08/13/2012 - 08:54
peterg

i see this is an old topic, but to follow up... 1. can i change this somewhere for all current users in one go? 2. how to tell which shell to give new users?

Mon, 08/13/2012 - 21:36 (Reply to #6)
andreychek

There's no quick and easy way to change the shell for all users, other than editing /etc/passwd.

For new users -- you can configure that in System Customization -> Custom Shells.

-Eric

Sat, 11/05/2016 - 17:19
Kangarooo

Can it made to be default for all? Or to remake for all? How to change it for each? Why its like that?

Topic locked