[Bug 113778] Re: Changing hostname using hostname breaks sudo

2008-05-06 Thread FLavoie
*** This bug is a duplicate of bug 32906 ***
https://bugs.launchpad.net/bugs/32906

I have the same problem on 8.04 server 64bit

# sudo hostname mynewhostname
No change at all

# sudo sysctl kernel.hostname=mynewhostname

Then I cannot sudo anymore and the hostname never get changes. (I need
to reboot)

To change the hostname I need to sudo bash, then modify both
/etc/hostname and /etc/hosts

-- 
Changing hostname using hostname breaks sudo
https://bugs.launchpad.net/bugs/113778
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 113778] Re: Changing hostname using hostname breaks sudo

2008-03-05 Thread Martin Pitt
*** This bug is a duplicate of bug 32906 ***
https://bugs.launchpad.net/bugs/32906

** This bug is no longer a duplicate of bug 197494
   unresolvable hostname breaks system

** This bug has been marked a duplicate of bug 32906
   sudo shouldn’t ABSOLUTELY NEED to look up the host it’s running on

-- 
Changing hostname using hostname breaks sudo
https://bugs.launchpad.net/bugs/113778
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 113778] Re: Changing hostname using hostname breaks sudo

2008-03-01 Thread Cody A.W. Somerville
*** This bug is a duplicate of bug 197494 ***
https://bugs.launchpad.net/bugs/197494

** This bug has been marked a duplicate of bug 197494
   unresolvable hostname breaks system

-- 
Changing hostname using hostname breaks sudo
https://bugs.launchpad.net/bugs/113778
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 113778] Re: Changing hostname using hostname breaks sudo

2007-08-08 Thread rashelleym
Using Dapper Drake 6.06 LTS for 386 architecture, I edited
/etc/hostname directly, and somewhat later discovered that I was locked
out of sudo with the message sudo: unable to lookup [new server name
via gethostbyname(), after (I believe) at least one restart.  I had no
idea a script should be invoked when the hostname is changed.

Pat72's comment about simply sudoing the same command over and over
allowed me to unlock it, after between 10 and 20 tries.  So this method
of bug reporting seems good to participate in, even to the minor extent
of clarifying that it seems to happen when /etc/hostname is directly
edited, too.

-- 
Changing hostname using hostname breaks sudo
https://bugs.launchpad.net/bugs/113778
You received this bug notification because you are a member of Ubuntu
Bugs, which is the bug contact for Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 113778] Re: Changing hostname using hostname breaks sudo

2007-06-08 Thread pat72
If you keep entering the same command with sudo, after a few times of
sudo: unable to lookup $HOSTNAME via gethostbyname() system asks for the
password and you can execute the command. I had to edit /etc/hosts
/etc/hostname and run /etc/init.d/hostname start to have my sudo working
correctly (and my hostname changed)

-- 
Changing hostname using hostname breaks sudo
https://bugs.launchpad.net/bugs/113778
You received this bug notification because you are a member of Ubuntu
Bugs, which is the bug contact for Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 113778] Re: Changing hostname using hostname breaks sudo

2007-06-08 Thread Massimo Forti
Hi  Công.  understand:

How to change the hostname of a Linux system

Normally we will set the hostname of a system during the installation
process. Many peoples don’t care about this, and don’t change the
hostname even if for example this was set to something really stupid by
the datacenter that installed the system (most likely they will set this
to “debian” on any debian installation, etc). For me, it is important to
see on each one of the ssh screens I will have open at any time a
different hostname that is relevant and will give me quickly the
information on what system I am logged in.

Change the hostname on a running system

On any Linux system you can change its hostname with the command
‘hostname‘ (surprised?)… Here are some quick usages of the command line
hostname:

hostname

without any parameter it will output the current hostname of the system.

hostname --fqdit

 will output the fully qualified domain name (or FQDN) of the system.

hostname NEW_NAME

will set the hostname of the system to NEW_NAME. This is active right
away and will remain like that until the system will be rebooted
(because at system boot it will set this from some particular file
configurations - see bellow how to set this permanently). You will most
probably need to exit the current shell in order to see the change in
your shell prompt.

Permanent hostname change on Debian based systems
Debian based systems use the file /etc/hostname to read the hostname of the 
system at boot time and set it up using the init script /etc/init.d/hostname.sh

/etc/hostname
serverSo on a Debian based system we can edit the file /etc/hostname and change 
the name of the system and then run:

/etc/init.d/hostname.sh startto make the change active. The hostname
saved in this file (/etc/hostname) will be preserved on system reboot
(and will be set using the same script we used hostname.sh).

Permanent hostname change on RedHat based systems
RedHat based system use the file /etc/sysconfig/network to read the saved 
hostname at system boot. This is set using the init script /etc/rc.d/rc.sysinit

