Problem with LPRng

Gregory Davis gdavis7 at
Tue Oct 23 09:22:50 PDT 2001

J.A. Neitzel wrote:

> Wolfgang Proehl wrote:
>> Hi Jeff,
>> 'hostname -vf' gives: gethostname()='sokrates'
>> Resolving 'sokrates' ...
>> hostname: Host name lookup failure
>> And no, there is no /etc/hosts, so i think i have to create one
>> accordingly to the LFS-book. By the way, why do i need this for printing.
> Yes, you do want to have /etc/hosts . Create one by following the
> book's directions...
> Something like:
> sokrates.localdomain sokrates localhost
> should be fine if this machine does not have a NIC and is not part of
> a local network. Also, be sure that /etc/nsswitch.conf exists as well
> and that both /etc/hosts and /etc/nsswitch.conf are world-readable
> with mode 0644 .
> Why do you need these things for printing??? Well, like many other
> UNIX programs, your printing daemon has certain network capabilities.
> I don't know LPRng exactly... Look at your LPRng docs and configs for
> more on this.
> Anyway, what it amounts to is that LPRng (from your original message)
> was complaining that your hostname was bad, AND this is a network
> related issue. But, what if you don't have a network? Well, the
> localhost has the loopback network address to kind of ?_simulate_? a
> network (oversimplified description)...
> That is not *exactly* correct wrt the network stuff, but you get the
> idea? Many programs will not operate correctly without this simple
> loopback network interface.

AND if you happen to start LPRng in an init-script before you run your 
localnet script, you will get the same error.  Same reason, but it wouldn't 
matter if you had /etc/hosts or not.  If you setup you /etc/hosts wrong, 
LPRng may actually try to access your computer over your IP address (not 
the localhost address), in which case you would get the error if you have a 
/etc/hosts file, you ran the localnet script before that of LPRng, and you 
ran whatever ethernet/DHCP script after the LPRng script.


"I will share all with you whenever you wish 
and do so without ambition, from which I am more exempt 
and more distant than any man in the world"
Pierre de Fermat
Unsubscribe: send email to listar at
and put 'unsubscribe blfs-support' in the subject header of the message

More information about the blfs-support mailing list