Article
PROBLEM:
How to automatically set the hostname of a workstation to the machines serial number for SLED 10.
This is very handy if you are rolling out SLED 10 within your company and want to have a naming standard for all of your workstations. By setting the hostname to the serial number of the machine you are also making it easier for the help desk to identify what machine a particular person is calling in about.
SOLUTION:
Login as root and from the console type:
dmidecode | grep "Serial Number" | head -n1 | sed -e 's/\tSerial Number: //g' > /etc/HOSTNAME
Note: For SUSE 10 (not SLED 10) type:
dmidecode | grep "Serial Number" | head -n1 | sed -e 's/\t\tSerial Number: //g' > /etc/HOSTNAME
The next time the workstation is rebooted, the hostname will now be the serial number.
Disclaimer: As with everything else at Cool Solutions, this content is definitely not supported by Novell (so don't even think of calling Support if you try something and it blows up).
It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test, test, test before you do anything drastic with it.
Related Articles
- How to Load a Linux Driver Manually in a ZENworks Imaging environment
- Manually loading undetected Broadcom network modules within ZENworks Imaging
- Determining Total System RAM for Use in ZENworks Imaging Scripts
- Change language and keyboard layout to German in ZENworks Imaging
- Controlling the Power Settings in Local User Accounts
User Comments
- Be the first to comment! To leave a comment you need to Login or Register
- 4053 reads


0