LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-04-2002, 09:58 PM   #1
KL2001
Member
 
Registered: Sep 2002
Location: MN, USA
Distribution: RedHat 8.0
Posts: 30

Rep: Reputation: 15
Question LPD error - bad hostname RH7.3


I have an epson color 880 that I had setup and working in RH7.3, but when I moved to school, I now get a hostname assigned when my computer logs onto the network (didn't have this setup on my home network). Now, I am trying to get my printer to work again, and I get:

[kl2001@{ip} kl2001]$ lpq
Get_local_host: hostname '**-***-***-***.xxx.xx.xxxxxxxx.xxx' bad
[kl2001@{ip} kl2001]$

I tried manually setting a hostname in my /etc/sysconfig/network file, but to no avail, just get the same error, but instead of my IP, I get my chosen hostname in the error.

I tried re-installing the printer (gui) before I typed lpq into the console and saw this error, as the gui doesn't report the error, just that it can't send data to the printer.

Any help would be appreciated.

Thank you in advance.

 
Old 09-04-2002, 11:33 PM   #2
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
sounds like you are trying to use an invalid name
 
Old 09-05-2002, 12:13 AM   #3
KL2001
Member
 
Registered: Sep 2002
Location: MN, USA
Distribution: RedHat 8.0
Posts: 30

Original Poster
Rep: Reputation: 15
the hostname is assigned by the ISP... can I force a valid localhost somehow???
 
Old 09-05-2002, 03:31 AM   #4
born4linux
Senior Member
 
Registered: Sep 2002
Location: Philippines
Distribution: Slackware, RHEL&variants, AIX, SuSE
Posts: 1,127

Rep: Reputation: 49
run this command:

hostname

Then edit /etc/hosts and set you 127.0.0.1 line to this:

# this is just one line
127.0.0.1 localhost.localdomain localhost localhost output_of_the_hostname_command

Save the file and run this:

/sbin/service lpd restart
 
Old 09-05-2002, 07:36 AM   #5
KL2001
Member
 
Registered: Sep 2002
Location: MN, USA
Distribution: RedHat 8.0
Posts: 30

Original Poster
Rep: Reputation: 15
great, it's working now, but won't I get the error again if I get assigned a different IP by my ISP??? is there a way to use wildcards to nake it so I don't have to re-do this each time I get a new IP?
 
Old 09-05-2002, 08:26 AM   #6
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
the 127.0.0.1 will never change
 
Old 09-05-2002, 11:09 AM   #7
KL2001
Member
 
Registered: Sep 2002
Location: MN, USA
Distribution: RedHat 8.0
Posts: 30

Original Poster
Rep: Reputation: 15
no, that won't, but the results from hostname will, which is assigned by my ISP, and consists of my IP plus thier domain (i.e. 192.168.122.255.charter.com)
 
Old 09-05-2002, 12:19 PM   #8
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
bummer

try it like this

127.0.0.1 localhost.localdomain localhost localhost $HOSTNAME


I dont know if it will work but I guess it's worth a try
 
Old 09-05-2002, 12:39 PM   #9
KL2001
Member
 
Registered: Sep 2002
Location: MN, USA
Distribution: RedHat 8.0
Posts: 30

Original Poster
Rep: Reputation: 15
No joy on the $HOSTNAME entry...looks like I will just have to change the file, or try to retain my IP address....
 
Old 09-05-2002, 03:42 PM   #10
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
one other way is to have the file built like so

echo 127.0.0.1 localhost.localhost localhost $HOSTNAME > /etc/hosts


put the command in rc.local if you connect on boot if not run it as a script after connecting
 
Old 09-05-2002, 05:32 PM   #11
KL2001
Member
 
Registered: Sep 2002
Location: MN, USA
Distribution: RedHat 8.0
Posts: 30

Original Poster
Rep: Reputation: 15
that looks like it might work, we'll see if it holds up when my ISP changes IPs
 
  


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
lpd - Get_Local_Host : HostName 'LocalHost' bad chanmy8 Linux - General 4 03-02-2006 03:13 PM
Get_local_host: hostname '...' bad christophe.dr Linux - Newbie 6 12-15-2003 04:02 PM
How can I replace Redhat 9 printing via cups with lpd as in RH7 and 8? jhodge Red Hat 3 11-03-2003 05:29 PM
lpd error prue3 Linux - Software 0 04-23-2003 02:09 AM
Unable to define RH7.3 hostname glorinc Linux - Networking 3 09-09-2002 06:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:17 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