Sponsored Content
Full Discussion: change hostname
Top Forums UNIX for Dummies Questions & Answers change hostname Post 95546 by RTM on Thursday 12th of January 2006 08:39:32 AM
Old 01-12-2006
Quote from SUN for Solaris 9 and Solaris 10 DHCP
Quote:
For Solaris 9 systems:

1. Edit the file /etc/init.d/inetsvc and change the line that reads the following: hostname='/sbin/dhcpinfo Hostname' to

#hostname='/sbin/dhcpinfo Hostname'

hostname='/usr/bin/cat /etc/nodename'

2. Create a executable script in /etc/rcS.d directory for example S31myhost

and add the following line :

hostname dhcpclient1

Note: dhcpclient1 is example of a hostname.

3. Next, Follow the same procedure as for Solaris 10 which is listed below.

For Solaris 10 systems:

1. Edit the /etc/default/dhcpagent file and change the line that reads the following:

#REQUEST_HOSTNAME=no

to

REQUEST_HOSTNAME=no

2. Edit the /etc/hostname.interface(example of dhcp interface is hostname.hme0) file

and add the hostname to that file.

3. Edit the /etc/nodename file and add the hostname to that file as well.

4. Edit the /etc/hosts file and add the loghost and hostname. See example below:

# # Internet host table # 127.0.0.1 localhost loghost dhcp ip dhcpclient1 # Added by DHCP

5. Reboot the DHCP Client
 

10 More Discussions You Might Find Interesting

1. IP Networking

How to change hostname and ip in solaris

Dear all, I am going to change the IP address and hostname in my solaris, but I don't know how to do it. If you have any idea or suggestion, please fell free to let me know. Thanks and Regards (2 Replies)
Discussion started by: PennyLi
2 Replies

2. UNIX for Dummies Questions & Answers

change hostname

Hi, ( running solaris 8 ) I know how to change the hostname temparily, by login in as root typing hostname = xxxxx but, this obviously goes when the system is rebooted. I'm not sure what files need changing to make this a permant change. Could anyone help me please? (9 Replies)
Discussion started by: fishman2001
9 Replies

3. UNIX for Advanced & Expert Users

Change of Hostname

Dear All. I will like to know beside the following command "hostname hostname" what other command that can change the hostname of the Unix. Thanks. (4 Replies)
Discussion started by: gelbvonn
4 Replies

4. HP-UX

Change IP and Hostname

Hello.. I wanted to know how to change IP and Hostname on HPUX system, and I don't want to make it as NIS master either. Could someone tell me the files I need to modify and make sure it's on network? Thanks! :o (3 Replies)
Discussion started by: catwomen
3 Replies

5. UNIX for Dummies Questions & Answers

Solaris - unknown hostname - how can I change hostname?

Hello, I am new to Solaris. I am using stand alone Solaris 10.0 for test/study purpose and connecting to internet via an ADSL modem which has DHCP server. My Solaris is working on VMWare within winXP. My WinXP and Solaris connects to internet by the same ADSL modem via its DHCP at the same... (1 Reply)
Discussion started by: XNOR
1 Replies

6. Solaris

Change hostname in Solaris 9

Please anyone guide me how to change the hostname in Solaris 9? The IP of the machie is fetched from a DHCP server. (6 Replies)
Discussion started by: shabu
6 Replies

7. Linux

how to change hostname permanentaly

i want to change my hostname permanentaly in my Fedora core 6. could any one tell me how it is possible .... (1 Reply)
Discussion started by: useless79
1 Replies

8. Red Hat

Change hostname

Hello, I would like to change the hostname on a Linux server (RHEL4). I try different methods in vain : - by using hostname command - by changing /etc/hosts and /etc/hostname But after restarting server, the old hostname re-appears... :confused: And the file ./proc/sys/kernel/hostname... (3 Replies)
Discussion started by: madmat
3 Replies

9. UNIX for Dummies Questions & Answers

Change HostName

How to change host name in NCR Unix version 3.0 release 4.0 I got the OS version and OS release from executing uname -v and uname -r (9 Replies)
Discussion started by: nalina
9 Replies

10. Solaris

change hostname in SUNOS 5.10

What file I need to edit if I need to change hostname in SUN OS 5.10 Please advice ....... (1 Reply)
Discussion started by: chuikingman1
1 Replies
nodename(4)							   File Formats 						       nodename(4)

NAME
nodename - local source for system name SYNOPSIS
/etc/nodename DESCRIPTION
When a machine is standalone or its IP address is configured locally, the /etc/nodename file contains the system name. By convention, the system name is the same as the hostname associated with the IP address of the primary network interface, for example, hostname.hme0. If the machine's network configuration is delivered by the RPC bootparams protocol, the /etc/nodename file is not used, as the system name is delivered by the remote service. Given a system name value, regardless of source, the uname utility invoked with the -S option is used to set the system name of the running system. If the machine's network configuration is delivered by the DHCP protocol, the /etc/nodename file is used only if the DHCP server does not provide a value for the Hostname option (DHCP standard option code 12). A system name configured in /etc/nodename should be unique within the system's name service domain in order to ensure that any network ser- vices provided by the system will operate correctly. Given a system name value, regardless of source, the uname utility invoked with the -S option is used to set the system name of the running system. EXAMPLES
Example 1: Syntax The syntax for nodename consists of a single line containing the system's name. For example, for a system named myhost: myhost ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
nis+(1), uname(1), named(1M), ypbind(1M), attributes(5) NOTES
The nodename file is modified by Solaris installation and de-installation scripts. SunOS 5.10 9 Feb 2004 nodename(4)
All times are GMT -4. The time now is 06:12 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy