#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2004
    Posts
    29
    Rep Power
    0

    Changing hostname and IP on Solaris 10


    We have a Solaris 10 machine and need to change the hostname and the IP address. I have worked primarily with Solaris 8 and this is my first experience with Solaris 10. I am fairly sure I will get the basics, but I have the vague recollection that there was something under /etc/opt or similar. Now, I cannot find it. So, I was wondering if someone knew of a checklist of things to change to make sure that I do not miss anything.

    Any info would be greatly appreaciated.
  2. #2
  3. Not a clue what to put ...
    Devshed Novice (500 - 999 posts)

    Join Date
    Jan 2006
    Location
    in front of this keyboard
    Posts
    834
    Rep Power
    336
    I dunno if it is still in Sol 10, but there WAS a command/script called sys_unconfig which you could use to do this.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2006
    Posts
    1
    Rep Power
    0
    Changing the IP on Solaris 10 requires editing two files:

    1. /etc/hosts
    2. /etc/inet/ipnodes

    If you are changing network address, you will need to change the router address in the file:
    1. /etc/defaultrouter

    Changing the hostname now only requires editing these files:

    1. /etc/hosts
    2. /etc/nodename
    3. /etc/hostname.<interface name>

    <interface name> is the driver name followed by the instance number of the interface. ie. hme0, bge0, ce0, qfe0

    You can find all your network interfaces by drivername and instance# by running the following command: prtconf -D | grep network

    Note: the following hosts files are no longer used in solaris 10.
    /etc/net/ticlts/hosts
    /etc/net/ticots/hosts
    /etc/net/ticotsord/hosts

    Rebooting the computer should bring up the new ip and hostname.
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2006
    Posts
    1
    Rep Power
    0

    Need Help to change the hostname and IPAddress on Solaris8


    Hi,

    I tried modifying the hostanme and IPAddress using sys-unconfig command but in vain. After feeding all the configuration details of the system, at the end the following error is observed.
    "System Identification Error-------
    An error occured while trying to set the IP address XX.XXX.XX.XX on the network interface.

    - Kraja

    Your help on this is greatly appreciated....as i have imp deliverables.
    Originally Posted by shiv729
    Changing the IP on Solaris 10 requires editing two files:

    1. /etc/hosts
    2. /etc/inet/ipnodes

    If you are changing network address, you will need to change the router address in the file:
    1. /etc/defaultrouter

    Changing the hostname now only requires editing these files:

    1. /etc/hosts
    2. /etc/nodename
    3. /etc/hostname.<interface name>

    <interface name> is the driver name followed by the instance number of the interface. ie. hme0, bge0, ce0, qfe0

    You can find all your network interfaces by drivername and instance# by running the following command: prtconf -D | grep network

    Note: the following hosts files are no longer used in solaris 10.
    /etc/net/ticlts/hosts
    /etc/net/ticots/hosts
    /etc/net/ticotsord/hosts

    Rebooting the computer should bring up the new ip and hostname.
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2006
    Posts
    1
    Rep Power
    0

    No luck with changing hostname


    I tried editing the three files suggested by shiv--- to no avail. I've tried as well editing all the meaningful /etc* files as prescribed by "the book" and still no luck. Running 5.10 on a new x86 Toshiba laptop and so far everything else seems fine. Installed as 'network' computer and using DHCP (as req'd by router); which gives no opportunity to name the host, so it's "unknown". Ask away if you need to know what some of the files or prtconf looks like. Thanks in advance.
  10. #6
  11. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2009
    Posts
    1
    Rep Power
    0

    Changing hostname on Solaris 10


    In addition to changing the /etc/hosts file you need to do a uname -S `hostname` and that should do the trick.
    Last edited by iaguru; November 10th, 2009 at 08:13 AM. Reason: spelling error
  12. #7
  13. No Profile Picture
    Contributing User
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Jul 2004
    Location
    Middle Europa
    Posts
    1,198
    Rep Power
    17
    imho, a sys-adm should know what he is doing, forget tools for this
    jos - or an other issue like add or delete users - follow shiv729 instructions,
    so you will learn how to do it, even if tools are NOT installed

    btw: my experience NEVER DELETE AN USER, just disable it, setting
    an inpossible pwd or changing his login-shell to a non existing-shell.
    why?
    if you have to restore data .......... imagine what could happen
    working on Solaris[5-9], preferred languages french and C.
  14. #8
  15. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2010
    Posts
    1
    Rep Power
    0

    Smile Thanks: The instructions worked great!


    Thanks shiv729. To change the IP steps 1 and 2 were all that was needed. I found another post that referenced a lot more files (probably for older Solaris) but for Solaris 10, your instructions were spot on.

    Originally Posted by shiv729
    Changing the IP on Solaris 10 requires editing two files:

    1. /etc/hosts
    2. /etc/inet/ipnodes

    If you are changing network address, you will need to change the router address in the file:
    1. /etc/defaultrouter

    Changing the hostname now only requires editing these files:

    1. /etc/hosts
    2. /etc/nodename
    3. /etc/hostname.<interface name>

    <interface name> is the driver name followed by the instance number of the interface. ie. hme0, bge0, ce0, qfe0

    You can find all your network interfaces by drivername and instance# by running the following command: prtconf -D | grep network

    Note: the following hosts files are no longer used in solaris 10.
    /etc/net/ticlts/hosts
    /etc/net/ticots/hosts
    /etc/net/ticotsord/hosts

    Rebooting the computer should bring up the new ip and hostname.

IMN logo majestic logo threadwatch logo seochat tools logo