The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Fresh install, wierd bash prompt issues

Discussion in 'General Discussion' started by ewolff, Feb 20, 2013.

  1. ewolff

    ewolff Member

    Joined:
    May 14, 2012
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Installed centos 5.7 cpanel ISO today on a test box for a project and I am haivng some issues with the bash prompt. When I log in as root I get this as a prompt: -bash-3.2#

    Running "PS1='[\u@\h \w]\$'" gives me the prompt I want, but as soon as I log out it reverts back. There was no /root/.bashrc file so I created it but it still will not inherit the settings from /etc/bashrc.

    Problem 2. Logging in as a user I get a more accurate prompt but when I use sudo to elevate the prompt does not change from $ to #. I fixed this by editing the /etc/bashrc file to look more like a standard centos bashrc with the extra cpanel fluff left in. This is now working the way I expect it to but I still get the wrong prompt when I log in as root.

    90% of the time I would use my elevated user account anyway, but I find it highly irritating that when logged in as root I can't see what directory I am in without doing a pwd.
     
  2. ewolff

    ewolff Member

    Joined:
    May 14, 2012
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Ok I just fixed it. .bash_profile was missing in /root too and I recreated that and now the root prompt is displaying properly.
     
Loading...

Share This Page