Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
nknown_domain
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2  
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
mutex
Tux's lil' helper
Tux's lil' helper


Joined: 04 Sep 2003
Posts: 146

PostPosted: Wed Sep 24, 2003 8:51 pm    Post subject: Reply with quote

For me, the \o instead of the \O just puts out "(none)"... so that my login looks like this (given a host name of gentoo):
This is gentoo.(none)

etc

it doesn't say the DNS name.
Back to top
View user's profile Send private message
digital diesel
Tux's lil' helper
Tux's lil' helper


Joined: 28 Oct 2002
Posts: 111
Location: pittsburgh, pa

PostPosted: Wed Sep 24, 2003 10:52 pm    Post subject: Reply with quote

This is happening to me too, i'm having the exact same problem, I have followed the same steps. This sucks :evil: because i need to get this box into production?
Back to top
View user's profile Send private message
Genone
Retired Dev
Retired Dev


Joined: 14 Mar 2003
Posts: 9625
Location: beyond the rim

PostPosted: Wed Sep 24, 2003 11:58 pm    Post subject: Reply with quote

\o = NIS domainname, specified in /etc/nisdomainname and /etc/domainname
\O = DNS domainname, specified in /etc/dnsdomainname and /etc/resolv.conf
Back to top
View user's profile Send private message
mutex
Tux's lil' helper
Tux's lil' helper


Joined: 04 Sep 2003
Posts: 146

PostPosted: Thu Sep 25, 2003 12:44 am    Post subject: Reply with quote

Ok, well the only thing I have in resolv.conf is a 'nameserver' entry for my DNS server... what else should I put in there?
Back to top
View user's profile Send private message
Genone
Retired Dev
Retired Dev


Joined: 14 Mar 2003
Posts: 9625
Location: beyond the rim

PostPosted: Thu Sep 25, 2003 12:58 am    Post subject: Reply with quote

put your dns domainname in /etc/dnsdomainname and start /etc/init.d/domainname, that should do the necessary changes to /etc/resolv.conf. It's just a line "domain <your-domain-here>"
Back to top
View user's profile Send private message
mutex
Tux's lil' helper
Tux's lil' helper


Joined: 04 Sep 2003
Posts: 146

PostPosted: Thu Sep 25, 2003 3:26 am    Post subject: Reply with quote

Still not working:
I did /etc/init.d/domainname start, said it updated the domain name, also did rc-udpate add domainname default... rebooted, still no go. Here's some output:

bash-2.05b$ cat /etc/dnsdomainname
tc.ph.cox.net

bash-2.05b$ cat /etc/resolv.conf
domain tc.ph.cox.net
nameserver 68.2.16.245
nameserver 68.2.16.30
nameserver 68.6.16.30

And my login says:
This is gentoo.nknown_domain (Linux i686 2.4.20-gentoo-r7) 20:22:59

Smells like a bug :P.
Back to top
View user's profile Send private message
jamesrt
n00b
n00b


Joined: 09 Sep 2003
Posts: 47
Location: New Zealand

PostPosted: Thu Sep 25, 2003 3:27 am    Post subject: You need to be reverse-resolvable - this fix may help Reply with quote

Genone wrote:
put your dns domainname in /etc/dnsdomainname and start /etc/init.d/domainname, that should do the necessary changes to /etc/resolv.conf. It's just a line "domain <your-domain-here>"


I've discovered that if your hostname is not reverse-resolvable thru DNS, then you also need to put both the fully-qualified hostname and short-form in your /etc/hosts file before things work correctly, thus:

Code:
grep gentoo /etc/hosts
12.34.56.78 gentoo.mydomain.here gentoo


To this end, I wrote a dhcpcd.exe script (gets automatically run by dhcpcd when the interface goes up or down) to handle this for me, thus:

Code:
cat /etc/init.d/dhcpcd.exe
#!/bin/sh

filename="$1"

switch_file() {
        rm -rf /etc/hosts.old
        mv /etc/hosts /etc/hosts.old
        mv /etc/hosts.new /etc/hosts
}

start() {
        source $filename

        cat /etc/hosts > /etc/hosts.new
        echo "$IPADDR   `cat /etc/hostname`.`cat /etc/dnsdomainname` `cat /etc/hostname`" >> /etc/hosts.new
        switch_file
}

stop() {
        grep -v `hostname -s` /etc/hosts > /etc/hosts.new
        switch_file
}

