LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices

Reply
 
Search this Thread
Old 02-27-2009, 06:25 AM   #1
rizwanrafique
Member
 
Registered: Jul 2006
Distribution: Debian, Ubuntu, openSUSE, CentOS
Posts: 147

Rep: Reputation: 19
How to setup hostname using dhcp on Ubuntu 8.10


Wonder how do I request username from dhcp on Ubuntu 8.10.

Here is what I have so far:

Packages dhcp3-client and dhcp3-common are installed.

/etc/dhclient.conf reads:
Code:
request subnet-mask, broadcast-address, time-offset, routers,
	domain-name, domain-name-servers, domain-search, host-name,
	netbios-name-servers, netbios-scope, interface-mtu;
I tried removing /etc/hostname and when system boots I get "(none)" as hostname.

All DHCP server configuration is fine and system is resolved from outside world but hostname on the machine can't be setup unless I use /etc/hostname and write the hostname in there.


I'm using NetworkManager with wired network.

Any clues?
 
Old 02-27-2009, 10:58 PM   #2
{BBI}Nexus{BBI}
Senior Member
 
Registered: Jan 2005
Location: Nottingham, UK
Distribution: Mageia 4
Posts: 4,297

Rep: Reputation: 205Reputation: 205Reputation: 205
Do you mean you want to give your machine a hostname? Here's and easy to follow how-to: http://adminuser.wordpress.com/2008/...ian-or-ubuntu/
 
Old 02-28-2009, 02:11 PM   #3
rizwanrafique
Member
 
Registered: Jul 2006
Distribution: Debian, Ubuntu, openSUSE, CentOS
Posts: 147

Original Poster
Rep: Reputation: 19
I would like to set the hostname *automatically* from dhcp/dns rather than putting it in /etc/hostname. It should pickup whatever name has been set for it in the dhcp/dns upon bootup or network start-up.
 
Old 02-28-2009, 02:20 PM   #4
{BBI}Nexus{BBI}
Senior Member
 
Registered: Jan 2005
Location: Nottingham, UK
Distribution: Mageia 4
Posts: 4,297

Rep: Reputation: 205Reputation: 205Reputation: 205
Quote:
Originally Posted by rizwanrafique View Post
I would like to set the hostname *automatically* from dhcp/dns rather than putting it in /etc/hostname. It should pickup whatever name has been set for it in the dhcp/dns upon bootup or network start-up.
Ah ok, someone else has managed to achieve it. See here: http://ubuntuforums.org/showthread.php?t=71587 jump down to post #6.
 
  


Reply

Tags
dhcp, hostname, intrepid, ubuntu


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
dhcp hostname ahz10 Linux - Networking 1 05-06-2005 03:40 PM
Get hostname from DHCP microft Linux - Networking 2 07-18-2004 03:31 PM
DHCP Hostname Celestial Linux - Newbie 1 06-30-2004 06:50 PM
PB with DHCP and HostName jp515 *BSD 1 11-21-2003 04:57 AM
hostname changes with DHCP nathangg Linux - Networking 1 02-24-2003 07:38 PM


All times are GMT -5. The time now is 07:12 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration