Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Newbie: Hostname change leads to remote login issues 1

Status
Not open for further replies.

RobinASU

MIS
May 20, 2003
1
US
Installed solaris 9 with DHCP enabled and didn't like the default 'Unknown" hostname. Edited RC script to use "COMPAQ" as the default hostname. Rebooted and hostname is now COMPAQ, but I cannot login using XDMCP. I change the hostname back to Unknown and it all works.

My question is this:

How does the hostname relate to the XDMCP system?

Thx,
Rob
 
You might want to try the sys-unconfig command. You will need to restart the system after issuing this command so make sure that you have a outage window before you start. You should do a man sys-unconfig to get the exact syntax. This will change the hostname in all of the config files; UNIX has the hostname in multiple config files

 
I there are some other files that need the hostname /etc/net/*/hosts - might be related.

From SUN FAQ 3477

Solaris systems try to set their hostname through the "dhcpinfo" command
when they are booted as DHCP clients. The "dhcpinfo" command tries to
obtain the hostname for the client from a DHCP server by matching the
client's MAC address with a hostname entry in the DHCP server's network
client table. A Windows NT DHCP server usually does not have a network
client table since the hostname of a Windows client is stored locally.
Hence, a Solaris DHCP client will get no reply from the Windows NT DHCP
server to it's "dhcpinfo" command. If the Solaris client is configured
to use DHCP and the DHCP server fails to respond to the "dhcpinfo"
command, the client's hostname is set to "unknown" by the startup scripts.

We may work around this problem by making some modifications in the
system startup scripts as shown below:

1. For Solaris 2.6 and Solaris 7 Systems.

Edit the file /etc/init.d/rootusr and change the line that reads

hostname=`/sbin/dhcpinfo Hostname`

to

# hostname=`/sbin/dhcpinfo Hostname`
hostname=`shcat /etc/nodename`
uname -S $hostname

Save the file and reboot the system. The system's hostname will be the
entry in the file /etc/nodename.

2. For Solaris 8 systems.

Edit the file /etc/init.d/network and change the line that reads

"dhcp") hostname=`/sbin/dhcpinfo Hostname` ;;

to

# "dhcp") hostname=`/sbin/dhcpinfo Hostname` ;;
"dhcp") hostname=`shcat /etc/nodename` ;;

Then, edit the file /etc/init.d/inetsvc and change the line that reads

hostname=`/sbin/dhcpinfo Hostname`

to

# hostname=`/sbin/dhcpinfo Hostname`
hostname=`/usr/bin/cat /etc/nodename`

Save the files and reboot the system. The system's hostname will be the
entry in the file /etc/nodename.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top