[opensuse] Setting domain name in Yast
On both Tumbleweed and Leap 42.3, if I set the domain name in YaST2 (Network Settings -> Hostname -> Domain Name), it seems not to be kept. If I check after saving it, it is once again empty. And the hostname command does not report it. In my case, the domain name is ramboll.ramboll-group.global.network, which I think should be accepted. It is not my choice for the domain name. It is the company domain. Isn't this the way to set the domain name? -- Roger Oberholtzer -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Roger Oberholtzer wrote:
On both Tumbleweed and Leap 42.3, if I set the domain name in YaST2 (Network Settings -> Hostname -> Domain Name), it seems not to be kept. If I check after saving it, it is once again empty. And the hostname command does not report it. In my case, the domain name is ramboll.ramboll-group.global.network, which I think should be accepted. It is not my choice for the domain name. It is the company domain.
Isn't this the way to set the domain name?
Sounds good - did you also stop dhcp from changing it? -- Per Jessen, Zürich (23.5°C) http://www.dns24.ch/ - free dynamic DNS, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 08/22/2017 09:14 AM, Per Jessen wrote:
Roger Oberholtzer wrote:
On both Tumbleweed and Leap 42.3, if I set the domain name in YaST2 (Network Settings -> Hostname -> Domain Name), it seems not to be kept. If I check after saving it, it is once again empty. And the hostname command does not report it. In my case, the domain name is ramboll.ramboll-group.global.network, which I think should be accepted. It is not my choice for the domain name. It is the company domain.
Isn't this the way to set the domain name? Sounds good - did you also stop dhcp from changing it?
I have the same problem on a system that uses static configuration, not DHCP. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 08/22/2017 08:31 AM, James Knott wrote:
Isn't this the way to set the domain name? Sounds good - did you also stop dhcp from changing it?
I have the same problem on a system that uses static configuration, not DHCP.
The traditional way is to set the fully-qualified hostname for localhost in /etc/hosts. For example, on my 42.2 laptop, I have the following: # IP-Address Full-Qualified-Hostname Short-Hostname 127.0.0.1 wizard.3111skyline.com localhost wizard (note: Short-Hostname can specify any number of aliases for the fully qualified hostname) It is the same on each distro I use. SuSE used to use a 127.0.0.2 ip as well, but that seems to have gone away. The correct entry in /etc/hosts insures dnsdomainname picks up the correct domain, e.g. $ dnsdomainname 3111skyline.com -- David C. Rankin, J.D.,P.E. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 08/22/2017 06:45 PM, David C. Rankin wrote:
On 08/22/2017 08:31 AM, James Knott wrote:
Isn't this the way to set the domain name? Sounds good - did you also stop dhcp from changing it?
I have the same problem on a system that uses static configuration, not DHCP. The traditional way is to set the fully-qualified hostname for localhost in /etc/hosts. For example, on my 42.2 laptop, I have the following:
# IP-Address Full-Qualified-Hostname Short-Hostname
127.0.0.1 wizard.3111skyline.com localhost wizard
(note: Short-Hostname can specify any number of aliases for the fully qualified hostname)
It is the same on each distro I use. SuSE used to use a 127.0.0.2 ip as well, but that seems to have gone away.
The correct entry in /etc/hosts insures dnsdomainname picks up the correct domain, e.g.
$ dnsdomainname 3111skyline.com
On my system, 127.0.0.1 just says localhost. I have a DNS for host names. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 08/22/2017 08:30 PM, James Knott wrote:
On my system, 127.0.0.1 just says localhost. I have a DNS for host names.
Well, you still need the entry in /etc/hosts unless you have an A record in bind (or other dns) running on localhost providing resolution for localhost/hostname. There have been a number of changes in gethostbyname, (though I don't recall the details) where this exact issue of local resolution and gethostbyname, dnsdomainname were not being handled adequately. I do recall the solution being a proper entry in /etc/hosts to provide local hostname/domain resolution. I run bind too (not on my laptop, but locally) and you still need the /etc/hosts entry. You are not providing an IP for your hostname, you are just providing correct resolution between localhost and your fully-qualified hostname. It can have any IP required provided by your network device config or dhcp. You can try with just dns, but then on localhost, make sure dnshostname resolves correctly. -- David C. Rankin, J.D.,P.E. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 08/22/2017 09:20 PM, David C. Rankin wrote:
You can try with just dns, but then on localhost, make sure dnshostname resolves correctly.
typo dnsdomainname :) -- David C. Rankin, J.D.,P.E. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 08/22/2017 10:20 PM, David C. Rankin wrote:
On 08/22/2017 08:30 PM, James Knott wrote:
On my system, 127.0.0.1 just says localhost. I have a DNS for host names.
Well, you still need the entry in /etc/hosts unless you have an A record in bind (or other dns) running on localhost providing resolution for localhost/hostname.
I run the DNS resolver on pfSense. It provides both IPv4 & IPv6 addresses for my network. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 22/08/17 10:20 PM, David C. Rankin wrote:
There have been a number of changes in gethostbyname, (though I don't recall the details) where this exact issue of local resolution and gethostbyname, dnsdomainname were not being handled adequately. I do recall the solution being a proper entry in /etc/hosts to provide local hostname/domain resolution.
I've not seen mentions so far in this thread of the setting in /etc/nsswitch.conf RTFM The Name Service Switch (NSS) configuration file, /etc/nsswitch.conf, is used by the GNU C Library to determine the sources from which to obtain name-service information in a range of categories, and in what order. ... hosts: Host names and numbers, used by gethostbyname(3) and related functions. My entry reads: hosts: files mdns_minimal [NOTFOUND=return] dns Which means that it consults /etc/hosts first. I am also using 'dnsmasq'. Actually that is a very smart program, it not only reads in /etc/hosts so I _could_ omit 'files" from my nsswitch.conf entry, but it also handles DHCP as well and makes sure that when a DHCP IP address is handed out there is a corresponding DNS entry for it :-) Nice, eh? See also http://blog.uguu.waw.pl/2015/05/21/mdns-netbsd-linux-osx/ Do note that in https://www.tinc-vpn.org/examples/zeroconf-ip-and-dns/ it says This will allow your computer to resolve mDNS hostnames which addresses in the form of "something.local". and later Note that you can use a different top level domain than .local, but in such case you need to use mdns entry instead of mdns_minimal. -- A: Yes. > Q: Are you sure? >> A: Because it reverses the logical flow of conversation. >>> Q: Why is top posting frowned upon? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 08/22/2017 10:01 PM, Anton Aylward wrote:
I am also using 'dnsmasq'.
Actually that is a very smart program, it not only reads in /etc/hosts so I _could_ omit 'files" from my nsswitch.conf entry, but it also handles DHCP as well and makes sure that when a DHCP IP address is handed out there is a corresponding DNS entry for it :-) Nice, eh?
Yes, super-smart. I've run into dnsmasq setting up PXEboot and it is orders of magnitude more user friendly than bind. But after running bind for nearly two decades and utilizing the ddns updates from dhcpd (which became all the more important with the proliferation of everything under the sun my kids drag in wanting an IP address), I've just stuck with it. -- David C. Rankin, J.D.,P.E. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
David C. Rankin wrote:
On 08/22/2017 08:30 PM, James Knott wrote:
On my system, 127.0.0.1 just says localhost. I have a DNS for host names.
Well, you still need the entry in /etc/hosts unless you have an A record in bind (or other dns) running on localhost providing resolution for localhost/hostname.
A typical dns zone will also have an entry for 'localhost'. Well, I've always had that.
I run bind too (not on my laptop, but locally) and you still need the /etc/hosts entry. You are not providing an IP for your hostname, you are just providing correct resolution between localhost and your fully-qualified hostname. It can have any IP required provided by your network device config or dhcp.
Are you saying the vanilla /etc/hosts (see below) as installed with the system is not sufficient? 127.0.0.1 localhost ::1 localhost ipv6-localhost ipv6-loopback fe00::0 ipv6-localnet ff00::0 ipv6-mcastprefix ff02::1 ipv6-allnodes ff02::2 ipv6-allrouters ff02::3 ipv6-allhosts -- Per Jessen, Zürich (18.1°C) http://www.dns24.ch/ - your free DNS host, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 08/23/2017 02:12 AM, Per Jessen wrote:
I run bind too (not on my laptop, but locally) and you still need the
/etc/hosts entry. You are not providing an IP for your hostname, you are just providing correct resolution between localhost and your fully-qualified hostname. It can have any IP required provided by your network device config or dhcp. Are you saying the vanilla /etc/hosts (see below) as installed with the system is not sufficient?
Not if you've got more than a couple of devices on the network. Also, you probably don't want to use it on a notebook computer that you use elsewhere. For example, on IPv4, the local DNS provides RFC1918 addresses for devices on my network. But if I'm away from home the host name for my main computer returns my single public IPv4 address, which then gets forwarded to the computer. Also, on IPv6, as an experiment, I set up Unique Local Addresses, which is used within my LAN, though I could use the global addresses. So, at home, my DNS returns those ULA addresses, but away from home, the public DNS returns the global addresses. Unique Local Addresses are the IPv6 equivalent of the IPv4 RFC1918 addresses. https://en.wikipedia.org/wiki/Unique_local_address -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
James Knott wrote:
On 08/23/2017 02:12 AM, Per Jessen wrote:
I run bind too (not on my laptop, but locally) and you still need the
/etc/hosts entry. You are not providing an IP for your hostname, you are just providing correct resolution between localhost and your fully-qualified hostname. It can have any IP required provided by your network device config or dhcp. Are you saying the vanilla /etc/hosts (see below) as installed with the system is not sufficient?
Not if you've got more than a couple of devices on the network.
I do, plenty of devices. But I also have a working DNS. I never touch /etc/hosts. -- Per Jessen, Zürich (24.1°C) http://www.dns24.ch/ - free dynamic DNS, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 08/23/2017 03:05 PM, Per Jessen wrote:
Not if you've got more than a couple of devices on the network. I do, plenty of devices. But I also have a working DNS. I never touch /etc/hosts.
That was my point. Editing /etc/hosts is OK if you only have a couple of devices, but can be fun keeping the file updated for several devices on several devices. That's why I started using my own DNS years ago. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Tue, 22 Aug 2017 21:20:56 -0500 "David C. Rankin" <drankinatty@suddenlinkmail.com> wrote:
I run bind too (not on my laptop, but locally) and you still need the /etc/hosts entry. You are not providing an IP for your hostname, you are just providing correct resolution between localhost and your fully-qualified hostname. It can have any IP required provided by your network device config or dhcp.
I don't pretend to understand how this all works but this can't be the whole story. 127.0.0.1 is localhost and that is on a different interface to your fully-qualified hostname. Indeed 'your fully-qualified hostname' isn't even a well-defined term, because if you have more than one interface on the computer then they have different fully-qualified hostnames. I've never put the FQ name on the same line as the loopback name. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 23/08/17 06:38 AM, Dave Howorth wrote:
I've never put the FQ name on the same line as the loopback name.
Since the loopback interface is not network addressable, never mind internet addressable!, there's no point in having a FQDN alias. At best you might add an alias such as "me" or "self" :-) -- A: Yes. > Q: Are you sure? >> A: Because it reverses the logical flow of conversation. >>> Q: Why is top posting frowned upon? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 08/23/2017 06:38 AM, Dave Howorth wrote:
On Tue, 22 Aug 2017 21:20:56 -0500 "David C. Rankin" <drankinatty@suddenlinkmail.com> wrote:
I run bind too (not on my laptop, but locally) and you still need the /etc/hosts entry. You are not providing an IP for your hostname, you are just providing correct resolution between localhost and your fully-qualified hostname. It can have any IP required provided by your network device config or dhcp. I don't pretend to understand how this all works but this can't be the whole story. 127.0.0.1 is localhost and that is on a different interface to your fully-qualified hostname. Indeed 'your fully-qualified hostname' isn't even a well-defined term, because if you have more than one interface on the computer then they have different fully-qualified hostnames. I've never put the FQ name on the same line as the loopback name.
The interface is irrelevant. The hosts file, DNS, etc., are used to map a host name, including localhost, to an IP address. It's then up to the routing function of the operating system, to determine the appropriate interface etc.. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2017-08-23 12:38, Dave Howorth wrote:
On Tue, 22 Aug 2017 21:20:56 -0500 "David C. Rankin" <drankinatty@suddenlinkmail.com> wrote:
I run bind too (not on my laptop, but locally) and you still need the /etc/hosts entry. You are not providing an IP for your hostname, you are just providing correct resolution between localhost and your fully-qualified hostname. It can have any IP required provided by your network device config or dhcp.
I don't pretend to understand how this all works but this can't be the whole story. 127.0.0.1 is localhost and that is on a different interface to your fully-qualified hostname. Indeed 'your fully-qualified hostname' isn't even a well-defined term, because if you have more than one interface on the computer then they have different fully-qualified hostnames. I've never put the FQ name on the same line as the loopback name.
At least on the past there was a tick box in YaST that would create an entry with 127.0.0.2 to the fully qualified name. But this entry breaks postfix. It is better to put the fqdn on the local network interface, not locahost. -- Cheers / Saludos, Carlos E. R. (from 42.2 x86_64 "Malachite" at Telcontar)
On 2017-08-23 16:19, Carlos E. R. wrote:
On 2017-08-23 12:38, Dave Howorth wrote:
On Tue, 22 Aug 2017 21:20:56 -0500 "David C. Rankin" <> wrote:
I run bind too (not on my laptop, but locally) and you still need the /etc/hosts entry. You are not providing an IP for your hostname, you are just providing correct resolution between localhost and your fully-qualified hostname. It can have any IP required provided by your network device config or dhcp.
I don't pretend to understand how this all works but this can't be the whole story. 127.0.0.1 is localhost and that is on a different interface to your fully-qualified hostname. Indeed 'your fully-qualified hostname' isn't even a well-defined term, because if you have more than one interface on the computer then they have different fully-qualified hostnames. I've never put the FQ name on the same line as the loopback name.
At least on the past there was a tick box in YaST that would create an entry with 127.0.0.2 to the fully qualified name. But this entry breaks postfix. It is better to put the fqdn on the local network interface, not locahost.
Tickbox is in yast, network settings, Hostname tab: "Assign Hostname to Loopback IP" -- Cheers / Saludos, Carlos E. R. (from 42.2 x86_64 "Malachite" at Telcontar)
On 08/23/2017 10:49 AM, Carlos E. R. wrote:
Tickbox is in yast, network settings, Hostname tab: "Assign Hostname to Loopback IP"
I just tried that and it adds just the host name, not domain for 127.0.0.2. I don't see similar for the IPv6 loop back address ::1. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2017-08-23 16:55, James Knott wrote:
On 08/23/2017 10:49 AM, Carlos E. R. wrote:
Tickbox is in yast, network settings, Hostname tab: "Assign Hostname to Loopback IP"
I just tried that and it adds just the host name, not domain for 127.0.0.2. I don't see similar for the IPv6 loop back address ::1.
I have not used it in years, since we found out that it breaks postfix. [Bug 824141] New: appending 127.0.0.2 line to /etc/hosts causes postfix to go berseck Product: openSUSE 12.3 wontfix, 2015: It is not our issue. Postfix main developer: If your distributor changes this and introduces a problem, then that is your distributor's problem. -- Cheers / Saludos, Carlos E. R. (from 42.2 x86_64 "Malachite" at Telcontar)
David C. Rankin wrote:
On 08/22/2017 08:31 AM, James Knott wrote:
Isn't this the way to set the domain name? Sounds good - did you also stop dhcp from changing it?
I have the same problem on a system that uses static configuration, not DHCP.
The traditional way is to set the fully-qualified hostname for localhost in /etc/hosts. For example, on my 42.2 laptop, I have the following:
# IP-Address Full-Qualified-Hostname Short-Hostname
127.0.0.1 wizard.3111skyline.com localhost wizard
(note: Short-Hostname can specify any number of aliases for the fully qualified hostname)
It is the same on each distro I use. SuSE used to use a 127.0.0.2 ip as well, but that seems to have gone away.
The correct entry in /etc/hosts insures dnsdomainname picks up the correct domain, e.g.
$ dnsdomainname 3111skyline.com
It works perfectly fine without too. I never touch /etc/hosts. My environment - local DNS, DHCP and ifup/wicked. Some laptops with NetworkManager. -- Per Jessen, Zürich (17.8°C) http://www.dns24.ch/ - free dynamic DNS, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Roger Oberholtzer wrote:
On Wed, Aug 23, 2017 at 8:07 AM, Per Jessen <per@computer.org> wrote:
$ dnsdomainname 3111skyline.com
For me dnsdomainname reports nothing.
I guess 'hostname -f' doesn't report your domain either? what about 'cat /etc/hostname' ? I normally leave it to dhcp, but surely a static config has to work too. /Per -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Wed, Aug 23, 2017 at 8:53 AM, Per Jessen <per@computer.org> wrote:
Roger Oberholtzer wrote:
On Wed, Aug 23, 2017 at 8:07 AM, Per Jessen <per@computer.org> wrote:
$ dnsdomainname 3111skyline.com
For me dnsdomainname reports nothing.
I guess 'hostname -f' doesn't report your domain either?
what about 'cat /etc/hostname' ?
See my 8:07 today post earlier in the tread. -- Roger Oberholtzer -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 23/08/17 02:53 AM, Per Jessen wrote:
Roger Oberholtzer wrote:
On Wed, Aug 23, 2017 at 8:07 AM, Per Jessen <per@computer.org> wrote:
$ dnsdomainname 3111skyline.com
For me dnsdomainname reports nothing.
I guess 'hostname -f' doesn't report your domain either?
No.
what about 'cat /etc/hostname' ?
That file contains the full FQDN. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 23/08/17 02:13 AM, Roger Oberholtzer wrote:
On Wed, Aug 23, 2017 at 8:07 AM, Per Jessen <per@computer.org> wrote:
$ dnsdomainname 3111skyline.com For me dnsdomainname reports nothing.
Same here. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Wed, Aug 23, 2017 at 3:31 PM, James Knott <james.knott@rogers.com> wrote:
On 23/08/17 02:13 AM, Roger Oberholtzer wrote:
On Wed, Aug 23, 2017 at 8:07 AM, Per Jessen <per@computer.org> wrote:
$ dnsdomainname 3111skyline.com For me dnsdomainname reports nothing.
Same here.
After I switched the order in /etc/hosts (fqdn first, then the short machine name) I got the domain from dnsdomainname. So the presence and order in /etc/hosts seems key in having a fqdn. -- Roger Oberholtzer -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 08/23/2017 09:45 AM, Roger Oberholtzer wrote:
After I switched the order in /etc/hosts (fqdn first, then the short machine name) I got the domain from dnsdomainname.
Well, given that I don't use that file for anything other than localhost, that wouldn't work for me. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Wed, Aug 23, 2017 at 3:48 PM, James Knott <james.knott@rogers.com> wrote:
On 08/23/2017 09:45 AM, Roger Oberholtzer wrote:
After I switched the order in /etc/hosts (fqdn first, then the short machine name) I got the domain from dnsdomainname.
Well, given that I don't use that file for anything other than localhost, that wouldn't work for me.
I think it is not supposed to be this way. It should use /etc/hostname. I think it is a bug. -- Roger Oberholtzer -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
James Knott wrote:
On 08/23/2017 09:45 AM, Roger Oberholtzer wrote:
After I switched the order in /etc/hosts (fqdn first, then the short machine name) I got the domain from dnsdomainname.
Well, given that I don't use that file for anything other than localhost, that wouldn't work for me.
Yes, that's a different issue. FWIW, I've just assigned host and domain statically on a test system - james.ramboll.ramboll-group.global.network "hostname -f" now says "Name or service not known", because that name cannot be found in DNS (nor in /etc/hosts). "hostname" reports "james". The name was written to /etc/hostname and returning to YaST, I still see it there. -- Per Jessen, Zürich (27.1°C) http://www.cloudsuisse.com/ - your owncloud, hosted in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2017-08-23 15:45, Roger Oberholtzer wrote:
On Wed, Aug 23, 2017 at 3:31 PM, James Knott <james.knott@rogers.com> wrote:
On 23/08/17 02:13 AM, Roger Oberholtzer wrote:
On Wed, Aug 23, 2017 at 8:07 AM, Per Jessen <per@computer.org> wrote:
$ dnsdomainname 3111skyline.com For me dnsdomainname reports nothing.
Same here.
After I switched the order in /etc/hosts (fqdn first, then the short machine name) I got the domain from dnsdomainname.
Yes, the ordering is documented and is important.
So the presence and order in /etc/hosts seems key in having a fqdn.
Well, apparently you need both /etc/hosts and /etc/hostname correctly populated. -- Cheers / Saludos, Carlos E. R. (from 42.2 x86_64 "Malachite" at Telcontar)
Carlos E. R. wrote:
On 2017-08-23 15:45, Roger Oberholtzer wrote:
On Wed, Aug 23, 2017 at 3:31 PM, James Knott <james.knott@rogers.com> wrote:
On 23/08/17 02:13 AM, Roger Oberholtzer wrote:
On Wed, Aug 23, 2017 at 8:07 AM, Per Jessen <per@computer.org> wrote:
$ dnsdomainname 3111skyline.com For me dnsdomainname reports nothing.
Same here.
After I switched the order in /etc/hosts (fqdn first, then the short machine name) I got the domain from dnsdomainname.
Yes, the ordering is documented and is important.
So the presence and order in /etc/hosts seems key in having a fqdn.
Well, apparently you need both /etc/hosts and /etc/hostname correctly populated.
You just need the name to resolve, either with /etc/hosts or with DNS. I never touch /etc/hosts, but I have a working DNS and all server names are know/resolvable. -- Per Jessen, Zürich (24.0°C) http://www.dns24.ch/ - your free DNS host, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2017-08-23 21:04, Per Jessen wrote:
Carlos E. R. wrote:
On 2017-08-23 15:45, Roger Oberholtzer wrote:
On Wed, Aug 23, 2017 at 3:31 PM, James Knott <james.knott@rogers.com> wrote:
On 23/08/17 02:13 AM, Roger Oberholtzer wrote:
On Wed, Aug 23, 2017 at 8:07 AM, Per Jessen <per@computer.org> wrote:
> $ dnsdomainname > 3111skyline.com For me dnsdomainname reports nothing.
Same here.
After I switched the order in /etc/hosts (fqdn first, then the short machine name) I got the domain from dnsdomainname.
Yes, the ordering is documented and is important.
So the presence and order in /etc/hosts seems key in having a fqdn.
Well, apparently you need both /etc/hosts and /etc/hostname correctly populated.
You just need the name to resolve, either with /etc/hosts or with DNS.
I never touch /etc/hosts, but I have a working DNS and all server names are know/resolvable.
I think the YaST name tab touches both files. I like the self name to work even if the DNS is broken. -- Cheers / Saludos, Carlos E. R. (from 42.2 x86_64 "Malachite" at Telcontar)
On 08/23/2017 04:33 PM, Carlos E. R. wrote:
I never touch /etc/hosts, but I have a working DNS and all server names
are know/resolvable. I think the YaST name tab touches both files. I like the self name to work even if the DNS is broken.
What about a notebook computer that's been moved to a different network? Then the address in the hosts file will likely be wrong. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2017-08-23 22:35, James Knott wrote:
On 08/23/2017 04:33 PM, Carlos E. R. wrote:
I never touch /etc/hosts, but I have a working DNS and all server names
are know/resolvable. I think the YaST name tab touches both files. I like the self name to work even if the DNS is broken.
What about a notebook computer that's been moved to a different network? Then the address in the hosts file will likely be wrong.
Ah. I have a script that adapts /etc/hosts file appropriately and automatically - postfix requires the hosts file to be correct or it fails. Otherwise, I try to get the same IP. If you change the name of the computer I think you also need to reconfigure postfix. -- Cheers / Saludos, Carlos E. R. (from 42.2 x86_64 "Malachite" at Telcontar)
On 08/23/2017 04:45 PM, Carlos E. R. wrote:
What about a notebook computer that's been moved to a different
network? Then the address in the hosts file will likely be wrong. Ah. I have a script that adapts /etc/hosts file appropriately and automatically - postfix requires the hosts file to be correct or it fails.
Otherwise, I try to get the same IP.
If you change the name of the computer I think you also need to reconfigure postfix.
I just rely on Network Manager and have my home DHCP server configured to assign specific IP addresses to MAC addresses. This way, host name lookup works fine at home. On IPv6, addresses are automagically configured, based on prefix and MAC address and again works well with DNS. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2017-08-23 22:54, James Knott wrote:
On 08/23/2017 04:45 PM, Carlos E. R. wrote:
What about a notebook computer that's been moved to a different
network? Then the address in the hosts file will likely be wrong. Ah. I have a script that adapts /etc/hosts file appropriately and automatically - postfix requires the hosts file to be correct or it fails.
Otherwise, I try to get the same IP.
If you change the name of the computer I think you also need to reconfigure postfix.
I just rely on Network Manager and have my home DHCP server configured to assign specific IP addresses to MAC addresses. This way, host name lookup works fine at home. On IPv6, addresses are automagically configured, based on prefix and MAC address and again works well with DNS.
I use NM on the laptop. My DHCP server, when used, resides on the ISP router and it does not setup the names (it can't); thus the host.domain solving does not work and postfix crashes or complains bitterly failing to post anything. On other cases the DHCP is not under my control, and of course, fails to set the correct name (or is disabled, depends). The other DHCP server resides in my Android phone (tethering) and it also fails to set up the names. Or I can be at home and then NM sets a fixed IP. But not the name. So in all cases I need to make the FQDN work and match what postfix thinks it is. -- Cheers / Saludos, Carlos E. R. (from 42.2 x86_64 "Malachite" at Telcontar)
On 08/23/2017 05:08 PM, Carlos E. R. wrote:
I use NM on the laptop.
My DHCP server, when used, resides on the ISP router and it does not setup the names (it can't); thus the host.domain solving does not work and postfix crashes or complains bitterly failing to post anything.
On other cases the DHCP is not under my control, and of course, fails to set the correct name (or is disabled, depends).
The other DHCP server resides in my Android phone (tethering) and it also fails to set up the names.
Or I can be at home and then NM sets a fixed IP. But not the name.
So in all cases I need to make the FQDN work and match what postfix thinks it is.
Do you not have your own DNS server? In Canada, most people use a firewall/router to connect to their ISP. It hands out NAT addresses and many can also provide DNS. Failing that, it's easy enough to set up a DNS server on Linux. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2017-08-23 23:23, James Knott wrote:
On 08/23/2017 05:08 PM, Carlos E. R. wrote:
I use NM on the laptop.
My DHCP server, when used, resides on the ISP router and it does not setup the names (it can't); thus the host.domain solving does not work and postfix crashes or complains bitterly failing to post anything.
On other cases the DHCP is not under my control, and of course, fails to set the correct name (or is disabled, depends).
The other DHCP server resides in my Android phone (tethering) and it also fails to set up the names.
Or I can be at home and then NM sets a fixed IP. But not the name.
So in all cases I need to make the FQDN work and match what postfix thinks it is.
Do you not have your own DNS server? In Canada, most people use a firewall/router to connect to their ISP. It hands out NAT addresses and many can also provide DNS. Failing that, it's easy enough to set up a DNS server on Linux.
The router only have a cache DNS that solves internet addresses. There is no connection between the router DHCP and the router DNS, so that it is impossible to ask it for the IP of a local machine. Maybe such a router that hosts a *proper* DNS and DHCP server exists, but none of mine have it. Furthermore, postfix has been told what is the name of the machine it runs in, and it has to be able to learn the IP of that name (local network) - and this doesn't happen from the router DNS server. It has to be handled, somehow, in the machine that it is running in, a laptop, on a different home network than on initial config. Think about that ;-) The only manner I know is writing the name and address line in /etc/hosts. The machine also runs dnsmasq, but the IP/names pairs are configured mainly in the /etc/hosts file as well. So that file has to be edited correctly. -- Cheers / Saludos, Carlos E. R. (from 42.2 x86_64 "Malachite" at Telcontar)
On 08/23/2017 05:37 PM, Carlos E. R. wrote:
The router only have a cache DNS that solves internet addresses. There is no connection between the router DHCP and the router DNS, so that it is impossible to ask it for the IP of a local machine.
Can you not configure the DHCP server to point to your own DNS?
Maybe such a router that hosts a *proper* DNS and DHCP server exists, but none of mine have it.
Furthermore, postfix has been told what is the name of the machine it runs in, and it has to be able to learn the IP of that name (local network) - and this doesn't happen from the router DNS server. It has to be handled, somehow, in the machine that it is running in, a laptop, on a different home network than on initial config.
Think about that ;-)
The only manner I know is writing the name and address line in /etc/hosts.
It's been years since I've worried about that.
The machine also runs dnsmasq, but the IP/names pairs are configured mainly in the /etc/hosts file as well. So that file has to be edited correctly.
I used to run dnsmasq and put the host names in it's hosts file, but not on the other computers. As I mentioned earlier, I'm currently running pfSense for my firewall/router and it has a choice of DNS forwarder, DNS resolver or pointing to another DNS server. So, any device connecting to my network using DHCP is told to use my firewall for DNS via it's IPv4 address. My main desktop is configured to use the firewall's IPv6 address, along with a couple of external DNS servers, just in case. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2017-08-24 00:00, James Knott wrote:
On 08/23/2017 05:37 PM, Carlos E. R. wrote:
The router only have a cache DNS that solves internet addresses. There is no connection between the router DHCP and the router DNS, so that it is impossible to ask it for the IP of a local machine.
Can you not configure the DHCP server to point to your own DNS?
Sure, but two caveats: It has to be running full time It doesn't know about the DHCP assignments. And, when I connect via phone tethering there is no router.
Maybe such a router that hosts a *proper* DNS and DHCP server exists, but none of mine have it.
Furthermore, postfix has been told what is the name of the machine it runs in, and it has to be able to learn the IP of that name (local network) - and this doesn't happen from the router DNS server. It has to be handled, somehow, in the machine that it is running in, a laptop, on a different home network than on initial config.
Think about that ;-)
The only manner I know is writing the name and address line in /etc/hosts.
It's been years since I've worried about that.
Lucky you.
The machine also runs dnsmasq, but the IP/names pairs are configured mainly in the /etc/hosts file as well. So that file has to be edited correctly.
I used to run dnsmasq and put the host names in it's hosts file, but not on the other computers. As I mentioned earlier, I'm currently running pfSense for my firewall/router and it has a choice of DNS forwarder, DNS resolver or pointing to another DNS server. So, any device connecting to my network using DHCP is told to use my firewall for DNS via it's IPv4 address. My main desktop is configured to use the firewall's IPv6 address, along with a couple of external DNS servers, just in case.
But again, my network DHCP is not fully mine. It doesn't talk with the DNS. There is no way that the laptop can get the name-IP assignment unless I edit either the bind file or the hosts file (dnsmasq). Well, I don't edit the file, an automatic script does it. -- Cheers / Saludos, Carlos E. R. (from 42.2 x86_64 "Malachite" at Telcontar)
Carlos E. R. wrote:
On 2017-08-23 21:04, Per Jessen wrote:
Carlos E. R. wrote:
On 2017-08-23 15:45, Roger Oberholtzer wrote:
On Wed, Aug 23, 2017 at 3:31 PM, James Knott <james.knott@rogers.com> wrote:
On 23/08/17 02:13 AM, Roger Oberholtzer wrote:
On Wed, Aug 23, 2017 at 8:07 AM, Per Jessen <per@computer.org> wrote:
>> $ dnsdomainname >> 3111skyline.com For me dnsdomainname reports nothing.
Same here.
After I switched the order in /etc/hosts (fqdn first, then the short machine name) I got the domain from dnsdomainname.
Yes, the ordering is documented and is important.
So the presence and order in /etc/hosts seems key in having a fqdn.
Well, apparently you need both /etc/hosts and /etc/hostname correctly populated.
You just need the name to resolve, either with /etc/hosts or with DNS.
I never touch /etc/hosts, but I have a working DNS and all server names are know/resolvable.
I think the YaST name tab touches both files.
Yesterday when I updated a test system to be "james.ramboll.ramboll-group.global.network", both /etc/hosts and /etc/hostname were touched/written (same timestamp), but only the latter was changed.
I like the self name to work even if the DNS is broken.
For me, nothing works without DNS. -- Per Jessen, Zürich (18.0°C) http://www.hostsuisse.com/ - virtual servers, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2017-08-24 07:36, Per Jessen wrote:
Carlos E. R. wrote:
I think the YaST name tab touches both files.
Yesterday when I updated a test system to be "james.ramboll.ramboll-group.global.network", both /etc/hosts and /etc/hostname were touched/written (same timestamp), but only the latter was changed.
I like the self name to work even if the DNS is broken.
For me, nothing works without DNS.
How do you connect to the DNS machine to repair it, if the desktop machine doesn't know the name of any machine? (DNS down) You will have to use the IP numbers. -- Cheers / Saludos, Carlos E. R. (from 42.2 x86_64 "Malachite" at Telcontar)
Carlos E. R. wrote:
On 2017-08-24 07:36, Per Jessen wrote:
Carlos E. R. wrote:
I think the YaST name tab touches both files.
Yesterday when I updated a test system to be "james.ramboll.ramboll-group.global.network", both /etc/hosts and /etc/hostname were touched/written (same timestamp), but only the latter was changed.
I like the self name to work even if the DNS is broken.
For me, nothing works without DNS.
How do you connect to the DNS machine to repair it, if the desktop machine doesn't know the name of any machine? (DNS down) You will have to use the IP numbers.
a) I know the addresses of the DNS server b) the DNS server doesn't break. Nothings works without DNS. No emails are sent, no SNMP, no browser, no NFS, no nothing. -- Per Jessen, Zürich (27.6°C) http://www.dns24.ch/ - free dynamic DNS, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2017-08-23 15:31, James Knott wrote:
On 23/08/17 02:13 AM, Roger Oberholtzer wrote:
On Wed, Aug 23, 2017 at 8:07 AM, Per Jessen <per@computer.org> wrote:
$ dnsdomainname 3111skyline.com For me dnsdomainname reports nothing.
Same here.
Customized 42.2, returns my domain, not the host.domain. Bind is running. 42.3 default configured by YaST, returns nothing. The domain is "suse". -- Cheers / Saludos, Carlos E. R. (from 42.2 x86_64 "Malachite" at Telcontar)
Carlos E. R. wrote:
On 2017-08-23 15:31, James Knott wrote:
On 23/08/17 02:13 AM, Roger Oberholtzer wrote:
On Wed, Aug 23, 2017 at 8:07 AM, Per Jessen <per@computer.org> wrote:
$ dnsdomainname 3111skyline.com For me dnsdomainname reports nothing.
Same here.
Customized 42.2, returns my domain, not the host.domain. Bind is running.
42.3 default configured by YaST, returns nothing. The domain is "suse".
My guess - if the hostname+domain configured cannot be resolved, "hostname -f" will not return it. Only if it can be resolved (dns or /etc/hosts) will it be returned. -- Per Jessen, Zürich (28.3°C) http://www.dns24.ch/ - your free DNS host, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2017-08-23 17:09, Per Jessen wrote:
Carlos E. R. wrote:
On 2017-08-23 15:31, James Knott wrote:
On 23/08/17 02:13 AM, Roger Oberholtzer wrote:
On Wed, Aug 23, 2017 at 8:07 AM, Per Jessen <per@computer.org> wrote:
$ dnsdomainname 3111skyline.com For me dnsdomainname reports nothing.
Same here.
Customized 42.2, returns my domain, not the host.domain. Bind is running.
42.3 default configured by YaST, returns nothing. The domain is "suse".
My guess - if the hostname+domain configured cannot be resolved, "hostname -f" will not return it. Only if it can be resolved (dns or /etc/hosts) will it be returned.
Interesting hypothesis. Try then on a machine where dnsmasq is running. Mmmm... no, "domainname" doesn't work there either. cer@Isengard:~> domainname (none) cer@Isengard:~> host Isengard Isengard.Valinor has address 192.168.... -- Cheers / Saludos, Carlos E. R. (from 42.2 x86_64 "Malachite" at Telcontar)
On 08/22/2017 06:45 PM, David C. Rankin wrote:
The correct entry in /etc/hosts insures dnsdomainname picks up the correct domain, e.g.
You don't need that file if there is a DNS. Years ago, I used to update that on multiple computers, before I got my own DNS. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 23/08/17 09:12 AM, James Knott wrote:
On 08/22/2017 06:45 PM, David C. Rankin wrote:
The correct entry in /etc/hosts insures dnsdomainname picks up the correct domain, e.g. You don't need that file if there is a DNS. Years ago, I used to update that on multiple computers, before I got my own DNS.
Correction. You don't need it for resolving names of other devices, but it should be there for the localhost and a couple of other things, such as multicast names. # IP-Address Full-Qualified-Hostname Short-Hostname # 127.0.0.1 localhost # special IPv6 addresses ::1 localhost ipv6-localhost ipv6-loopback fe00::0 ipv6-localnet ff00::0 ipv6-mcastprefix ff02::1 ipv6-allnodes ff02::2 ipv6-allrouters ff02::3 ipv6-allhosts -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2017-08-23 00:45, David C. Rankin wrote:
On 08/22/2017 08:31 AM, James Knott wrote:
Isn't this the way to set the domain name? Sounds good - did you also stop dhcp from changing it?
I have the same problem on a system that uses static configuration, not DHCP.
The traditional way is to set the fully-qualified hostname for localhost in /etc/hosts. For example, on my 42.2 laptop, I have the following:
# IP-Address Full-Qualified-Hostname Short-Hostname
127.0.0.1 wizard.3111skyline.com localhost wizard
This breaks postfix: fatal: parameter inet_interfaces: no local interface found for 127.0.0.2 (suse added the line with 2) -- Cheers / Saludos, Carlos E. R. (from 42.2 x86_64 "Malachite" at Telcontar)
On Tuesday, 22 August 2017 21:11:20 ACST Roger Oberholtzer wrote:
On both Tumbleweed and Leap 42.3, if I set the domain name in YaST2 (Network Settings -> Hostname -> Domain Name), it seems not to be kept. If I check after saving it, it is once again empty. And the hostname command does not report it. In my case, the domain name is ramboll.ramboll-group.global.network, which I think should be accepted. It is not my choice for the domain name. It is the company domain.
Isn't this the way to set the domain name?
You could just edit /etc/hostname (which is what I do to set the hostname on pretty much all the systems that I administer). -- ============================================================== Rodney Baker VK5ZTV rodney.baker@iinet.net.au CCNA #CSCO12880208 ============================================================== -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 08/22/2017 09:28 AM, Rodney Baker wrote:
On Tuesday, 22 August 2017 21:11:20 ACST Roger Oberholtzer wrote:
On both Tumbleweed and Leap 42.3, if I set the domain name in YaST2 (Network Settings -> Hostname -> Domain Name), it seems not to be kept. If I check after saving it, it is once again empty. And the hostname command does not report it. In my case, the domain name is ramboll.ramboll-group.global.network, which I think should be accepted. It is not my choice for the domain name. It is the company domain.
Isn't this the way to set the domain name? You could just edit /etc/hostname (which is what I do to set the hostname on pretty much all the systems that I administer).
/etc/hostname on my system includes the domain name. I had to add the domain to the Domain Search box, to get the local domain recognized. I don't think that should be necessary, as that setting is normally for additional domains. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Tuesday, 22 August 2017 23:04:16 ACST James Knott wrote:
On 08/22/2017 09:28 AM, Rodney Baker wrote:
On Tuesday, 22 August 2017 21:11:20 ACST Roger Oberholtzer wrote:
On both Tumbleweed and Leap 42.3, if I set the domain name in YaST2 (Network Settings -> Hostname -> Domain Name), it seems not to be kept. If I check after saving it, it is once again empty. And the hostname command does not report it. In my case, the domain name is ramboll.ramboll-group.global.network, which I think should be accepted. It is not my choice for the domain name. It is the company domain.
Isn't this the way to set the domain name?
You could just edit /etc/hostname (which is what I do to set the hostname on pretty much all the systems that I administer).
/etc/hostname on my system includes the domain name. I had to add the domain to the Domain Search box, to get the local domain recognized. I don't think that should be necessary, as that setting is normally for additional domains.
/etc/hostname should hold the fqdn. /etc/resolv.conf has the default domain that is appended to dns queries if none is specified; thus, if my machine does a dns query for ‘host’, it is sent to the dns server as host.default.domain, where default.domain is the default search domain specified in the “search” parameter in /etc/resolv.conf. It has been this way in (SysV init based) Linux ever since I’ve been using it (since Red Hat 2.0 days). Note that /etc/resolv.conf (and possibly even /etc/hostname) is generated by NetworkManager if you’re using network manager to manage your network interfaces. If you’re using the legacy if-up/if-down settings, then either edit manually or use Yast. For basic tasks like that, and because the debian- based boxes I administer don’t have YaST, I find manual editing easier. [On Debian Jessie and later, when using dhcp, one has to set the values for resolv.conf in dhclient.conf instead, as the dhcp client writes resolv.conf. I had to find this out the hard way.] -- ============================================================== Rodney Baker VK5ZTV rodney.baker@iinet.net.au CCNA #CSCO12880208 ============================================================== -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 08/22/2017 11:00 AM, Rodney Baker wrote:
On Tuesday, 22 August 2017 23:04:16 ACST James Knott wrote:
On 08/22/2017 09:28 AM, Rodney Baker wrote:
On Tuesday, 22 August 2017 21:11:20 ACST Roger Oberholtzer wrote:
On both Tumbleweed and Leap 42.3, if I set the domain name in YaST2 (Network Settings -> Hostname -> Domain Name), it seems not to be kept. If I check after saving it, it is once again empty. And the hostname command does not report it. In my case, the domain name is ramboll.ramboll-group.global.network, which I think should be accepted. It is not my choice for the domain name. It is the company domain.
Isn't this the way to set the domain name? You could just edit /etc/hostname (which is what I do to set the hostname on pretty much all the systems that I administer). /etc/hostname on my system includes the domain name. I had to add the domain to the Domain Search box, to get the local domain recognized. I don't think that should be necessary, as that setting is normally for additional domains. /etc/hostname should hold the fqdn. /etc/resolv.conf has the default domain that is appended to dns queries if none is specified; thus, if my machine does a dns query for ‘host’, it is sent to the dns server as host.default.domain, where default.domain is the default search domain specified in the “search” parameter in /etc/resolv.conf.
It has been this way in (SysV init based) Linux ever since I’ve been using it (since Red Hat 2.0 days).
Note that /etc/resolv.conf (and possibly even /etc/hostname) is generated by NetworkManager if you’re using network manager to manage your network interfaces. If you’re using the legacy if-up/if-down settings, then either edit manually or use Yast. For basic tasks like that, and because the debian- based boxes I administer don’t have YaST, I find manual editing easier.
[On Debian Jessie and later, when using dhcp, one has to set the values for resolv.conf in dhclient.conf instead, as the dhcp client writes resolv.conf. I had to find this out the hard way.]
I have one system running network manager and it gets the domain in both those files. The other, is static config with ifup etc. That one does not show the domain name in Yast. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Wednesday, 23 August 2017 0:42:48 ACST James Knott wrote:
[...]
/etc/hostname should hold the fqdn. /etc/resolv.conf has the default domain that is appended to dns queries if none is specified; thus, if my machine does a dns query for ‘host’, it is sent to the dns server as host.default.domain, where default.domain is the default search domain specified in the “search” parameter in /etc/resolv.conf.
It has been this way in (SysV init based) Linux ever since I’ve been using it (since Red Hat 2.0 days).
Note that /etc/resolv.conf (and possibly even /etc/hostname) is generated by NetworkManager if you’re using network manager to manage your network interfaces. If you’re using the legacy if-up/if-down settings, then either edit manually or use Yast. For basic tasks like that, and because the debian- based boxes I administer don’t have YaST, I find manual editing easier.
[On Debian Jessie and later, when using dhcp, one has to set the values for resolv.conf in dhclient.conf instead, as the dhcp client writes resolv.conf. I had to find this out the hard way.]
I have one system running network manager and it gets the domain in both those files. The other, is static config with ifup etc. That one does not show the domain name in Yast.
What are the permissions on those files on the one that appears broken? (Should be 644 or 640, I think). What is actually in those files, and if you manually edit them do the values then appear in YaST? If you change the values via YaST, does the time stamp on those files change? If you do manually edit them, does everything except YaST work as expected? On my desktop system (using NetworkManager), when I open network settings in YaST I get a popup stating that YaST is unable to change some settings because the network is managed via NetworkManager, but YaST shows only the hostname in the Hostname field (the output of `hostname -s`), the domain name in the Domain Name field (the output of `hostname -d`) - both are read from /etc/ hostname - and the Domain Search field contains the search parameter from / etc/resolv.conf. What outputs do you get running hostname -s and hostname -d (hostname doesn’t have to be run as root) on the apparently broken system? -- ============================================================== Rodney Baker VK5ZTV rodney.baker@iinet.net.au CCNA #CSCO12880208 ============================================================== -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Tue, Aug 22, 2017 at 11:55 PM, Rodney Baker <rodney.baker@iinet.net.au> wrote:
On Wednesday, 23 August 2017 0:42:48 ACST James Knott wrote:
What are the permissions on those files on the one that appears broken? (Should be 644 or 640, I think). What is actually in those files, and if you manually edit them do the values then appear in YaST?
# cat /etc/hostname acme.ramboll.ramboll-group.global.network # grep acme /etc/hosts 10.2.10.41 acme acme.ramboll.ramboll-group.global.network # hostname -f -v gethostname()=`acme' Resolving `acme' ... Result: ai_canonname[0]=`acme' Result: ai_addr[0]=`10.2.10.41' acme So I think that YaST is setting the name. But whatever mechanism both it and hostname are using to retrieve it are not correct -- Roger Oberholtzer -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 08/23/2017 02:10 AM, Roger Oberholtzer wrote:
So I think that YaST is setting the name. But whatever mechanism both it and hostname are using to retrieve it are not correct
That appears to be the case. I just put a dummy name in Yast and it saved it to /etc/hostname. So, it appears Yast can't read a file it just wrote to. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Wed, Aug 23, 2017 at 3:15 PM, James Knott <james.knott@rogers.com> wrote:
On 08/23/2017 02:10 AM, Roger Oberholtzer wrote:
So I think that YaST is setting the name. But whatever mechanism both it and hostname are using to retrieve it are not correct
That appears to be the case. I just put a dummy name in Yast and it saved it to /etc/hostname. So, it appears Yast can't read a file it just wrote to.
I think it probably uses the same method as hostname to get the names. And that seems to want the text in /etc/hosts to be a certain way. So I suspect the problem is in a library function both use. I cannot say that I recall that /etc/hosts was ever where anyone looked to determine what the fqdn is. Isn't that what /etc/hostname is for? I suspect a regression somewhere. -- Roger Oberholtzer -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2017-08-23 08:10, Roger Oberholtzer wrote:
On Tue, Aug 22, 2017 at 11:55 PM, Rodney Baker <rodney.baker@iinet.net.au> wrote:
On Wednesday, 23 August 2017 0:42:48 ACST James Knott wrote:
What are the permissions on those files on the one that appears broken? (Should be 644 or 640, I think). What is actually in those files, and if you manually edit them do the values then appear in YaST?
# cat /etc/hostname acme.ramboll.ramboll-group.global.network
# grep acme /etc/hosts 10.2.10.41 acme acme.ramboll.ramboll-group.global.network
Order is reversed. # IP-Address Full-Qualified-Hostname Short-Hostname Correct it with an editor and try again. -- Cheers / Saludos, Carlos E. R. (from 42.2 x86_64 "Malachite" at Telcontar)
On 08/23/2017 11:00 AM, Carlos E. R. wrote:
# grep acme /etc/hosts
10.2.10.41 acme acme.ramboll.ramboll-group.global.network Order is reversed.
# IP-Address Full-Qualified-Hostname Short-Hostname
Correct it with an editor and try again.
In fact, the order is specified in the file: # IP-Address Full-Qualified-Hostname Short-Hostname -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Wed, Aug 23, 2017 at 5:03 PM, James Knott <james.knott@rogers.com> wrote:
On 08/23/2017 11:00 AM, Carlos E. R. wrote:
# grep acme /etc/hosts
10.2.10.41 acme acme.ramboll.ramboll-group.global.network Order is reversed.
# IP-Address Full-Qualified-Hostname Short-Hostname
Correct it with an editor and try again.
In fact, the order is specified in the file: # IP-Address Full-Qualified-Hostname Short-Hostname
So when you set the machine name and fqdn in YaST, YaST should set the required files as needed. It fails to do this completely. -- Roger Oberholtzer -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2017-08-23 21:16, Roger Oberholtzer wrote:
On Wed, Aug 23, 2017 at 5:03 PM, James Knott <> wrote:
On 08/23/2017 11:00 AM, Carlos E. R. wrote:
# grep acme /etc/hosts
10.2.10.41 acme acme.ramboll.ramboll-group.global.network Order is reversed.
# IP-Address Full-Qualified-Hostname Short-Hostname
Correct it with an editor and try again.
In fact, the order is specified in the file: # IP-Address Full-Qualified-Hostname Short-Hostname
So when you set the machine name and fqdn in YaST, YaST should set the required files as needed. It fails to do this completely.
Maybe you wrote /etc/hosts manually in the wrong order once, and then YaST failed to change it again. -- Cheers / Saludos, Carlos E. R. (from 42.2 x86_64 "Malachite" at Telcontar)
Roger Oberholtzer wrote:
On Wed, Aug 23, 2017 at 5:03 PM, James Knott <james.knott@rogers.com> wrote:
On 08/23/2017 11:00 AM, Carlos E. R. wrote:
# grep acme /etc/hosts
10.2.10.41 acme acme.ramboll.ramboll-group.global.network Order is reversed.
# IP-Address Full-Qualified-Hostname Short-Hostname
Correct it with an editor and try again.
In fact, the order is specified in the file: # IP-Address Full-Qualified-Hostname Short-Hostname
So when you set the machine name and fqdn in YaST, YaST should set the required files as needed. It fails to do this completely.
It is not really up to YaSt to make assumptions about your DNS setup. YaST will update /etc/hostname, hopefully correctly, but that is all that is required. -- Per Jessen, Zürich (21.7°C) http://www.hostsuisse.com/ - virtual servers, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 08/22/2017 05:55 PM, Rodney Baker wrote:
hat are the permissions on those files on the one that appears broken? (Should be 644 or 640, I think). What is actually in those files, and if you manually edit them do the values then appear in YaST?
If you change the values via YaST, does the time stamp on those files change?
Both are 644 and the write time for /etc/hostname was changed yesterday, when I tried to add the domain name in Yast. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Tue, Aug 22, 2017 at 5:12 PM, James Knott <james.knott@rogers.com> wrote:
I have one system running network manager and it gets the domain in both those files. The other, is static config with ifup etc. That one does not show the domain name in Yast.
Same here. It is a static address. In fact the network segment is specifically not allowing DHCP as it is a test of this sort of thing and so we do not want the company DHCP server getting in the way. -- Roger Oberholtzer -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Tue, Aug 22, 2017 at 3:34 PM, James Knott <james.knott@rogers.com> wrote:
/etc/hostname on my system includes the domain name. I had to add the domain to the Domain Search box, to get the local domain recognized. I don't think that should be necessary, as that setting is normally for additional domains.
My Domain Search and Domain name are the same. It keeps the Domain Search. But not the name. -- Roger Oberholtzer -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (8)
-
Anton Aylward
-
Carlos E. R.
-
Dave Howorth
-
David C. Rankin
-
James Knott
-
Per Jessen
-
Rodney Baker
-
Roger Oberholtzer