Home     Blog

How to Change a Hostname on Solaris

Solaris makes it unreasonably difficult to change an installed server’s hostname.

To change the hostname on a Solaris system, edit all of these files:

  • /etc/hosts
  • /etc/nodename
  • /etc/hostname.*
  • /etc/inet/ipnodes

When file editing is complete, reboot the server to test the changes and ensure that they operate correctly.

change a hostname on solaris How to Change a Hostname on SolarisNote that changing the hostname only changes the name by which the machine refers to itself. This does not change the DNS name or names of the host.

VN:F [1.9.17_1161]
Rating: 6.7/10 (3 votes cast)
How to Change a Hostname on Solaris, 6.7 out of 10 based on 3 ratings
Follow Will.Spencer on

Comments (8)

 

  1. Amanda says:

    In Solaris 10 (and maybe older ones, not sure how far back this goes), I found that

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

    are not necessary to edit. When you enter the file it says these are no longer consulted and will be removed from future versions. The others should suffice.

    VA:F [1.9.17_1161]
    Rating: 0.0/5 (0 votes cast)
    • memenode says:

      Thanks Amanda, I edited those out. Good to hear it’s improving, but that still leaves quite a few files to edit. In Linux I think it’s just one file.

      VN:F [1.9.17_1161]
      Rating: 0.0/5 (0 votes cast)
  2. On Solaris 11, /etc/inet/ipnodes is the same as /etc/hosts.  Getting better all the time…

    VA:F [1.9.17_1161]
    Rating: 0.0/5 (0 votes cast)
    • Ryan N. says:

      That was true of 10 also, unless perhaps you upgraded from a version that did not do that.

      VA:F [1.9.17_1161]
      Rating: 0.0/5 (0 votes cast)
  3. Augie says:

    Hi
    On  Solaris 10 , i would like to create  a User and the Home directory is /TEST
    whenever i use the Command to create a user with the command
    useradd <name>
    the Home directory is  /export/home
    i need a command so the default home directory of the User goes to /TEST
     
    Thanks in Advance

    VA:F [1.9.17_1161]
    Rating: 0.0/5 (0 votes cast)
    • memenode says:

      Have you tried looking at man useradd? It might list how to use the command to specify a home directory. Maybe it’s useradd -d /home/directory username

      VN:F [1.9.17_1161]
      Rating: 0.0/5 (0 votes cast)
    • Cliff says:

      use # usermod -d /TEST -m <useracct>

      VA:F [1.9.17_1161]
      Rating: 0.0/5 (0 votes cast)
  4. Augie says:

    Hi
    Finally i got the  answer  for the default home directory
    vi /usr/sadm/defadduser

    VA:F [1.9.17_1161]
    Rating: 0.0/5 (0 votes cast)

Leave a Reply

Related Posts

  • How to Change an IP Address on Solaris

    To change an IP address on a Solaris system immediately, use the `ifconfig` command. The syntax for `ifconfig` is: ifconfig <interface> <ip address> <netmask> <broadcast address> If the user does not know his/her network interface names, he/she should use the `ifconfig -a` command to list all of the available network interfaces. Permanently Change an IP [...]...


  • How to Change a Unix Password

    To change your Unix password, use the `passwd` command.  Unless you are the “root” user, you will need to know your current password to set a new one.  If you have forgotten your current password, you will need to contact the “root” user to have your password reset. Here is an example of the user [...]...


  • How to Change Vista Icons

    As with any new operating system, sometimes even simple tasks can be confusing. If you would like to change your Vista icons, here are some simple steps: First, a quick note regarding Windows Vista Icons. Windows Vista Icons have been given plenty of accolades for their design and beauty. Microsoft gave each window icon a [...]...


  • How to Change Your Windows Password

    Whether you want to change the password on your own computer at home, office computer, or a computer that’s networked with other users, you can easily customize your Windows settings to protect specific files and folders from others either viewing or editing them. Creating or changing the windows password is very simple. It should be [...]...


  • How to Change the Taskbar Color

    One way to customize a Windows Desktop is to change the Taskbar’s color. Changing the Taskbar’s color is not only simple, but takes less than a minute. Here is how: Change the Task Bar Color in Windows XP Start up the computer and right click any clear space (do not click any part of the [...]...