Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Whenever I open the terminal,

To run a command as administrator (user "root"), use "sudo <command>".  
See "man sudo_root" for details.

appears before the terminal. How do I get that to go away?

share|improve this question
    
Interesting. I once saw such a thing, but never on terminal I open myself. How would I get that back if I wanted it? –  MPi Jan 21 '11 at 15:41

3 Answers 3

up vote 20 down vote accepted

Once you run a sudo command, the file ~/.sudo_as_admin_successful will be created and the warning will go away. So either run a sudo command, such as sudo apt-get update or create the ~/.sudo_as_admin_successful file manually:

touch ~/.sudo_as_admin_successful

If you want the warning back for whatever reason, remove ~/.sudo_as_admin_successful:

rm ~/.sudo_as_admin_successful
share|improve this answer
    
Thanks that worked. –  mouche Jan 26 '11 at 6:05
    
Is there a way to remove this functionality completely? –  tubaguy50035 Apr 18 at 8:11

Maverick? Comment it out: sudo vim /etc/bash.bashrc. The section, commented:

# sudo hint
# if [ ! -e "$HOME/.sudo_as_admin_successful" ]; then
#     case " $(groups) " in *\ admin\ *)
#     if [ -x /usr/bin/sudo ]; then
#     cat <<-EOF
#     To run a command as administrator (user "root"), use "sudo <command>".
#     See "man sudo_root" for details.
#    
#     EOF
#     fi
#     esac
# fi

Finding the file to start:

find /etc -type f -print -exec grep "man sudo_root" {} \; | less

and then scroll though the output until you see which file contains "man sudo_root".

share|improve this answer
    
I was wondering where it was coming from, and this answers it. Thanks! –  mouche Jan 26 '11 at 6:06

This should not happen, unless you did not yet run any command using sudo (sudo echo "hello" should be enough).

If you did run a command using sudo and you don't see the file ~/.sudo_as_admin_successful, then you are probably hit by this bug.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.