LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   bash issue (https://www.linuxquestions.org/questions/linux-software-2/bash-issue-4175611482/)

Bashed 08-07-2017 09:45 AM

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.

pan64 08-07-2017 10:06 AM

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.

scasey 08-07-2017 10:06 AM

Quote:

Originally Posted by Bashed (Post 5745473)
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? :)]

Bashed 08-07-2017 10:18 AM

Fixed. Was missing .bashrc and .bash_profile.


All times are GMT -5. The time now is 09:24 AM.