Sponsored Content
Special Forums IP Networking How to change hostname and ip in solaris Post 22049 by killerserv on Monday 27th of May 2002 09:44:20 PM
Old 05-27-2002
The files that set hostname and IP address are always in /etc
(Solaris: /etc/inet/hosts)
Solaris has commands sys-unconfig, sysidconfig, and friends for when you really want to unconfigure/reconfigure a host
But back to the modest change-the-hostname task, Files to edit:

/etc/hostname.<interface-name> (hme0, le0, ...)
/etc/nodename
/etc/defaultrouter
/etc/netmasks (maybe)
/etc/net/ticlts/hosts (optional)
/etc/net/ticots/hosts (optional)
/etc/net/ticotsord/hosts (optional)

Now when you reboot, the host should come up with its new name and/or IP address.
If the machine has any possibly-delicate services that it provides (e.g. sendmail on your main mail server), you might want to disable these (take the relevant symlinks out of /etc/rc2.d before rebooting. Give a try do post back the results.
 

8 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. UNIX for Dummies Questions & Answers

change hostname

Hi, I asked this question whenI was running solaris 8 and got some very good answers. I've just uograded to Solaris 10 and there seems to quite a few changes so I need to know again. https://www.unix.com/showthread.php?t=8547 ------------ Hi (now solaris 10) I know how to change the... (2 Replies)
Discussion started by: fishman2001
2 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. 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

8. Solaris

change hostname end ip adresse in solaris 9

hi everybody which files i should change to modify my hostname and my adresse ip in solaris 9 . or how can i do that :confused: it's very important to me thnx (2 Replies)
Discussion started by: lid-j-one
2 Replies
sys-unconfig(1M)					  System Administration Commands					  sys-unconfig(1M)

NAME
sys-unconfig - undo a system's configuration SYNOPSIS
/usr/sbin/sys-unconfig DESCRIPTION
The sys-unconfig command is used to restore a system's configuration to an "as-manufactured" state, ready to be reconfigured again. The system's configuration consists of hostname, Network Information Service (NIS) domain name, timezone, IP address, IP subnet mask, and root password. This operation is the inverse of those performed by the sysidnet(1M), sysidns(1M), and sysidsys(1M) programs run at boot. See sysidtool(1M). sys-unconfig does the following: o Saves current /etc/inet/hosts file information in /etc/inet/hosts.saved. o If the current /etc/vfstab file contains NFS mount entries, saves the /etc/vfstab file to /etc/vfstab.orig. o Restores the default /etc/inet/hosts file. o Removes the default hostname in /etc/hostname.interface files for all interfaces configured when this command is run. To determine which interfaces are configured, run the command 'ifconfig-a'. The /etc/hostname.interface files corresponding to all of the inter- faces listed in the resulting output, with the exception of the loopback interface (lo0), will be removed. o Removes the default domainname in /etc/defaultdomain. o Restores the timezone to PST8PDT in /etc/TIMEZONE. o Disables the Network Information Service (NIS) and Network Information Service Plus (NIS+) if either NIS or NIS+ was configured. o Removes the file /etc/inet/netmasks. o Removes the file /etc/defaultrouter. o Removes the password set for root in /etc/shadow. o Removes the file /etc/.rootkey. o Executes all system configuration applications. These applications are defined by prior executions of a sysidconfig -a application. (See sysidconfig(1M)). When sys-unconfig is run, all system configuration applications are passed one argument, -u. o Removes the file /etc/resolv.conf. o Disables LDAP by removing /var/ldap/ldap_client_cache, /var/ldap/ldap_client_file, /var/ldap/ldap_client_cred, and /var/ldap/cachemgr.log. o Regenerates keys for sshd(1M). When sys-unconfig is finished, it performs a system shutdown. sys-unconfig is a potentially dangerous utility and can only be run by the super user. FILES
/etc/default/init process control initialization /etc/defaultdomain /etc/defaultrouter /etc/hostname.interface /etc/inet/hosts host name database /etc/inet/netmasks network mask database /etc/nodename /etc/.rootkey super-user's secret key /etc/shadow shadow password file /etc/vfstab virtual file system table /var/nis/NIS_COLD_START /var/yp/binding/*/ypservers ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWadmap | +-----------------------------+-----------------------------+ SEE ALSO
init(1M), kdmconfig(1M), sshd(1M), sysidconfig(1M), sysidtool(1M), hosts(4), netmasks(4), shadow(4), attributes(5) NOTES
sys-unconfig is not available on diskless clients. SunOS 5.10 4 Jun 2004 sys-unconfig(1M)
All times are GMT -4. The time now is 06:02 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy