#1  
Old 31st December 2010, 08:33
mitch.sanders mitch.sanders is offline
Junior Member
 
Join Date: May 2010
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default Problem With BashRC File

Hi Guys,

I am using a VM build script from http://stacklet.com/ 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:

[root@server1 [~]# ssh root@server1.domain.com
Last login: Thu Dec 30 18:34:25 2010 from 123.123.123.123
-bash-3.2# bash
root@server2 [~]#


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

Thanks in advance.
Reply With Quote
Sponsored Links
  #2  
Old 2nd January 2011, 00:32
mitch.sanders mitch.sanders is offline
Junior Member
 
Join Date: May 2010
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by mitch.sanders View Post
Thanks in advance.
Anyone have any ideas?
Reply With Quote
  #3  
Old 2nd January 2011, 01:22
jgedeon jgedeon is offline
Junior Member
 
Join Date: Jan 2011
Posts: 6
Thanks: 0
Thanked 1 Time in 1 Post
Default

Looks like your default shell isn't bash.

usermod -s /bin/bash <username>
Reply With Quote
  #4  
Old 2nd January 2011, 03:43
mitch.sanders mitch.sanders is offline
Junior Member
 
Join Date: May 2010
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by jgedeon View Post
Looks like your default shell isn't bash.

usermod -s /bin/bash <username>
Hi Jgedeon,

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

Code:
[root@server1 ~]# ssh root@server2.domain.com
Last login: Fri Dec 31 18:28:57 2010 from server1
-bash-3.2# usermod -s /bin/bash root
-bash-3.2# exit
logout
Connection to sever2.domain.com closed.
[root@server1 ~]# ssh root@server2.domain.com
Last login: Sun Jan  2 13:39:32 2011 from server1
-bash-3.2#
Reply With Quote
  #5  
Old 2nd January 2011, 04:01
jgedeon jgedeon is offline
Junior Member
 
Join Date: Jan 2011
Posts: 6
Thanks: 0
Thanked 1 Time in 1 Post
Default

What operating system is your VM running?
Reply With Quote
  #6  
Old 2nd January 2011, 04:09
mitch.sanders mitch.sanders is offline
Junior Member
 
Join Date: May 2010
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by jgedeon View Post
What operating system is your VM running?
Centos 5.5 64Bit.
Reply With Quote
  #7  
Old 2nd January 2011, 04:17
jgedeon jgedeon is offline
Junior Member
 
Join Date: Jan 2011
Posts: 6
Thanks: 0
Thanked 1 Time in 1 Post
Default

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?
Reply With Quote
  #8  
Old 2nd January 2011, 04:53
mitch.sanders mitch.sanders is offline
Junior Member
 
Join Date: May 2010
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

Quote:
Originally Posted by jgedeon View Post
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?
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.

Cheers,
Mitch
Reply With Quote
Reply

Bookmarks

Tags
bash, bashrc, issue, problem

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
All my mail is going to /var/mail/vmail _sluimers_ Installation/Configuration 21 10th January 2011 13:21
Being Spammed/Hacked/Probed not sure PLEASE HELP! kresser General 10 29th October 2010 17:25
adding mail boxes kwickcut Server Operation 20 11th August 2010 01:02
Hosting multiple websites and webmail dmwcool Installation/Configuration 8 30th March 2010 03:15
Mysterious Install Problem tgansert Installation/Configuration 5 9th May 2006 15:35


All times are GMT +2. The time now is 04:31.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.