Original Post
Hi I've just reinstalled solaris 10, and I some how missed setting the computer's name during the installation. How would I change the computer's name? Thanks
# cat /etc/hosts::1 localhost.andreib.com localhost127.0.0.1 localhost.andreib.com localhost192.168.0.2 zig.andreib.com zig192.168.0.2 zig.andreib.com.Quote:
Original post by johnnyBravo
When I first entered 'hostname' it showed:
unknown
So I then set the hostname like so:
hostname myunix
But when I restart the server, the hostname reverts back to unknown.
Also after setting the hostname I called 'cat hosts' it showed:
127.0.0.1 localhost
192.168.0.194 unknown # Added by DHCP
I'm a little bit confused on what exactly to do.
Thanks alot
Quote:
Original post by Nathan Baum
Perhaps Solaris differs from Gentoo Linux in this regard, but I understood that /etc/hosts is only used for host lookup, not to find your hostname upon boot.
I have to set /etc/conf.d/hostname (other Linux distros use other files, so I wouldn't be surprised if Solaris used something different).
Quote:
Edit /etc/hosts and change unknown to myunix. Run hostname myunix as root and you're set.
Quote:
Original post by johnnyBravo
The hosts file is read only. Maybe it has something to do with me selecting DHCP in the installation?
Quote:
Original post by Deniz Quote:
Original post by johnnyBravo
The hosts file is read only. Maybe it has something to do with me selecting DHCP in the installation?
You have to modify /etc/hosts as root! ;)
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.)
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
Quote:
Original post by Anonymous Poster
Try creating it and see if it helps? ;)
This topic has been locked by a moderator. New replies are not allowed.
With your permission, GameDev.net uses analytics cookies to understand how people use the platform. You can accept analytics or continue with necessary cookies only. Learn more