case "$2" in

        up|new) start;;
        down)   stop;;
esac


On my machine, this originally had to be in /etc/dhcpc, but now it needs to be in /var/lib/dhcpc (presumably the recent emerge update of dhcpcd changed the directory). At any rate, I just symlinked it, like this:

Code:
#ln -s /etc/init.d/dhcpcd.exe /var/lib/dhcpc/dhcpcd.exe
Back to top
View user's profile Send private message
b0fh
Guru
Guru


Joined: 16 Jun 2003
Posts: 426

PostPosted: Thu Sep 25, 2003 6:22 am    Post subject: Reply with quote

But what should I put in dnsdomain if I actually have no domain? local.lan? Nothing?
Back to top
View user's profile Send private message
mutex
Tux's lil' helper
Tux's lil' helper


Joined: 04 Sep 2003
Posts: 146

PostPosted: Thu Sep 25, 2003 6:53 pm    Post subject: Reply with quote

I already have my IP resolving to gentoo.tc.ph.cox.net in the hosts file... so the problem still is happening for me. :?
Back to top
View user's profile Send private message
jamesrt
n00b
n00b


Joined: 09 Sep 2003
Posts: 47
Location: New Zealand

PostPosted: Thu Sep 25, 2003 9:52 pm    Post subject: Reply with quote

mutex wrote:
I already have my IP resolving to gentoo.tc.ph.cox.net in the hosts file... so the problem still is happening for me. :?


Ok, does your hosts file have the unqualified hostname (i.e. "gentoo") as well as the FQDN (i.e. "gentoo.tc.ph.cox.net") ? Mine does, and it works for me; didn't work when the unqualified hostname was deleted (blowed if I know why, either!)

Observe the following:

Code:
# grep gentoo /etc/hosts
12.13.14.15    gentoo.mydomain.com gentoo
# hostname
gentoo
# hostname -s
gentoo
# hostname -f
gentoo.mydomain.com


All working - hostname and FQDN both in hosts file.

After editing the hostsfile, to delete the unqualified hostname ONLY, I get the following:

Code:
# grep gentoo /etc/hosts
12.13.14.15    gentoo.mydomain.com
# hostname
gentoo
# hostname -s
hostname: No address associated with name
# hostname -f
hostname: Unknown host


Now it isn't working correctly - the hostname command can't resolve the FQDN correctly (even though the FQDN is in the /etc/hosts file). Go figure.

Also, after editing the hostsfile, to have ONLY the unqualified hostname, I get the following:

Code:
# grep gentoo /etc/hosts
12.13.14.15    gentoo
# hostname
gentoo
# hostname -s
gentoo
# hostname -f
gentoo


At this point, the machine has lost it's domain, but at least the commands don't return errors.

To sum up, ensure that both FQDN and unqualified hostname appear in /etc/hosts (which is what my previous script does).
Back to top
View user's profile Send private message
jamesrt
n00b
n00b


Joined: 09 Sep 2003
Posts: 47
Location: New Zealand

PostPosted: Thu Sep 25, 2003 9:52 pm    Post subject: Reply with quote

mutex wrote:
I already have my IP resolving to gentoo.tc.ph.cox.net in the hosts file... so the problem still is happening for me. :?


Ok, does your hosts file have the unqualified hostname (i.e. "gentoo") as well as the FQDN (i.e. "gentoo.tc.ph.cox.net") ? Mine does, and it works for me; didn't work when the unqualified hostname was deleted (blowed if I know why, either!)

Observe the following:

Code:
# grep gentoo /etc/hosts
12.13.14.15    gentoo.mydomain.com gentoo
# hostname
gentoo
# hostname -s
gentoo
# hostname -f
gentoo.mydomain.com


All working - hostname and FQDN both in hosts file.

After editing the hostsfile, to delete the unqualified hostname ONLY, I get the following:

Code:
# grep gentoo /etc/hosts
12.13.14.15    gentoo.mydomain.com
# hostname
gentoo
# hostname -s
hostname: No address associated with name
# hostname -f
hostname: Unknown host


Now it isn't working correctly - the hostname command can't resolve the FQDN correctly (even though the FQDN is in the /etc/hosts file). Go figure.

Also, after editing the hostsfile, to have ONLY the unqualified hostname, I get the following:

