Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Setting Host name in Solaris

Posted on 2004-10-27
6
Medium Priority
?
412 Views
Last Modified: 2013-12-21
I would like to set the hostname to Jack.
I have set the configuration as follow:

# cat nodename
jack
# cat hostname.eri0
jack
# cat hosts
#
# Internet host table
#
127.0.0.1       localhost

192.168.0.3     jack loghost
192.168.0.4     marcel
# hostname jack
# hostname
jack

However, after I reboot the machine, I check hosts again. It will show:
# cat hosts
#
# Internet host table
#
127.0.0.1       localhost

192.168.0.3     unknown loghost
192.168.0.4     marcel
# hostname
unknown

Why? Do i miss anything? What is the reason of hostname changing back to unknown?
0
Comment
Question by:matchz
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 34

Expert Comment

by:PsiCop
ID: 12430392
Use the system un-configuration command --> sys-unconfig

See --> man sys-unconfig
0
 
LVL 38

Expert Comment

by:wesly_chen
ID: 12430451
Hi,

    For Solaris, there are 6 files need to be changed in order to change hostname.
/etc/hosts
/etc/nodename
/etc/hostname.eri0   <-- interface
/etc/net/ticlts/hosts
/etc/net/ticots/hosts
/etc/net/ticotsord/hosts

   And then reboot.

Wesly
0
 
LVL 2

Expert Comment

by:Troxalias
ID: 12432920
is there any case that you use DHCP for obtaining your network info (ip address, gateway, hostname etc) ?
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:matchz
ID: 12440415
Yes, I am using DHCP now.
0
 
LVL 5

Expert Comment

by:ITcrow
ID: 12444144
You are assigning a static address while using DHCP.

Please check the actual IP.
Since you want a static IP, do not configure your machine for DHCP.

Most likey, your machine figures out it's name is Jack and then realizes
according to /etc/hosts this is some other machine. So it has to switch
to unknown.
0
 
LVL 38

Accepted Solution

by:
wesly_chen earned 200 total points
ID: 12444348
Hi,

    If you use DHCP, then take out the following line from /etc/hosts
192.168.0.3     jack loghost   (X)

  and change the following line
127.0.0.1       localhost ------>    127.0.0.1       localhost jack loghost

    Otherwise, use static IP address.

Wesly
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Let's say you need to move the data of a file system from one partition to another. This generally involves dismounting the file system, backing it up to tapes, and restoring it to a new partition. You may also copy the file system from one place to…
I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question