Advertisement

Unix, change the name of the computer?

Started by January 15, 2006 10:10 PM
12 comments, last by johnnyBravo 18 years, 8 months ago
In Solaris you normally create a /etc/nodename with the name of the hostname and edit /etc/rcS.d/S30network.sh from

if [ -z "$hostname" ]; then
hostname="unknown"
fi

to

f [ -z "$hostname" ]; then
hostname="unknown"
if [ -f /etc/nodename ]; then
hostname="`shcat /etc/nodename 2>/dev/null`"
fi
fi
Quote: Original post by haegarr
Try a
> chmod u+w /etc/hosts
as root to set the file write-able for the owner. It probably has the write flag not set. (The syntax is valid for linux; don't know whether it is also valid for solaris, but I assume it to be.)


Ah I was able to edit after setting the write flag, but after I restarted the machine, the hosts file had reverted it back to 'unknown'.

Quote: Original post by Anonymous Poster
In Solaris you normally create a /etc/nodename with the name of the hostname and edit /etc/rcS.d/S30network.sh from


I found the /etc/rcS.d/ folder, but nothing resembling 'S30network.sh'.

Thanks.
Advertisement
Try creating it and see if it helps? ;)
Quote: Original post by Anonymous Poster
Try creating it and see if it helps? ;)


Oh sorry :), some how I missed the 'create' part of the message.

It works fine now, thanks alot.

This topic is closed to new replies.

Advertisement