Code:
# grep gentoo /etc/hosts
12.13.14.15    gentoo
# hostname
gentoo
# hostname -s
gentoo
# hostname -f
gentoo


At this point, the machine has lost it's domain, but at least the commands don't return errors.

To sum up, ensure that both FQDN and unqualified hostname appear in /etc/hosts (which is what my previous script does).
Back to top
View user's profile Send private message
digital diesel
Tux's lil' helper
Tux's lil' helper


Joined: 28 Oct 2002
Posts: 111
Location: pittsburgh, pa

PostPosted: Thu Sep 25, 2003 11:20 pm    Post subject: Reply with quote

Thank you for your post, it help resolve my issue, at least half way.

I'm using DHCP on a cable modem from attbi.com

When i say:

mutt -x root

it sends it to root@dallas.attbi.com and i get this error:
sendmail: 553 malformed address: <root@_HOSTNAME_>


But I want it to be from it's hostname -f:
dallas.pmidigital.com

So far in my /etc/conf.d/local.start i have this:
echo 'domain pmidigital.com' >> /etc/resolve.conf

Is there a way not to have DHCP force it's domain on me
Back to top
View user's profile Send private message
mutex
Tux's lil' helper
Tux's lil' helper


Joined: 04 Sep 2003
Posts: 146

PostPosted: Fri Sep 26, 2003 7:13 pm    Post subject: Reply with quote

After adding the hostname to my hosts file as described above, I still have the same problem on 3 seperate machines.
Back to top
View user's profile Send private message
Tridus
n00b
n00b


Joined: 04 Oct 2003
Posts: 12
Location: Canada

PostPosted: Sat Oct 04, 2003 1:49 pm    Post subject: Reply with quote

Setting the FQDN in /etc/hosts did it for me, although they had to be in this order:

1.2.3.4 hostname.domain.name hostname

Putting hostname before hostname.domain.name for some reason caused it to not work.

Hopefully that helps somebody.
Back to top
View user's profile Send private message
Niko_K
Guru
Guru


Joined: 19 Sep 2002
Posts: 484
Location: Rietz/Tirol

PostPosted: Mon Oct 13, 2003 9:33 am    Post subject: Nice Reply with quote

Hi,

helped for me!
Thank you jamesrt & Tridus!

Niko
_________________
Meine Homepage
Back to top
View user's profile Send private message
mucousmachine
n00b
n00b


Joined: 04 Jun 2003
Posts: 1
Location: Honolulu, Hawaii

PostPosted: Fri Oct 24, 2003 10:13 am    Post subject: editing /etc/issue to replace the entry \O with \o Reply with quote

if your login is saying mymachine.(none) or mymachine.nknown_domain
then do like jlowell said,
just edit /etc/issue,
replace the "O" with an "o"

I've looked all over the place, and it was a little thing like this!
Back to top
View user's profile Send private message
taiger
Tux's lil' helper
Tux's lil' helper


Joined: 25 Nov 2003
Posts: 112

PostPosted: Thu Jan 15, 2004 5:31 pm    Post subject: Reply with quote

this is a very strange problem.

I solved this problem by changing the position of occurrence in /etc/hosts
localhost in first position is bud!!!

example:
error:
127.0.0.1 localhost tigrePC.baracca.com tigrePC

correct:
127.0.0.1 tigrePC.baracca.com tigrePC localhost
Back to top
View user's profile Send private message
ewtrowbr
Apprentice
Apprentice


Joined: 08 May 2004
Posts: 153
Location: Columbus, OH

PostPosted: Thu Oct 07, 2004 6:13 pm    Post subject: Digital Diesel Reply with quote

553 malformed address: <root@_HOSTNAME_>

to get rid of the _HOSTNAME_ problem, go edit /etc/ssmtp/ssmtp.conf.

Had the same problem, and just found this...

erich
Back to top
View user's profile Send private message
michaelarch
Tux's lil' helper
Tux's lil' helper


Joined: 08 May 2003
Posts: 87
Location: Huntsville, AL

PostPosted: Thu Oct 07, 2004 8:25 pm    Post subject: Reply with quote

mutex wrote:
bash-2.05b$ cat /etc/resolv.conf
domain tc.ph.cox.net
nameserver 68.2.16.245
nameserver 68.2.16.30
nameserver 68.6.16.30


Hello,
I had the same problem, and after I removed the domain entry in the resolv.conf file, it worked again. Hope this helps.

V/R,
Michael
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum