Results 1 to 3 of 3

Thread: "sudo -i" fails when domain is specified in 8.04

  1. #1
    Join Date
    Apr 2008
    Beans
    1
    Distro
    Ubuntu 10.04 Lucid Lynx

    "sudo -i" fails when domain is specified in 8.04

    If I specify the domain name in System->Administration->Network->General->Domain Name, this control panel seems to add the domain name after hostnames that you enter in System->Administration->Network->Hosts.

    For example, adding the hostname tetsuo leads to this in /etc/hosts:

    192.168.x.x tetsuo.domain.name

    Then, when you try to do a "sudo -i", the sudo command fails, complaining that tetsuo (without the domain name) is unknown.

    The only way to fix this seems to be to manually edit /etc/hosts and adding another alias like this:

    192.168.x.x tetsuo.domain.name tetsuo

    I'm wondering if the Network control panel can be fixed so it won't arbitrarily add the domain name to hostnames in /etc/hosts. It seems to do this everytime you save the network configuration, throwing away whatever manual edits you've made.

    Regards,

    Albertus (a2u)

  2. #2
    Join Date
    Apr 2006
    Location
    Montana
    Beans
    Hidden!
    Distro
    Kubuntu Development Release

    Re: "sudo -i" fails when domain is specified in 8.04

    Not exactly sure what you are doing, but if you are changing your hostname you need to edit both

    /etc/hostname and /etc/hosts

    you hostname needs to be the same in those two files.

    Other then that, if you are not changing your hostname, IMO best add host names (manually) in /etc/hosts as you are.
    There are two mistakes one can make along the road to truth...not going all the way, and not starting.
    --Prince Gautama Siddharta

    #ubuntuforums web interface

  3. #3
    Join Date
    Dec 2007
    Beans
    1

    Re: "sudo -i" fails when domain is specified in 8.04

    Succes!!
    Thank you

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •