LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-07-2017, 09:45 AM   #1
Bashed
Member
 
Registered: Jul 2015
Posts: 133

Rep: Reputation: Disabled
bash issue


I think a made a minor mistake a few days ago and deleted some .bash file(s). So, when I log into SSH now it shows this instead of root@

Code:
-bash-4.1#
On a good server I see this:

Code:
lrwxrwxrwx.   1 root root    7 Jul  7  2016 bin -> usr/bin
On the server showing -bash- prompt I see this:

Code:
dr-xr-xr-x.   3 root root 4.0K Jul 19 05:02 bin
Curious, how would I fix that? They're all Centos 7 boxes.
 
Old 08-07-2017, 10:06 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,842

Rep: Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309
Quote:
On a good server I see this:
hm. Would be nice to explain which command did you execute to see this?
Quote:
On the server showing -bash- prompt I see this:
And this.
You may check the file ~/.bashrc, but I'm afraid we cannot restore it for you. From the other hand you can check man bash to see what files are processed during login.
 
Old 08-07-2017, 10:06 AM   #3
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,727

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
Quote:
Originally Posted by Bashed View Post
I think a made a minor mistake a few days ago and deleted some .bash file(s). So, when I log into SSH now it shows this instead of root@

Code:
-bash-4.1#
On a good server I see this:

Code:
lrwxrwxrwx.   1 root root    7 Jul  7  2016 bin -> usr/bin
On the server showing -bash- prompt I see this:

Code:
dr-xr-xr-x.   3 root root 4.0K Jul 19 05:02 bin
Curious, how would I fix that? They're all Centos 7 boxes.
What commands are you executing, and from which directory?
Are these the .bash* files in /root ?
Compare the .bash* files on the good server with any left on the other server and/or recreate them on the other server.
[From backup? ]
 
Old 08-07-2017, 10:18 AM   #4
Bashed
Member
 
Registered: Jul 2015
Posts: 133

Original Poster
Rep: Reputation: Disabled
Fixed. Was missing .bashrc and .bash_profile.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Bash issue please help! zcarlile Linux - Newbie 5 12-20-2013 09:37 PM
Bash script issue tibix00 Programming 22 07-21-2011 12:23 PM
[SOLVED] Bash scripting issue tubaboy Linux - Newbie 5 11-15-2010 07:41 AM
bash scripting issue thesav Programming 7 06-20-2009 02:38 AM
Installation issue with 5.2 and bash sullivjp AIX 2 07-18-2006 09:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration