|
Bugzilla – Full Text Bug Listing |
| Summary: | SUDO_PS1 is ignored | ||
|---|---|---|---|
| Product: | Sudo | Reporter: | Bracken Dawson <abdawson> |
| Component: | Sudo | Assignee: | Todd C. Miller <Todd.Miller> |
| Status: | RESOLVED WORKSFORME | ||
| Severity: | enhancement | ||
| Priority: | low | ||
| Version: | 1.6.9 | ||
| Hardware: | PC | ||
| OS: | Linux | ||
Works fine for me. Perhaps you have SUDO_PS1 set but not exported. exported...
bracken@eeepc:~$ export SUDO_PS1='doesntworkforme'
bracken@eeepc:~$ echo $SUDO_PS1
doesntworkforme
bracken@eeepc:~$ sudo -s
root@eeepc:~# echo $SUDO_PS1
root@eeepc:~# echo $PS1
\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$
root@eeepc:~# exit
bracken@eeepc:~$ env
SUDO_PS1=doesntworkforme
KDE_MULTIHEAD=false
and so on....
|
SUDO_PS1 is set in .bashrc (tried .profile, and both files for root). Trying to make the username@host red during "sudo -s", but it just uses $PS1. debug: bracken@testvbox:~$ sudo -s root@testvbox:~# echo $PS1 \[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ root@testvbox:~# echo $SUDO_PS1 ${debian_chroot:+($debian_chroot)}\[\033[01;31m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$