LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-22-2002, 09:06 AM   #1
hbob
LQ Newbie
 
Registered: May 2002
Posts: 5

Rep: Reputation: 0
invalid hostname using dhcp


I have recently upgraded my cable modem. Actually my cable company did. The new setup is much faster and more reliable. It works great to surf. Prior to getting the new modem, I used to see the IP address that was assigned to me as part of my command line prompt (ie root@99-99-99-99). Now i get root@JOHNHOLC. I think that is my user Fullname. Surfing the web works fine, but if I try to start LPD or print anything, I get an invalid hostname error. I've never had this problem before. What should my hostname be? I have not been able to find the assigned IP addresses listed anywhere on my system. Can I put somehting in etc/hosts that will fix this? Why does LPD need my hostname? Any help would be greatly appreciated. JH
 
Old 05-22-2002, 10:07 AM   #2
xanthium
Member
 
Registered: Apr 2001
Location: Bombay ( INDIA )
Distribution: RedHat 7.x
Posts: 218

Rep: Reputation: 30
remote printing ?

Hi ,

Are u using a remote printer or a local one ?

Regards,
Xanthium.
 
Old 05-22-2002, 10:39 AM   #3
hbob
LQ Newbie
 
Registered: May 2002
Posts: 5

Original Poster
Rep: Reputation: 0
My printer is local.
 
Old 05-23-2002, 03:13 AM   #4
xanthium
Member
 
Registered: Apr 2001
Location: Bombay ( INDIA )
Distribution: RedHat 7.x
Posts: 218

Rep: Reputation: 30
Unhappy sorry

Hi ,


Sorry but i really dont have any solution to suggest!
Ask one of the moderators ... meybe they can help .


Sorry.

Regards,
xanthium.
 
Old 05-23-2002, 08:41 AM   #5
hbob
LQ Newbie
 
Registered: May 2002
Posts: 5

Original Poster
Rep: Reputation: 0
I think I have solved my problem with the help of some ideas I got from other posts here. I ran /sbin/ifconfig. I took the INET address listed under eth0 in the results and added a line in etc/hosts with that address and the hostname of JOHNHOLC. I no longer see an unknown host message flash when I bring up xwindows and printing works. Also LPD is started on boot-up as it should. I hope this works long term. I wonder if I will have to repeat this process, if my IP address to my ISP is changed through DHCP. We will see.
 
Old 05-23-2002, 10:40 AM   #6
xanthium
Member
 
Registered: Apr 2001
Location: Bombay ( INDIA )
Distribution: RedHat 7.x
Posts: 218

Rep: Reputation: 30
printcap

hi hbob ,

Well i could have suggested u the thing but the only problem is the just what u mentioned ... ie; if the IP change u will start getting the error again (ofcourse with little scripting u can get it working ).... i still cant figure out why u got the error for local printer !

can u post the contents of printcap file ?

Regards,
Xanthium
 
Old 05-23-2002, 10:06 PM   #7
hbob
LQ Newbie
 
Registered: May 2002
Posts: 5

Original Poster
Rep: Reputation: 0
Below is the contents of my printcap. I have a Lexmark Z52 printer. The driver I use is downloaded from Lexmark. It has its own install program, which creates the 3 queue entries you see. I am not sure why they wanted to use all three.

##PRINTTOOL3## LOCAL
lexmarkz52:\
:sd=/var/spool/lpd/lexmarkz52:\
:mx#0:\
:sh:\
:lp=/dev/usb/lp0:\
:if=/usr/local/lexmark/z52/z52.sh:
##PRINTTOOL3## LOCAL
z52-outfiles:\
:sd=/var/spool/lpd/z52-outfiles:\
:mx#0:\
:sh:\
:lp=/dev/usb/lp0:
##PRINTTOOL3## LOCAL
lp:\
:sd=/var/spool/lpd/lp:\
:mx#0:\
:sh:\
:lp=/dev/usb/lp0:\
:if=/usr/local/lexmark/z52/z52.sh:
 
Old 05-26-2002, 02:41 PM   #8
hbob
LQ Newbie
 
Registered: May 2002
Posts: 5

Original Poster
Rep: Reputation: 0
I am guessing that the reason I need a valid hostname to run lpd for printing is because lpd is a service.
 
Old 05-27-2002, 01:36 AM   #9
Noerr
Member
 
Registered: May 2002
Location: Dalec, HU
Distribution: Redhat 7.3
Posts: 696

Rep: Reputation: 30
if you set /etc/sysconfig/network HOSTNAME=yourname
should have your computername regardless of dhcp
 
  


Reply



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
Invalid DHCP server lease time CloudBuilder Linux - Wireless Networking 3 04-30-2004 08:41 PM
dhcp hostname .... phoeniXflame Linux - Networking 6 12-07-2003 11:12 AM
PB with DHCP and HostName jp515 *BSD 1 11-21-2003 04:57 AM
invalid hostname nattybumpo Linux - Networking 1 04-16-2003 06:22 PM
hostname changes with DHCP nathangg Linux - Networking 1 02-24-2003 07:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration