View previous topic :: View next topic |
Author |
Message |
mutex Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 04 Sep 2003 Posts: 146
|
Posted: Wed Sep 24, 2003 8:51 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
digital diesel Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/11690539353f1ebc1a7232e.png)
Joined: 28 Oct 2002 Posts: 111 Location: pittsburgh, pa
|
Posted: Wed Sep 24, 2003 10:52 pm Post subject: |
|
|
This is happening to me too, i'm having the exact same problem, I have followed the same steps. This sucks because i need to get this box into production? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Genone Retired Dev
![Retired Dev Retired Dev](/images/ranks/rank-retired.gif)
![](images/avatars/21004157514287ab2b29021.jpg)
Joined: 14 Mar 2003 Posts: 9625 Location: beyond the rim
|
Posted: Wed Sep 24, 2003 11:58 pm Post subject: |
|
|
\o = NIS domainname, specified in /etc/nisdomainname and /etc/domainname
\O = DNS domainname, specified in /etc/dnsdomainname and /etc/resolv.conf |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
mutex Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 04 Sep 2003 Posts: 146
|
Posted: Thu Sep 25, 2003 12:44 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
Genone Retired Dev
![Retired Dev Retired Dev](/images/ranks/rank-retired.gif)
![](images/avatars/21004157514287ab2b29021.jpg)
Joined: 14 Mar 2003 Posts: 9625 Location: beyond the rim
|
Posted: Thu Sep 25, 2003 12:58 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
mutex Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 04 Sep 2003 Posts: 146
|
Posted: Thu Sep 25, 2003 3:26 am Post subject: |
|
|
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 . |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
jamesrt n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 09 Sep 2003 Posts: 47 Location: New Zealand
|
Posted: Thu Sep 25, 2003 3:27 am Post subject: You need to be reverse-resolvable - this fix may help |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
b0fh Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/764851073415e70bdd3345.jpg)
Joined: 16 Jun 2003 Posts: 426
|
Posted: Thu Sep 25, 2003 6:22 am Post subject: |
|
|
But what should I put in dnsdomain if I actually have no domain? local.lan? Nothing? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
mutex Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 04 Sep 2003 Posts: 146
|
Posted: Thu Sep 25, 2003 6:53 pm Post subject: |
|
|
I already have my IP resolving to gentoo.tc.ph.cox.net in the hosts file... so the problem still is happening for me. ![Confused :?](images/smiles/icon_confused.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
jamesrt n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 09 Sep 2003 Posts: 47 Location: New Zealand
|
Posted: Thu Sep 25, 2003 9:52 pm Post subject: |
|
|
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. ![Confused :?](images/smiles/icon_confused.gif) |
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 |
|
![](templates/gentoo/images/spacer.gif) |
jamesrt n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 09 Sep 2003 Posts: 47 Location: New Zealand
|
Posted: Thu Sep 25, 2003 9:52 pm Post subject: |
|
|
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. ![Confused :?](images/smiles/icon_confused.gif) |
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 |
|
![](templates/gentoo/images/spacer.gif) |
digital diesel Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/11690539353f1ebc1a7232e.png)
Joined: 28 Oct 2002 Posts: 111 Location: pittsburgh, pa
|
Posted: Thu Sep 25, 2003 11:20 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
mutex Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 04 Sep 2003 Posts: 146
|
Posted: Fri Sep 26, 2003 7:13 pm Post subject: |
|
|
After adding the hostname to my hosts file as described above, I still have the same problem on 3 seperate machines. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Tridus n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 04 Oct 2003 Posts: 12 Location: Canada
|
Posted: Sat Oct 04, 2003 1:49 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
Niko_K Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/3e2fd6853dcec9c0adb9f.gif)
Joined: 19 Sep 2002 Posts: 484 Location: Rietz/Tirol
|
Posted: Mon Oct 13, 2003 9:33 am Post subject: Nice |
|
|
Hi,
helped for me!
Thank you jamesrt & Tridus!
Niko _________________ Meine Homepage |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
mucousmachine n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/gallery/Marvel/Marvel_-_Magneto.gif)
Joined: 04 Jun 2003 Posts: 1 Location: Honolulu, Hawaii
|
Posted: Fri Oct 24, 2003 10:13 am Post subject: editing /etc/issue to replace the entry \O with \o |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
taiger Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 25 Nov 2003 Posts: 112
|
Posted: Thu Jan 15, 2004 5:31 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
ewtrowbr Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 08 May 2004 Posts: 153 Location: Columbus, OH
|
Posted: Thu Oct 07, 2004 6:13 pm Post subject: Digital Diesel |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
michaelarch Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/gallery/Loony Toons/Looney_Toons_-_Speedy.gif)
Joined: 08 May 2003 Posts: 87 Location: Huntsville, AL
|
Posted: Thu Oct 07, 2004 8:25 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
|