RE: dhcdpd supercede option
Roy Marples
Thu Jul 03 16:00:56 2014
Hi Stuart
On 03/07/2014 16:43, Stuart Naylor wrote:
I am playing with samba4 and just have the VM hanging off a broadband
modem / router.
Normally yes, absolutely. I just want to get the IP but set up a realm
also I am going to share the VM so it's not normal but good for a
demo.
Maybe a lot of this is me being a debian/ubuntu guy playing with arch
linux, but I do really like arch :)
If I do that resolvconf writes out a blank resolv.conf
It must be the arch linux resolv order that is confusing me.
If no DNS options are present in the DHCP message then the resolvconf
file is actually removed.
It should never be blank.
If your resolvconf is really openresolv (also done by me) then you need
to edit /etc/resolvconf.conf to set static stuff up.
I am just running a test and have a VM running arch.
I only want the IP address of from the broadband router / modem I am
running from.
Its just a test and would like to keep it this way as it makes sharing
the VM easy for others networking.
/etc/hosts is set up like this
#*****************************************************************************************
# /etc/hosts: static lookup table for host names
#
#<ip-address> <hostname.domain.org> <hostname>
127.0.0.1 localhost.localdomain localhost samba1.office.samba4.lan samba1
::1 localhost.localdomain localhost samba1.office.samba4.lan samba1
#*******************************************************************************************
/etc/dhcpcd.conf
#*******************************************************************************************
#option domain_name_servers domain_name domain_search host_name
#*******************************************************************************************
I commented out pulling the domain and host name.
I thought resolv.conf would then just grab the info from /etc/hosts
Its empty and if I do a
hostname -f
localhost.localdomain
hostname -d
localdomain
hostname -i
127.0.0.1 127.0.0.1
hostname
localhost
I'm not sure I fully understand what you're trying to achieve.
None of the above commands have anything todo with DNS (ie won't use
resolv.conf)
Your setup and output is fully accurate.
If I just want to grab the ip address handed out by a dhcp server and
set the hostname and domain to local of myhostname and mydomain.
How do I do it?
I don't understand this :)
Can you try and explain it better?
You have the hostname(1) set by the OS generally at boottime.
You have hostname DHCP option as well.
You have static settings in /etc/hosts
/etc/nsswitch.conf controls the order things are looked up (although not
by the hostname command above)
and will hosts first, then DNS generally.
Thanks
Roy
Archive administrator: postmaster@marples.name