2 sudo messages on terminal start

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
2
down vote

favorite












On opening a new xterminal or starting bash in an already running bash, I get a surprising error message 2 times:



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

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


Since I don't invoke bash with sudo, I ask myself, where this might come from.



First suspect is of course ~/.bashrc, where I often add small functions, but grep su ~/.bashrc only reveals words containing 'su' like success and support, all of them in comments.



So I used bash -v to invoke bash in a verbose fashion.



This showed me a lot of commands, directly or indirectly triggered from .bashrc, and between the lines this:



# sudo hint
if [ ! -e "$HOME/.sudo_as_admin_successful" ] && [ ! -e "$HOME/.hushlogin" ] ; then
case " $(groups) " in * admin *|* sudo *)
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
groups
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.


except from the 3 lines after fi, this is found in /etc/bash.bashrc



Ok. That's looking for a magic file .sudo_as_admin_successful . I remembered a command



 find -empty -delete 


Issued few hours ago, but in the home directory, not where it should have been issued, but empty files - who cares?



Well, now I care.



I created a new one:



t201:~ > touch .sudo_as_admin_successful 
t201:~ > bash
t201:~ >


Error is gone. Do I need special permissions on that file? And what is .hushlogin? I don't have this either.










share|improve this question

















  • 1




    Related: Is it possible to stop .sudo_as_admin_successful being created?. As far as I know there's nothing special about the file, its ownership or permissions.
    – steeldriver
    Feb 14 at 21:27










  • I've gotten the same message when Gnome-Terminal didn't set up correctly, see askubuntu.com/questions/917299/… and bugs.launchpad.net/ubuntu/+source/gnome-terminal/+bug/1693607
    – waltinator
    Feb 15 at 2:52














up vote
2
down vote

favorite












On opening a new xterminal or starting bash in an already running bash, I get a surprising error message 2 times:



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

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


Since I don't invoke bash with sudo, I ask myself, where this might come from.



First suspect is of course ~/.bashrc, where I often add small functions, but grep su ~/.bashrc only reveals words containing 'su' like success and support, all of them in comments.



So I used bash -v to invoke bash in a verbose fashion.



This showed me a lot of commands, directly or indirectly triggered from .bashrc, and between the lines this:



# sudo hint
if [ ! -e "$HOME/.sudo_as_admin_successful" ] && [ ! -e "$HOME/.hushlogin" ] ; then
case " $(groups) " in * admin *|* sudo *)
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
groups
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.


except from the 3 lines after fi, this is found in /etc/bash.bashrc



Ok. That's looking for a magic file .sudo_as_admin_successful . I remembered a command



 find -empty -delete 


Issued few hours ago, but in the home directory, not where it should have been issued, but empty files - who cares?



Well, now I care.



I created a new one:



t201:~ > touch .sudo_as_admin_successful 
t201:~ > bash
t201:~ >


Error is gone. Do I need special permissions on that file? And what is .hushlogin? I don't have this either.










share|improve this question

















  • 1




    Related: Is it possible to stop .sudo_as_admin_successful being created?. As far as I know there's nothing special about the file, its ownership or permissions.
    – steeldriver
    Feb 14 at 21:27










  • I've gotten the same message when Gnome-Terminal didn't set up correctly, see askubuntu.com/questions/917299/… and bugs.launchpad.net/ubuntu/+source/gnome-terminal/+bug/1693607
    – waltinator
    Feb 15 at 2:52












up vote
2
down vote

favorite









up vote
2
down vote

favorite











On opening a new xterminal or starting bash in an already running bash, I get a surprising error message 2 times:



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

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


Since I don't invoke bash with sudo, I ask myself, where this might come from.



First suspect is of course ~/.bashrc, where I often add small functions, but grep su ~/.bashrc only reveals words containing 'su' like success and support, all of them in comments.



So I used bash -v to invoke bash in a verbose fashion.



This showed me a lot of commands, directly or indirectly triggered from .bashrc, and between the lines this:



