The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Dhcp rkap SUN Solaris 1 08-03-2005 10:24 AM
Dhcp NJay UNIX for Dummies Questions & Answers 2 06-29-2004 05:37 AM
DHCP and DNS meyersp IP Networking 3 11-21-2003 01:02 PM
Dhcp alex blanco UNIX for Advanced & Expert Users 2 08-04-2003 08:48 AM
Dhcp jdevarie IP Networking 1 07-10-2001 09:29 PM

Closed Thread
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-23-2002
Registered User
 

Join Date: Jan 2002
Posts: 35
Dhcp

When using DHCP how can I can my hostname. I vi all the hosts file and if still didn't work. So now my hostname is unknown and I want to change it. So if anyone out there can help me. Thank You
Forum Sponsor
  #2 (permalink)  
Old 09-23-2002
WIntellect's Avatar
Registered User
 

Join Date: Sep 2002
Location: United Kingdom
Posts: 170
It usually the following command:

hostname system.domain.com

Most Unix will also have a boot option which will configure tis for you at boot time!
__________________
FreeBSD - Opening computers from closed Windows
  #3 (permalink)  
Old 09-23-2002
RTM's Avatar
RTM RTM is offline
Hog Hunter
 
Join Date: Apr 2002
Location: On my motorcycle
Posts: 3,039
Please post the OS and version with each question.

If it's Solaris, then this may work (unknown if it works in Solaris X86)

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.
  #4 (permalink)  
Old 09-23-2002
Registered User
 

Join Date: Jan 2002
Posts: 35
DHCP

I tried everything that was written down and it still didn't work. Please anymore help, I'm open
  #5 (permalink)  
Old 09-23-2002
RTM's Avatar
RTM RTM is offline
Hog Hunter
 
Join Date: Apr 2002
Location: On my motorcycle
Posts: 3,039
What OS and version????
  #6 (permalink)  
Old 09-23-2002
Registered User
 

Join Date: Jan 2002
Posts: 35
dhcp

SunOS unknown 5.8 Generic_108529-16 i86pc i386 i86pc
  #7 (permalink)  
Old 09-23-2002
RTM's Avatar
RTM RTM is offline
Hog Hunter
 
Join Date: Apr 2002
Location: On my motorcycle
Posts: 3,039
As stated earlier, it is unknown if the fix found on SunSolve would work on X86. This is the only fix SunSolve has for this problem but they don't state if it works on X86.

You might try rebooting if you had not done that after the changes.
Google UNIX.COM
Closed Thread

Thread Tools
Display Modes




All times are GMT -7. The time now is 03:38 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0