Comment 21 for bug 32906

Revision history for this message
Martin Pitt (pitti) wrote : Re: [Bug 32906] Re: sudo shouldn’t ABSOLUTELY NEED to look up the host it’s running on

asmoore82 [2008-03-15 19:17 -0000]:
> $ sudo -k
> # sed -i "s/pickles/foobar/g" /etc/hosts
> $ sudo true
> sudo: unable to resolve host pickles

In your comment further down you said that this broke. Why do you
think so? The -k actually worked, since in the next sudo command you
had to enter your password again:

> # hostname foobar
> $ sudo -k
> $ sudo true
> [sudo] password for asmoore:

I advise you to test sudo with something that gives visual feedback
about whether it worked or not (which is not the case with 'true' and
-k). I recommend "sudo id" and verifying that you get output adequate
for root (user id 0).

Martin

--
Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)

My 5 today: #198129 (tzdata), #189854 (gst-pulse), #200739 (bind9),
#200785 (xserver-xorg-video-nv), #189995 (langpack-locales, belocs-
locales-bin)
Do 5 a day - every day! https://wiki.ubuntu.com/5-A-Day