Please support VectorLinux!

Author Topic: When logged in as root "echo $USER" returns "VL70"  (Read 1719 times)

fogpipe

  • Vectorite
  • ***
  • Posts: 105
When logged in as root "echo $USER" returns "VL70"
« on: May 17, 2012, 10:28:27 am »
so im doing ssh and ssh X forwarding between two machines. I use different color prompts for users and root and this command in .bashrc
Quote
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME} ${PWD}\007"'
so that the machine im working on is echoed in the title bar of the xterm im using.
On the vl6 machine, when logged in as root, the user appears as "root" in the title bar, when im logged in to the vl7 machine, the user appears as "vl70". How do i fix this? Where is the value of $USER being set to "vl70"?

M0E-lnx

  • Administrator
  • Vectorian
  • *****
  • Posts: 3208
Re: When logged in as root "echo $USER" returns "VL70"
« Reply #1 on: May 17, 2012, 10:31:25 am »
For some reason, this was left like that.

Edit your /root/.bashrc and remove the line that says
Code: [Select]
export USER="vl70"
log out and back in as root and it should be fixed.

fogpipe

  • Vectorite
  • ***
  • Posts: 105
Re: When logged in as root "echo $USER" returns "VL70"
« Reply #2 on: May 17, 2012, 11:22:55 am »
Duh :) if it would have been a snake it would have bit me.

Thanks