sudo didn't work in a fresh install of Ubuntu 5.10 Colony 4
Alexander Botero
alex.botero at gmail.com
Thu Sep 8 16:33:20 CDT 2005
Hello,
A possible diagnostic on the 'sudo' problem.
The Debian's (and Ubuntu's) version of 'sudo' terminates straight after it
has checked and failed to retrieve this machine's *long* hostname (long
hostname is also also called FQDN (Fully Qualified Domain or Host Name)).
NOTE: YOU MUST ENABLE ROOT PASSWORD BEFORE TRYING THESE TESTS.
Make a test:
a) Get current hostname of this PC (it's a short hostname)
$ hostname
084202074190
The name "084202074190" is OK. It is retrieved and set by dhcp (dhclient)
via /etc/resolv.conf and other normal network settings (what I know). And
sudo (sudo.c) gets it by gethostname(....) call.
------------------------------
b) Get current long hostname of this PC (also called FQDN)
$ hostname --fqdn
hostname: Unknown host <-------------- Oops, It failed!
(You can also say: "hostname --long")
The Ubuntus version of sudo just prints an error message and terminates
after it has failed on this check !
It should'n be so rigid.
---------------------------------
How to fix it??
Set a proper (long) hostname manually. Like this
$ su -c "hostname my.own.hostname.com <http://my.own.hostname.com/>"
( or: sudo hostname my.own.hostname.com <http://my.own.hostname.com/> )
Check it:
$ hostname --long
my.own.hostname.com <http://my.own.hostname.com/>
The original sudo command in Ubuntu Colony 4.
$ sudo
usage: sudo [-HPSb] [-p prompt] [-u username|#uid]
{ -e file [...] | -i | -s | <command> }
IT WORKS NOW.
---------------------------------------------------------------------
But do not try
$ su -c "hostname my.own.hostname.org <http://my.own.hostname.org/>"
Ubuntu's sudo command SUCKS a lot !!
On 9/8/05, billy am <wickedpuppy at gmail.com> wrote:
>
> hi ... my md5 sum of sudo matches yours yet it works .... know why?
>
> regards
> billy
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ubuntu.com/archives/ubuntu-devel/attachments/20050908/e0f3b02e/attachment.htm
More information about the ubuntu-devel
mailing list