[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: FQDN foobar

On Fri, Mar 01, 2002 at 12:20:50PM +0100, Robert Waldner wrote:
| Hi!
| I have a problem with the way gethostname() and getdomainname (don't) 
|  work on Debian.
| gethostname() returns the hostname, not qualified. 

It (or a similarly named function, I don't remember exactly) returns
the first name for the "" entry in /etc/hosts.  If you look
at that line, I bet your unqualified hostname is the name there.  Add
your FQHN to the loopback entry as the first name and see if that
solves your problem.



Microsoft: "Windows NT 4.0 now has the same user-interface as Windows 95"
    Windows 95: "Press CTRL-ALT-DEL to reboot"
Windows NT 4.0: "Press CTRL-ALT-DEL to login"

Reply to: