Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to rename Host

Status
Not open for further replies.

bugzLue

IS-IT--Management
Feb 27, 2001
57
0
0
US
I am running Solaris 8 and when I type hostname if returns "unknown", when I was installing Solaris 8 I put UNIX as the host. Can I change this with out having to reinstall Solaris 8?

I want to tel net in but i need the host name.

Thank you
 
do you have a file called hostname.hme0 or similar in your /etc directory?
try removing anything in that file and write only UNIX in it. Take a look at your hosts file in /etc as well.

Can you telnet to the ip-adress of the machine?
If yes, look in your hosts file and try telnet to the name after the machine´s ip-adress.
I´m new to solaris... This could be totally wrong but a qualified quess is better then none at all. /Sören
 
Not being the worlds greatest expert but....

I think what you need to do is modify the following files :-

/etc/hostname.hme0, /etc/nodename, /etc/inet/hosts, /etc/net/ticlts/hosts, /etc/net/ticots and /etc/net/ticotsord/hosts

so that they contain your required hostname and then reboot the system.

Hope this helps

 
I'm not shur about solaris 8 but in previous version all you need to do is run :

/usr/sbin/sys-inconfig

sys-unconfig will take you through the first part of you installation ( system indentifcation ) and allow you to configure your hosts indentity again without reinstalling!

ALSO:

you can but the IP address of you machine in the /etc/hostname.hme0 instead of the machine name.

or

If you put the machine name (unix) in the /etc/hostname.hme0 then this is dependant on the /etc/hosts file to know the Ip Address.

eg.

/etc/hostname.hme0 -> unix
/etc/hosts ( must have ) 10.0.0.1 unix

NOTE: 10.0.0.1 would be your real IP Address!
 
just give the command hostname xxx.where xxx is new name of host.

Ajay
 
If you are using DHCP it is going to come up with the Hostname Unknown no matter what you do if it is not getting the Hostname from the DHCP server.
 
if you're using a proper DHCP server, i.e. the one that comes with solaris for a start, then the server will provide you with a proper name from it's/NIS/DNS hosts file. It's really only the PC variants of DHCP that skimp on the job.
 
What's the difference between "hostname xxx" & "uname -S xxx" ?

Presumably, you'd still need to alter the hosts file, whichever method you use?
 
Hi,

I have a mounted NFS filesystem in solaris machine from AS400 when I try to list directory in this fs I cannot find files which exist in the same directory in AS400, when I list with the complet name of the file I got the file.

Thanks for your help

KhB
 
If you are using dhcp, try commenting out the following lines from the /etc/init.d/network file:

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

On my solaris 8 sparc, they are lines 297-299

Be careful only to comment these three lines.

pgs
 
I have found that sys-unconfig also disturbed other parts of my configuration and I was not happy with the result. It seemed too invasive. It actually disturbed the operation of some applications.

I am still looking for the way to change the identity of a solaris-8 machine (hostname and IP address) with the least amount of disruption to the rest of the existing configuration. I also need to change the IP address so it hme0 is set to the new address on the next reboot. Does someone know how to do this?

I'm interested in this particular problem for my own needs. Thanks for all the responses. I'll be watching this thread for more info.
 
if you want to change Ip address, first you have check>
# ifconfig -a
then
# ifconfig le0 or le1 xxx.xxx.xxx.x up
where is xxx.xxx.xxx.x is IP address.

try changing the host name
vi /etc/hosts
insert a new host name.
or in command line # set hostname < new name> then enter

thanks
I am a new system administrator

 
the sys-unconfig puts all your old data in /etc/inet/ as backups if you need to get the stuff back.

if that helps any ...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top