2 sudo messages on terminal start
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO9GURib1T8z7lCwjOGLQaGtrueEthgQ8LO42ZX8cOfTqDK4jvDDpKkLFwf2J49kYCMNW7d4ABih_XCb_2UXdq5fPJDkoyg7-8g_YfRUot-XnaXkNYycsNp7lA5_TW9td0FFpLQ2APzKcZ/s1600/1.jpg)
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYQ0N5W1qAOxLP7t7iOM6O6AzbZnkXUy16s7P_CWfOb5UbTQY_aDsc727chyphenhyphen5W4IppVNernMMQeaUFTB_rFzAd95_CDt-tnwN-nBx6JyUp2duGjPaL5-VgNO41AVsA_vu30EJcipdDG409/s400/Clash+Royale+CLAN+TAG%2523URR8PPP.png)
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.
sudo bashrc
add a comment |Â
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.
sudo bashrc
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
add a comment |Â
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.
sudo bashrc
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
sudo bashrc
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
add a comment |Â
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
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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