I need to change the host name on a test server, and in the past when I used hostname to change the hostname, it did not seem to change it everywhere.
I really don't want to do a rebuild just yet, but I have to feel confident that hostname is really changed (reboot is not too much of an issue).
What is the recommened practice? Other than get it right the first time.
On 02/14/2013 01:11 PM, Robert Moskowitz wrote:
I need to change the host name on a test server, and in the past when I used hostname to change the hostname, it did not seem to change it everywhere.
I really don't want to do a rebuild just yet, but I have to feel confident that hostname is really changed (reboot is not too much of an issue).
What is the recommened practice? Other than get it right the first time.
To make the change permanent, edit /etc/ssyconfig/network and set the desired hostname after HOSTNAME=.
On 02/14/2013 01:13 PM, Digimer wrote:
On 02/14/2013 01:11 PM, Robert Moskowitz wrote:
I need to change the host name on a test server, and in the past when I used hostname to change the hostname, it did not seem to change it everywhere.
I really don't want to do a rebuild just yet, but I have to feel confident that hostname is really changed (reboot is not too much of an issue).
What is the recommened practice? Other than get it right the first time.
To make the change permanent, edit /etc/ssyconfig/network and set the desired hostname after HOSTNAME=.
Sorry, I typo'd that;
# cat /etc/sysconfig/network NETWORKING=yes HOSTNAME=<your.new.hostname>
On Thu, Feb 14, 2013 at 12:15 PM, Digimer lists@alteeve.ca wrote:
On 02/14/2013 01:13 PM, Digimer wrote:
On 02/14/2013 01:11 PM, Robert Moskowitz wrote:
I need to change the host name on a test server, and in the past when I used hostname to change the hostname, it did not seem to change it everywhere.
I really don't want to do a rebuild just yet, but I have to feel confident that hostname is really changed (reboot is not too much of an issue).
What is the recommened practice? Other than get it right the first time.
To make the change permanent, edit /etc/ssyconfig/network and set the desired hostname after HOSTNAME=.
Sorry, I typo'd that;
# cat /etc/sysconfig/network NETWORKING=yes HOSTNAME=<your.new.hostname>
This will get picked up on the next reboot. You will have to use the hostname command to make it take effect immediately, but some applications only pick it up when they start so things like your login prompt won't change until the next login.
On Thu, Feb 14, 2013 at 12:15 PM, Digimer lists@alteeve.ca wrote:
On 02/14/2013 01:13 PM, Digimer wrote:
On 02/14/2013 01:11 PM, Robert Moskowitz wrote:
I need to change the host name on a test server, and in the past when I used hostname to change the hostname, it did not seem to change it everywhere.
I really don't want to do a rebuild just yet, but I have to feel confident that hostname is really changed (reboot is not too much of an issue).
What is the recommened practice? Other than get it right the first time.
To make the change permanent, edit /etc/ssyconfig/network and set the desired hostname after HOSTNAME=.
Sorry, I typo'd that;
# cat /etc/sysconfig/network NETWORKING=yes HOSTNAME=<your.new.hostname>
This will get picked up on the next reboot. You will have to use the hostname command to make it take effect immediately, but some applications only pick it up when they start so things like your login prompt won't change until the next login.
One could also run "service network restart" to have it take a more immediate effect.
The disconnect from the network is momentarily, and one's session isn't even severed.
On Thu, Feb 14, 2013 at 1:15 PM, Digimer lists@alteeve.ca wrote:
On 02/14/2013 01:13 PM, Digimer wrote:
On 02/14/2013 01:11 PM, Robert Moskowitz wrote:
I need to change the host name on a test server, and in the past when I used hostname to change the hostname, it did not seem to change it everywhere.
I really don't want to do a rebuild just yet, but I have to feel confident that hostname is really changed (reboot is not too much of an issue).
What is the recommened practice? Other than get it right the first time.
To make the change permanent, edit /etc/ssyconfig/network and set the desired hostname after HOSTNAME=.
Sorry, I typo'd that;
# cat /etc/sysconfig/network NETWORKING=yes HOSTNAME=<your.new.hostname>
-- Digimer
You also probably want to update /etc/hosts, though it strictly does not itself set the hostname for the machine.
❧ Brian Mathis
I goofed again after a rebuild from a kickstart so had to rename yet again, see below:
On 02/14/2013 01:13 PM, Digimer wrote:
On 02/14/2013 01:11 PM, Robert Moskowitz wrote:
I need to change the host name on a test server, and in the past when I used hostname to change the hostname, it did not seem to change it everywhere.
I really don't want to do a rebuild just yet, but I have to feel confident that hostname is really changed (reboot is not too much of an issue).
What is the recommened practice? Other than get it right the first time.
To make the change permanent, edit /etc/ssyconfig/network and set the desired hostname after HOSTNAME=.
I did this and rebooted, but /etc/sysconfig/network-scripts/ifcfg-eth0 was not changed. NetworkManager does not seem to have a dialog for changing it there. I manually edited the file. When I saved the file, NM seems to have noticed the change and auto-restarted the interface.
On Fri, Feb 15, 2013 at 11:27 AM, Robert Moskowitz rgm@htt-consult.com wrote:
I goofed again after a rebuild from a kickstart so had to rename yet again, see below:
On 02/14/2013 01:13 PM, Digimer wrote:
On 02/14/2013 01:11 PM, Robert Moskowitz wrote:
I need to change the host name on a test server, and in the past when I used hostname to change the hostname, it did not seem to change it everywhere.
I really don't want to do a rebuild just yet, but I have to feel confident that hostname is really changed (reboot is not too much of an issue).
What is the recommened practice? Other than get it right the first time.
To make the change permanent, edit /etc/ssyconfig/network and set the desired hostname after HOSTNAME=.
I did this and rebooted, but /etc/sysconfig/network-scripts/ifcfg-eth0 was not changed. NetworkManager does not seem to have a dialog for changing it there. I manually edited the file. When I saved the file, NM seems to have noticed the change and auto-restarted the interface.
If you aren't moving this box around onto different networks all the time just get rid of NetworkManager so it will stop screwing up your settings.
On 02/15/2013 12:46 PM, Les Mikesell wrote:
On Fri, Feb 15, 2013 at 11:27 AM, Robert Moskowitz rgm@htt-consult.com wrote:
I goofed again after a rebuild from a kickstart so had to rename yet again, see below:
On 02/14/2013 01:13 PM, Digimer wrote:
On 02/14/2013 01:11 PM, Robert Moskowitz wrote:
I need to change the host name on a test server, and in the past when I used hostname to change the hostname, it did not seem to change it everywhere.
I really don't want to do a rebuild just yet, but I have to feel confident that hostname is really changed (reboot is not too much of an issue).
What is the recommened practice? Other than get it right the first time.
To make the change permanent, edit /etc/ssyconfig/network and set the desired hostname after HOSTNAME=.
I did this and rebooted, but /etc/sysconfig/network-scripts/ifcfg-eth0 was not changed. NetworkManager does not seem to have a dialog for changing it there. I manually edited the file. When I saved the file, NM seems to have noticed the change and auto-restarted the interface.
If you aren't moving this box around onto different networks all the time just get rid of NetworkManager so it will stop screwing up your settings.
That will take me back a few years in what I am doing! What do I gain with this?
Do I just erase NetworkManager for this?
In kickstart do I specify to exclude it (-NetworkManager)
I go back to 'service network restart'?
On Fri, Feb 15, 2013 at 12:04 PM, Robert Moskowitz rgm@htt-consult.com wrote:
I goofed again after a rebuild from a kickstart so had to rename yet again, see below:
On 02/14/2013 01:13 PM, Digimer wrote:
On 02/14/2013 01:11 PM, Robert Moskowitz wrote:
I need to change the host name on a test server, and in the past when I used hostname to change the hostname, it did not seem to change it everywhere.
I really don't want to do a rebuild just yet, but I have to feel confident that hostname is really changed (reboot is not too much of an issue).
What is the recommened practice? Other than get it right the first time.
To make the change permanent, edit /etc/ssyconfig/network and set the desired hostname after HOSTNAME=.
I did this and rebooted, but /etc/sysconfig/network-scripts/ifcfg-eth0 was not changed. NetworkManager does not seem to have a dialog for changing it there. I manually edited the file. When I saved the file, NM seems to have noticed the change and auto-restarted the interface.
If you aren't moving this box around onto different networks all the time just get rid of NetworkManager so it will stop screwing up your settings.
That will take me back a few years in what I am doing! What do I gain with this?
Do I just erase NetworkManager for this?
In kickstart do I specify to exclude it (-NetworkManager)
I go back to 'service network restart'?
NetworkManager is handy for a laptop where you want to deal with different wifi settings and moving around among dhcp networks, but for servers you probably don't want it to overwrite your static configs and /etc/resolv.conf, etc. I've usually let it install but then service NetworkManger stop chkconfig NetworkManager off to keep it from running when I set static configs. I'm not sure what happens if you don't install it at all - that would probably be even better.
On 02/15/2013 01:12 PM, Les Mikesell wrote:
On Fri, Feb 15, 2013 at 12:04 PM, Robert Moskowitz rgm@htt-consult.com wrote:
I goofed again after a rebuild from a kickstart so had to rename yet again, see below:
On 02/14/2013 01:13 PM, Digimer wrote:
On 02/14/2013 01:11 PM, Robert Moskowitz wrote:
I need to change the host name on a test server, and in the past when I used hostname to change the hostname, it did not seem to change it everywhere.
I really don't want to do a rebuild just yet, but I have to feel confident that hostname is really changed (reboot is not too much of an issue).
What is the recommened practice? Other than get it right the first time.
To make the change permanent, edit /etc/ssyconfig/network and set the desired hostname after HOSTNAME=.
I did this and rebooted, but /etc/sysconfig/network-scripts/ifcfg-eth0 was not changed. NetworkManager does not seem to have a dialog for changing it there. I manually edited the file. When I saved the file, NM seems to have noticed the change and auto-restarted the interface.
If you aren't moving this box around onto different networks all the time just get rid of NetworkManager so it will stop screwing up your settings.
That will take me back a few years in what I am doing! What do I gain with this?
Do I just erase NetworkManager for this?
In kickstart do I specify to exclude it (-NetworkManager)
I go back to 'service network restart'?
NetworkManager is handy for a laptop where you want to deal with different wifi settings and moving around among dhcp networks, but for servers you probably don't want it to overwrite your static configs and /etc/resolv.conf, etc. I've usually let it install but then service NetworkManger stop chkconfig NetworkManager off
And when you edit ifcfg-eth0 what command restarts the interface?
to keep it from running when I set static configs. I'm not sure what happens if you don't install it at all - that would probably be even better.
On Fri, Feb 15, 2013 at 12:26 PM, Robert Moskowitz rgm@htt-consult.com wrote:
And when you edit ifcfg-eth0 what command restarts the interface?
ifdown eth0 ifup eth0
If you are changing related routes or the MAC address, do the down before the change so the right values are seen. If you change something that doesn't affect the address you can usually stay connected if you put both commands on one line with a ; separator.
On 02/15/2013 01:35 PM, Les Mikesell wrote:
On Fri, Feb 15, 2013 at 12:26 PM, Robert Moskowitz rgm@htt-consult.com wrote:
And when you edit ifcfg-eth0 what command restarts the interface?
ifdown eth0 ifup eth0
If you are changing related routes or the MAC address, do the down before the change so the right values are seen. If you change something that doesn't affect the address you can usually stay connected if you put both commands on one line with a ; separator.
Shows how long it has been. A dah moment when I saw your response.
Robert Moskowitz wrote:
On 02/15/2013 01:35 PM, Les Mikesell wrote:
On Fri, Feb 15, 2013 at 12:26 PM, Robert Moskowitz rgm@htt-consult.com wrote:
And when you edit ifcfg-eth0 what command restarts the interface?
ifdown eth0 ifup eth0
If you are changing related routes or the MAC address, do the down before the change so the right values are seen. If you change something that doesn't affect the address you can usually stay connected if you put both commands on one line with a ; separator.
Shows how long it has been. A dah moment when I saw your response.
Oh, and if you're changing the MAC, don't forget, as of CentOS 6, to edit /etc/udev/rules.d/70-persistent-net.rules. If you don't, you're hosed.
And then there's the new Dell boxen, which come up with em1 rather than eth0....
mark
On Fri, 15 Feb 2013, m.roth@5-cent.us wrote:
Robert Moskowitz wrote:
On 02/15/2013 01:35 PM, Les Mikesell wrote:
On Fri, Feb 15, 2013 at 12:26 PM, Robert Moskowitz rgm@htt-consult.com wrote:
And when you edit ifcfg-eth0 what command restarts the interface?
ifdown eth0 ifup eth0
If you are changing related routes or the MAC address, do the down before the change so the right values are seen. If you change something that doesn't affect the address you can usually stay connected if you put both commands on one line with a ; separator.
Shows how long it has been. A dah moment when I saw your response.
Oh, and if you're changing the MAC, don't forget, as of CentOS 6, to edit /etc/udev/rules.d/70-persistent-net.rules. If you don't, you're hosed.
That has not been my experience? We have a bunch of mini-itx machines with realtek cards in them that have a high failure rate. I have been swapping them for intel cards. I have never messed with the udev rules. All I do is edit the HWADDR line in /etc/sysconfig/network-scripts/ifcfg-eth* to show the new MAC. I then shutdown the machine, replace the NIC and restart.
These are headless C-6 machines built from a ks.cfg file. Metworkmangler never gets installed.
What is messing with udev rules supposed to be necessary?
Regards,
On Fri, Feb 15, 2013 at 2:09 PM, me@tdiehl.org wrote:
Oh, and if you're changing the MAC, don't forget, as of CentOS 6, to edit /etc/udev/rules.d/70-persistent-net.rules. If you don't, you're hosed.
That has not been my experience? We have a bunch of mini-itx machines with realtek cards in them that have a high failure rate. I have been swapping them for intel cards. I have never messed with the udev rules. All I do is edit the HWADDR line in /etc/sysconfig/network-scripts/ifcfg-eth* to show the new MAC. I then shutdown the machine, replace the NIC and restart.
These are headless C-6 machines built from a ks.cfg file. Metworkmangler never gets installed.
What is messing with udev rules supposed to be necessary?
You should have a line in /etc/udev/rules.d/70-persistent-net.rules that associates the MAC address with the eth? name for each of your NICs. Certain things (like removing the file, and maybe some hardware changes) will make it be reconstructed during boot and if you only have one NIC you wouldn't have much chance of it being wrong. But, if the name set there doesn't match the name of the /etc/sysconfig/network-scripts/ifcfg-eth* file with the correct MAC address, that interface should not start.
On Fri, 15 Feb 2013, Les Mikesell wrote:
On Fri, Feb 15, 2013 at 2:09 PM, me@tdiehl.org wrote:
Oh, and if you're changing the MAC, don't forget, as of CentOS 6, to edit /etc/udev/rules.d/70-persistent-net.rules. If you don't, you're hosed.
That has not been my experience? We have a bunch of mini-itx machines with realtek cards in them that have a high failure rate. I have been swapping them for intel cards. I have never messed with the udev rules. All I do is edit the HWADDR line in /etc/sysconfig/network-scripts/ifcfg-eth* to show the new MAC. I then shutdown the machine, replace the NIC and restart.
These are headless C-6 machines built from a ks.cfg file. Metworkmangler never gets installed.
What is messing with udev rules supposed to be necessary?
You should have a line in /etc/udev/rules.d/70-persistent-net.rules that associates the MAC address with the eth? name for each of your NICs. Certain things (like removing the file, and maybe some hardware changes) will make it be reconstructed during boot and if you only have one NIC you wouldn't have much chance of it being wrong. But, if the name set there doesn't match the name of the /etc/sysconfig/network-scripts/ifcfg-eth* file with the correct MAC address, that interface should not start.
Empirical evidence seems to suggest that if the correct udev entry is missing udev will create the entry on its own.
FWIW, the cards I am changing out have 3 ports on them and again after doing 15 of these, I have never messed with udev.
I did not even know about this "problem" until I read about it on this list.
Interestingly enough, I just looked at the udev file and it contains not only the new mac addresses but also the old ones.
For example the entries for eth1 looks like the following:
# PCI device 0x10ec:0x8167 (r8169) SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:30:18:a9:e4:ad", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
# PCI device 0x8086:0x1076 (e1000) (custom name provided by external tool) SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:30:18:a4:eb:d0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
I did not put any of these entries in there and I wonder what "external tool" is providing the "custom name"?
Is there anyone here who actually knows how this is supposed to work?
Regards,
On Fri, Feb 15, 2013 at 10:16 PM, me@tdiehl.org wrote:
What is messing with udev rules supposed to be necessary?
You should have a line in /etc/udev/rules.d/70-persistent-net.rules that associates the MAC address with the eth? name for each of your NICs. Certain things (like removing the file, and maybe some hardware changes) will make it be reconstructed during boot and if you only have one NIC you wouldn't have much chance of it being wrong. But, if the name set there doesn't match the name of the /etc/sysconfig/network-scripts/ifcfg-eth* file with the correct MAC address, that interface should not start.
Empirical evidence seems to suggest that if the correct udev entry is missing udev will create the entry on its own.
FWIW, the cards I am changing out have 3 ports on them and again after doing 15 of these, I have never messed with udev.
I did not even know about this "problem" until I read about it on this list.
From what I've seen, the ports on a single card will be detected in
the same order every time. The issue is that if you have some motherboard NICs and one or more pci cards, the order of detection of the groups will be a matter of chance. Our servers mostly have some Broadcomm's on the MB plus a few multi-port Intel cards. If you remove the udev rules, there is no way to know whether the MB NICs or the add-ons will be eth0 and eth1.
Interestingly enough, I just looked at the udev file and it contains not only the new mac addresses but also the old ones.
For example the entries for eth1 looks like the following:
# PCI device 0x10ec:0x8167 (r8169) SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:30:18:a9:e4:ad", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
# PCI device 0x8086:0x1076 (e1000) (custom name provided by external tool) SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:30:18:a4:eb:d0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
I did not put any of these entries in there and I wonder what "external tool" is providing the "custom name"?
Don't know about the tool, but note that this would come out differently if you added the new card, booted, then shut down and removed the old card.
Is there anyone here who actually knows how this is supposed to work?
Randomly, I guess...
On Fri, 15 Feb 2013, Les Mikesell wrote:
On Fri, Feb 15, 2013 at 10:16 PM, me@tdiehl.org wrote:
What is messing with udev rules supposed to be necessary?
You should have a line in /etc/udev/rules.d/70-persistent-net.rules that associates the MAC address with the eth? name for each of your NICs. Certain things (like removing the file, and maybe some hardware changes) will make it be reconstructed during boot and if you only have one NIC you wouldn't have much chance of it being wrong. But, if the name set there doesn't match the name of the /etc/sysconfig/network-scripts/ifcfg-eth* file with the correct MAC address, that interface should not start.
Empirical evidence seems to suggest that if the correct udev entry is missing udev will create the entry on its own.
FWIW, the cards I am changing out have 3 ports on them and again after doing 15 of these, I have never messed with udev.
I did not even know about this "problem" until I read about it on this list.
From what I've seen, the ports on a single card will be detected in
the same order every time. The issue is that if you have some motherboard NICs and one or more pci cards, the order of detection of the groups will be a matter of chance. Our servers mostly have some Broadcomm's on the MB plus a few multi-port Intel cards. If you remove the udev rules, there is no way to know whether the MB NICs or the add-ons will be eth0 and eth1.
Agreed, I have seen that behavior but I was talking about what happens if you change a card, put the new MAC address in ifcfg-eth* and do nothing with the udev rules.
I always use ks to build the machines and the interfaces are pre-defined in the ks setup.
Interestingly enough, I just looked at the udev file and it contains not only the new mac addresses but also the old ones.
For example the entries for eth1 looks like the following:
# PCI device 0x10ec:0x8167 (r8169) SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:30:18:a9:e4:ad", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
# PCI device 0x8086:0x1076 (e1000) (custom name provided by external tool) SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:30:18:a4:eb:d0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
I did not put any of these entries in there and I wonder what "external tool" is providing the "custom name"?
Don't know about the tool, but note that this would come out differently if you added the new card, booted, then shut down and removed the old card.
Is there anyone here who actually knows how this is supposed to work?
Randomly, I guess...
I am beginning to believe that. I guess some more research is in order.
Regards,
On Sat, Feb 16, 2013 at 7:06 AM, me@tdiehl.org wrote:
I did not even know about this "problem" until I read about it on this list.
From what I've seen, the ports on a single card will be detected in
the same order every time. The issue is that if you have some motherboard NICs and one or more pci cards, the order of detection of the groups will be a matter of chance. Our servers mostly have some Broadcomm's on the MB plus a few multi-port Intel cards. If you remove the udev rules, there is no way to know whether the MB NICs or the add-ons will be eth0 and eth1.
Agreed, I have seen that behavior but I was talking about what happens if you change a card, put the new MAC address in ifcfg-eth* and do nothing with the udev rules.
Under CentOS5 that was sufficient to rename the interfaces to match. In CentOS6, the names are set in the udev rules and the ifcfg-eth* files are skipped if the MAC addresses don't match for the names set by udev.
I always use ks to build the machines and the interfaces are pre-defined in the ks setup.
It works if - and only if - your ifcfg-eth? names match the order that get set in udev. If you have multiple cards or different NIC types, that order isn't predictable.
I am beginning to believe that. I guess some more research is in order.
You can nail it down if you create the udev rule yourself.
On Fri, Feb 15, 2013 at 1:35 PM, Les Mikesell lesmikesell@gmail.com wrote:
On Fri, Feb 15, 2013 at 12:26 PM, Robert Moskowitz rgm@htt-consult.com wrote:
And when you edit ifcfg-eth0 what command restarts the interface?
I generally throw in the following to ifcfg-___ just to be safe: NM_CONTROLLED="no"
ifdown eth0 ifup eth0
or service network restart
If you are changing related routes or the MAC address, do the down before the change so the right values are seen. If you change something that doesn't affect the address you can usually stay connected if you put both commands on one line with a ; separator.
-- Les Mikesell lesmikesell@gmail.com _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
SilverTip257 wrote:
On Fri, Feb 15, 2013 at 1:35 PM, Les Mikesell lesmikesell@gmail.com wrote:
On Fri, Feb 15, 2013 at 12:26 PM, Robert Moskowitz rgm@htt-consult.com wrote:
And when you edit ifcfg-eth0 what command restarts the interface?
I generally throw in the following to ifcfg-___ just to be safe: NM_CONTROLLED="no"
You forgot: service NetworkManager stop chkconfig NetworkManager off
ifdown eth0 ifup eth0
or service network restart
That's considered better around here. <snip> mark
Robert Moskowitz wrote:
I goofed again after a rebuild from a kickstart so had to rename yet again, see below:
On 02/14/2013 01:13 PM, Digimer wrote:
On 02/14/2013 01:11 PM, Robert Moskowitz wrote:
I need to change the host name on a test server, and in the past when I used hostname to change the hostname, it did not seem to change it everywhere.
<snip>
What is the recommened practice? Other than get it right the first time.
To make the change permanent, edit /etc/ssyconfig/network and set the desired hostname after HOSTNAME=.
I did this and rebooted, but /etc/sysconfig/network-scripts/ifcfg-eth0 was not changed. NetworkManager does not seem to have a dialog for changing it there. I manually edited the file. When I saved the file, NM seems to have noticed the change and auto-restarted the interface.
Is this a laptop? If it's a server, or a workstation, the opinion around here is NetworkManager MUST DIE.... If you're hardwired, you don't need it, ever - network is still there, and doesn't screw around with your settings.
Here's another question: you're building it via kickstart - are you getting the hostname via dhcp?
We've got a perl script to create a ks file dynamically, depending on what option we want (server, desktop, etc), and we get the name via dhcp, and put that in.
mark
On 02/15/2013 02:34 PM, m.roth@5-cent.us wrote:
Robert Moskowitz wrote:
I goofed again after a rebuild from a kickstart so had to rename yet again, see below:
On 02/14/2013 01:13 PM, Digimer wrote:
On 02/14/2013 01:11 PM, Robert Moskowitz wrote:
I need to change the host name on a test server, and in the past when I used hostname to change the hostname, it did not seem to change it everywhere.
<snip> >>> What is the recommened practice? Other than get it right the first >>> time. >> To make the change permanent, edit /etc/ssyconfig/network and set the >> desired hostname after HOSTNAME=. > I did this and rebooted, but /etc/sysconfig/network-scripts/ifcfg-eth0 > was not changed. NetworkManager does not seem to have a dialog for > changing it there. I manually edited the file. When I saved the file, > NM seems to have noticed the change and auto-restarted the interface. > Is this a laptop? If it's a server, or a workstation, the opinion around here is NetworkManager MUST DIE.... If you're hardwired, you don't need it, ever - network is still there, and doesn't screw around with your settings.
Here's another question: you're building it via kickstart - are you getting the hostname via dhcp?
Nope. Hostname in in my network statement. And I was getting it wrong, that is why I had to change it after the build!
We've got a perl script to create a ks file dynamically, depending on what option we want (server, desktop, etc), and we get the name via dhcp, and put that in.
The first build for a box is interactive but using netinst and my local repos. Then I alter the anaconda-ks.cfg to make a hardware specific ks, doing 'standard' edits. Thing is sometimes I really don't look hard enough at that hostname line (part of my dyslexia perhaps).
hi,
On Fri, Feb 15, 2013 at 8:34 PM, m.roth@5-cent.us wrote:
Here's another question: you're building it via kickstart - are you getting the hostname via dhcp?
We've got a perl script to create a ks file dynamically, depending on what option we want (server, desktop, etc), and we get the name via dhcp, and put that in.
would you mind sharing that script? Just made me curious.
Thanks,
Natxo Asenjo wrote:
hi,
On Fri, Feb 15, 2013 at 8:34 PM, m.roth@5-cent.us wrote:
Here's another question: you're building it via kickstart - are you getting the hostname via dhcp?
We've got a perl script to create a ks file dynamically, depending on what option we want (server, desktop, etc), and we get the name via
dhcp, and
put that in.
would you mind sharing that script? Just made me curious.
It's moderately long, has a lot of site-specific stuff, and I'd have to ask my manager - esp. since we're a part of the US federal gov't....
mark
Thanks all.
Changed /etc/sysconfig/network and rebooted and all is well. At least so far!
/etc/hosts did not have an entry for the host there. Maybe because I have installed bind on this system.
On 02/14/2013 01:11 PM, Robert Moskowitz wrote:
I need to change the host name on a test server, and in the past when I used hostname to change the hostname, it did not seem to change it everywhere.
I really don't want to do a rebuild just yet, but I have to feel confident that hostname is really changed (reboot is not too much of an issue).
What is the recommened practice? Other than get it right the first time.
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos