Unknown hostname for Solaris 10 DHCP client

When I installed Solaris 10 x86, my computer thought its hostname was unknown. Aside from being annoying, this seemed to be causing a few issues, so I set about trying to set it to a name of my choice.

Using the uname -S hostname command set the hostname for me but this information didn’t persist on reboot. A bit of googling turned up various references to editing /etc/init.d/network so that it read /etc/nodename and set the hostname accordingly (as well as a script to set the hostname), but my system didn’t have an /etc/nodename file.

I understood that /etc/nodename should contain my computer’s name, but didn’t know if any other settings were required (I later found Jeff Hunter’s TCP/IP quick configuration guide, which confirmed that the file just contains the computer’s name – in my case laptop3).

It turns out that these hacks are for Solaris 8/9 – Solaris 10 is quite happy to set the hostname based on the contents of /etc/nodename. Once I had created /etc/nodename and rebooted, /etc/hosts read:

#
# Internet host table
#
127.0.0.1 localhost
192.168.7.106 laptop3 # Added by DHCP

and the computer was no longer anonymous!

12 thoughts on “Unknown hostname for Solaris 10 DHCP client


  1. Just take a look at this guys tag cloud – Solaris 10 hosted in VMware Fusion and I get the goods from a guy who advertises himself as a “Microsoft Exchange Server, Active Directory and the Windows platform” specialist. Thanks Mark (and Google:), drop us a line if you’re ever down-under.


  2. Mark – I have installed Solaris 10 on a spark box, and I am now trying to get email and calendar to work from the company’s exchange server. No such luck. I have been playing arounf with various settings, but cannot git it to successfully logon using my LDAP/domain password, I am sure you have experience & Doco regarding this…


  3. @Solarisnovis – I gave up on Solaris x86 as I found too many things worked differently to other Unix distros and I focused my Unix attentions on Linux instead. It’s a bit off-topic and I don’t know the full answer to your problem but I do have some ideas that might help:

    Once you’ve got the authentication working, you may find that your Unix mail client needs POP3 or IMAP4 to be enabled on the Exchange Server (these normally disabled in a corporate environment in favour of HTTP/S or Oulook’s MAPI transport).

    HTH, Mark


  4. thanks buddy, i had this issue and almost gave up changing the numerous files but nothing got me to work. Your post did the trick.

Leave a Reply