Need DHCP client scripts for NIS
paul at mad-scientist.us
Tue Jul 8 14:11:34 UTC 2008
On Tue, 2008-07-08 at 11:15 +0100, Mark Brown wrote:
> Note that this can't be enabled by default on upgrades since doing
> that may break existing installations by overwriting existing
> configuration. It also needs to be optional for new installations for
> similar reasons, probably doing something similar to what the samba
> package does for WINS.
I'm not sure whether it's better to discuss this in bug comments since
the discussion is then easily tied to the request. I added a note there
saying I'm not so sure about this. All other distros I'm familiar with
contain a dhclient-script that handles this automatically and it's
enabled by default (on Red Hat for example you can disable it by adding
NISPEERS=no or similar to something in /etc/sysconfig).
In order for overwriting to occur, the following must be true: the user
must have installed the NIS package (it's not installed by default on
Ubuntu), and the user must use DHCP for their network settings, and the
DHCP server must be configured to provide nis-domain and nis-server
settings as options (this is rare since only larger enterprises with
lots of UNIX systems bother with NIS), and finally the user must, for
some reason, want to use a different value for either/or the NIS domain
and the NIS servers than the one the DHCP admin suggested.
Those are a lot of "ifs" and I really don't believe they justify a lot
of complicated configuration and potentially confusing questions on
install. I don't have any problem with a way to disable it if the user
wants to (a setting in /etc/defaults/nis maybe? Or maybe they just
remove these entries from the dhclient.conf request?
There is a change in behavior, potentially, but Ubuntu changes behaviors
every release. Finally, remember that the dhclient exit hook preserves
the user's setup when the lease is obtained and restores it when it is
released. Typically the replacement configuration (in this case
the /etc/yp.conf file) has a comment saying it was replaced by the
dhclient script based on DHCP server settings, so users will know what
> For this to be fully useful there would also need to some facility for
> adding the NIS entries to the passwd, group and shadow files during
> installation. This is outside the scope of the NIS package since it
> affects the global configuration of the system.
I don't think any change is needed here. The base system nsswitch.conf
uses "compat" for the passwd, group, and shadow entries which is fine.
All I've had to do to get my Ubuntu systems to be on par with my Red Hat
Enterprise systems (in this respect) is add the dhclient exit hook and
the dhclient.conf entries, and it works well.
More information about the Ubuntu-devel-discuss