/etc/sysconfig/network
NETWORKING=yes
HOSTNAME=”plain.domainname.com”
GATEWAY=”192.168.0.1″
GATEWAYDEV=”eth0″
FORWARD_IPV4=”yes”So in order to preserve your change on system reboot edit 
this file and enter the appropriate name using the HOSTNAME variable.

Use sysctl to change the hostname
Why would someone need a different method of doing the same thing as above? No 
idea, but here is anyway: use sysctl to change the variable kernel.hostname:
Use:

sysctl kernel.hostnameto read the current hostname, and

sysctl kernel.hostname=NEW_HOSTNAMEto change it.

-- 
Changing hostname using hostname breaks sudo
https://bugs.launchpad.net/bugs/113778
You received this bug notification because you are a member of Ubuntu
Bugs, which is the bug contact for Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 113778] Re: Changing hostname using hostname breaks sudo

2007-06-08 Thread Massimo Forti
You can read that the only hostname command doesn't change the file
/etc/hostname, but set the hostname on the way if you need to change it.
If you want change the file you can use the last istruction.

After this I don't think this is a realy bug. Thanks many for your help.

-- 
Changing hostname using hostname breaks sudo
https://bugs.launchpad.net/bugs/113778
You received this bug notification because you are a member of Ubuntu
Bugs, which is the bug contact for Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 113778] Re: Changing hostname using hostname breaks sudo

2007-05-24 Thread Công
I try to change my host name, and file hostname wasn't updated :)

[EMAIL PROTECTED]:~# cat /etc/hostname
myhost
[EMAIL PROTECTED]:~# hostname
myhost
[EMAIL PROTECTED]:~# sudo hostname newhost
[EMAIL PROTECTED]:~# cat /etc/hostname
myhost
[EMAIL PROTECTED]:~# hostname
newhost

Any idea?

-- 
Changing hostname using hostname breaks sudo
https://bugs.launchpad.net/bugs/113778
You received this bug notification because you are a member of Ubuntu
Bugs, which is the bug contact for Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 113778] Re: Changing hostname using hostname breaks sudo

2007-05-18 Thread Massimo Forti
** Changed in: hostname (Ubuntu)
 Assignee: (unassigned) = Massimo Forti

-- 
Changing hostname using hostname breaks sudo
https://bugs.launchpad.net/bugs/113778
You received this bug notification because you are a member of Ubuntu
Bugs, which is the bug contact for Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 113778] Re: Changing hostname using hostname breaks sudo

2007-05-16 Thread Massimo Forti
** Changed in: hostname (Ubuntu)
 Assignee: Massimo Forti = (unassigned)

-- 
Changing hostname using hostname breaks sudo
https://bugs.launchpad.net/bugs/113778
You received this bug notification because you are a member of Ubuntu
Bugs, which is the bug contact for Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 113778] Re: Changing hostname using hostname breaks sudo

2007-05-14 Thread Massimo Forti
The hostname command reponds with errors ??? If it isn't, you can attach
yor syslog file and messages file after you have done this command.
Thanks

-- 
Changing hostname using hostname breaks sudo
https://bugs.launchpad.net/bugs/113778
You received this bug notification because you are a member of Ubuntu
Bugs, which is the bug contact for Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 113778] Re: Changing hostname using hostname breaks sudo

2007-05-10 Thread Yann Hamon
In fact it doesn't change the /etc/hostname neither, I don't know the
file hostname actually changes.

-- 
Changing hostname using hostname breaks sudo
https://bugs.launchpad.net/bugs/113778
You received this bug notification because you are a member of Ubuntu
Bugs, which is the bug contact for Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 113778] Re: Changing hostname using hostname breaks sudo

2007-05-10 Thread Massimo Forti
Thanks for your bug report, which version of Ubuntu/Kubuntu you are
using. Have you tryed to change you host name with the network tool to
see the result ???

Thanks

** Changed in: hostname (Ubuntu)
 Assignee: (unassigned) = Massimo Forti
   Status: Unconfirmed = Needs Info

-- 
Changing hostname using hostname breaks sudo
https://bugs.launchpad.net/bugs/113778
You received this bug notification because you are a member of Ubuntu
Bugs, which is the bug contact for Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 113778] Re: Changing hostname using hostname breaks sudo

2007-05-10 Thread Yann Hamon
That's actually on Feisty 64 bits server... So i did not try the network tool.
I remember having the same issue some time ago with... I am not sure if it was 
sarge or dapper..

-- 
Changing hostname using hostname breaks sudo
https://bugs.launchpad.net/bugs/113778
You received this bug notification because you are a member of Ubuntu
Bugs, which is the bug contact for Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs