LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.

Notices


Reply
  Search this Thread
Old 04-15-2007, 05:39 AM   #1
as400
Member
 
Registered: Apr 2004
Location: USA
Distribution: Solaris 10 (x86) and Windows XP Pro SP2
Posts: 596

Rep: Reputation: 30
Changing the Host Name?


I am running Solaris 10 on x86 and I want to change the Host Nmae from SERVER2 to something else.
How can I do this?
 
Old 04-15-2007, 06:59 AM   #2
kernel_geek
Member
 
Registered: Jan 2007
Location: UK
Distribution: Ubuntu/Arch
Posts: 161

Rep: Reputation: 30
Open up /etc/hostname with your favourite text editor
 
Old 04-15-2007, 09:20 AM   #3
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Actually /etc/nodename, and possibly /etc/hostname.<interface> if you have a static IP address.
 
Old 04-16-2007, 08:28 AM   #4
Dox Systems - Brian
Member
 
Registered: Nov 2006
Posts: 344

Rep: Reputation: 31
Check to make sure SMC still works after doing that. I had issues with SMC failing on a box where I changed the hostname that way. Not sure if it was the hostname change or something else going on, but SMC couldn't find the toolbox anymore.
 
Old 04-21-2007, 06:27 AM   #5
javier.e.menendez
Member
 
Registered: Jan 2006
Posts: 168

Rep: Reputation: 30
you should be looking too at /etc/hosts and /etc/inet/ipnodes.

Your hostname is located in several locations.

Others also mentioned:

/etc/nodename
/etc/hostname.card_type_here

Certain files are now deprecated in solaris 10:

/etc/net/ticots/hosts
/etc/net/ticlts/hosts
/etc/net/ticotsord/hosts

Some directories also contain your hostname:

/var/crash (for crash dumps)
/var/spool/lp/requests (for printing)

Cheers.
 
Old 04-21-2007, 06:30 AM   #6
javier.e.menendez
Member
 
Registered: Jan 2006
Posts: 168

Rep: Reputation: 30
Forgot to mention regarding smc.

smc may fail to load properly if it was loaded prior to the name change because
it contains xml files in /var which will still have your old hostname in them.
Those files end with "*.tbx" for toolboxes.

Although I have not tried this on x86, you can use sys-unconfig in sparc systems very easily. It halts your system. At boot time, it will ask you to
add the new hostname, ip, password and a few other things such as naming service info and so forth.

Good luck
 
Old 04-21-2007, 07:02 AM   #7
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Quote:
Originally Posted by javier.e.menendez
Although I have not tried this on x86, you can use sys-unconfig in sparc systems very easily.
Yes, sys-unconfig works equally fine on x86 architecture too and is indeed a simple way to rename a Solaris machine without requiring any specific knowledge of its internal files.

I suggest people to have a look at its manual page before running it though, as the command go beyond just renaming the machine.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
changing host name scng Linux - Newbie 10 10-03-2004 06:36 AM
Changing host Name velan Red Hat 4 09-28-2004 11:07 PM
Changing host name jonathanztaub Red Hat 3 05-03-2004 03:14 AM
changing host name hoffman Linux - Newbie 3 11-22-2003 02:16 AM
Changing Host name coolamit78 Linux - General 2 10-04-2003 12:18 AM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 04:02 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration