Quickly and Simply Reconfiguring a UNIX Server using sys-unconfig

Sys-unconfig is a useful utility for Solaris and Linux that allows you to reconfigure your networking. It is easier than doing it manually, which involves editing some or all of the following files depending upon the operating system and version:
  • /etc/defaultrouter
  • /etc/dladm/*
  • /etc/dumpadm.conf
  • /etc/hostname
  • /etc/inet/hosts
  • /etc/nodename
  • /etc/nsswitch.conf
  • /etc/resolv.conf
Sys-unconfig is used for restoring a server's configuration back to its original state, before it was configured. It "unconfigures" the following:
  • Host Name
  • Domain Name
  • Time Zone
  • IP Address
  • IP Subnet Mask
  • Root Password



WARNING: On Red Hat Linux sys-unconfig will not ask you if you are sure or give you any chance to back out once you enter the command. It will immediately halt the system and reconfigure it on next boot.
Example:
# sys-unconfig

Broadcast message from root (pts/2) (Tue Oct 30 13:31:06 2012):

The system is going down for system halt NOW!
#
After the system has halted you can power it up again and it will go through the following configuration screens:
Keyboard

Root password

Networking Devices

Networking Devices / IP Addresses

Host Name / DNS

Time Zone

Authentication

Services