Problem With BashRC File

Discussion in 'Installation/Configuration' started by mitch.sanders, Dec 31, 2010.

  1. mitch.sanders

    mitch.sanders New Member

    Hi Guys,

    I am using a VM build script from and its great. Its a one command which will build a XEN VM for me in under 2mins I love it.

    The problem is, its built so barebone that when I ssh into the server it doesnt even load the bash environment. All commands work and what not but its just annoying to have to create a ".bashrc" file and type "bash" to reload the console everytime I ssh into a server. I will show you an example below:

    [[email protected] [~]# ssh [email protected]
    Last login: Thu Dec 30 18:34:25 2010 from
    -bash-3.2# bash
    [email protected] [~]#

    If someone could help by telling me what script/software I need to install via YUM that would be great.

    Thanks in advance.
  2. mitch.sanders

    mitch.sanders New Member

    Anyone have any ideas?
  3. jgedeon

    jgedeon New Member

    Looks like your default shell isn't bash.

    usermod -s /bin/bash <username>
  4. mitch.sanders

    mitch.sanders New Member

    Hi Jgedeon,

    Just tried doing that and still no success. See below:

    [[email protected] ~]# ssh [email protected]
    Last login: Fri Dec 31 18:28:57 2010 from server1
    -bash-3.2# usermod -s /bin/bash root
    -bash-3.2# exit
    Connection to closed.
    [[email protected] ~]# ssh [email protected]
    Last login: Sun Jan  2 13:39:32 2011 from server1
  5. jgedeon

    jgedeon New Member

    What operating system is your VM running?
  6. mitch.sanders

    mitch.sanders New Member

    Centos 5.5 64Bit.
  7. jgedeon

    jgedeon New Member

    If you do an ls -al /root/ and it does not show .bashrc you should be able to copy the default .bashrc from /etc/skel/.bashrc

    cp /etc/skel/.bashrc /root/

    Is there a .profile in the root directory also?
  8. mitch.sanders

    mitch.sanders New Member

    Hey Jgedeon,

    You are a star! :)

    I copied the .bash_profile over to the VM and then logged in and it works perfectly.

    Here I was thinking it was a peice of software I needed to installed.


Share This Page