# sudo hint
if [ ! -e "$HOME/.sudo_as_admin_successful" ] && [ ! -e "$HOME/.hushlogin" ] ; then
case " $(groups) " in * admin *|* sudo *)
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
groups
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.


except from the 3 lines after fi, this is found in /etc/bash.bashrc



Ok. That's looking for a magic file .sudo_as_admin_successful . I remembered a command



 find -empty -delete 


Issued few hours ago, but in the home directory, not where it should have been issued, but empty files - who cares?



Well, now I care.



I created a new one:



t201:~ > touch .sudo_as_admin_successful 
t201:~ > bash
t201:~ >


Error is gone. Do I need special permissions on that file? And what is .hushlogin? I don't have this either.










share|improve this question













On opening a new xterminal or starting bash in an already running bash, I get a surprising error message 2 times:



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

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


Since I don't invoke bash with sudo, I ask myself, where this might come from.



First suspect is of course ~/.bashrc, where I often add small functions, but grep su ~/.bashrc only reveals words containing 'su' like success and support, all of them in comments.



So I used bash -v to invoke bash in a verbose fashion.



This showed me a lot of commands, directly or indirectly triggered from .bashrc, and between the lines this:



# sudo hint
if [ ! -e "$HOME/.sudo_as_admin_successful" ] && [ ! -e "$HOME/.hushlogin" ] ; then
case " $(groups) " in * admin *|* sudo *)
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
groups
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.


except from the 3 lines after fi, this is found in /etc/bash.bashrc



Ok. That's looking for a magic file .sudo_as_admin_successful . I remembered a command



 find -empty -delete 


Issued few hours ago, but in the home directory, not where it should have been issued, but empty files - who cares?



Well, now I care.



I created a new one:



t201:~ > touch .sudo_as_admin_successful 
t201:~ > bash
t201:~ >


Error is gone. Do I need special permissions on that file? And what is .hushlogin? I don't have this either.







sudo bashrc






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Feb 14 at 19:30









user unknown

4,80622151




4,80622151







  • 1




    Related: Is it possible to stop .sudo_as_admin_successful being created?. As far as I know there's nothing special about the file, its ownership or permissions.
    – steeldriver
    Feb 14 at 21:27










  • I've gotten the same message when Gnome-Terminal didn't set up correctly, see askubuntu.com/questions/917299/… and bugs.launchpad.net/ubuntu/+source/gnome-terminal/+bug/1693607
    – waltinator
    Feb 15 at 2:52












  • 1




    Related: Is it possible to stop .sudo_as_admin_successful being created?. As far as I know there's nothing special about the file, its ownership or permissions.
    – steeldriver
    Feb 14 at 21:27










  • I've gotten the same message when Gnome-Terminal didn't set up correctly, see askubuntu.com/questions/917299/… and bugs.launchpad.net/ubuntu/+source/gnome-terminal/+bug/1693607
    – waltinator
    Feb 15 at 2:52







1




1




Related: Is it possible to stop .sudo_as_admin_successful being created?. As far as I know there's nothing special about the file, its ownership or permissions.
– steeldriver
Feb 14 at 21:27




Related: Is it possible to stop .sudo_as_admin_successful being created?. As far as I know there's nothing special about the file, its ownership or permissions.
– steeldriver
Feb 14 at 21:27












I've gotten the same message when Gnome-Terminal didn't set up correctly, see askubuntu.com/questions/917299/… and bugs.launchpad.net/ubuntu/+source/gnome-terminal/+bug/1693607
– waltinator
Feb 15 at 2:52




I've gotten the same message when Gnome-Terminal didn't set up correctly, see askubuntu.com/questions/917299/… and bugs.launchpad.net/ubuntu/+source/gnome-terminal/+bug/1693607
– waltinator
Feb 15 at 2:52















active

oldest

votes











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1006233%2f2-sudo-messages-on-terminal-start%23new-answer', 'question_page');

);

Post as a guest



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1006233%2f2-sudo-messages-on-terminal-start%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

Which professions warranted travel in Medieval times?

How do so many people here on Academia.SE, and in general, afford lavish higher education programs?

Trouble downloading packages list due to a “Hash sum mismatch” error