Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#987920: ypbind-mt: /etc/defaultdomain should be created at installation time

795 views
Skip to first unread message

Yasuhiro Kimura

unread,
May 2, 2021, 12:20:03 AM5/2/21
to
Package: ypbind-mt
Version: 2.7.2-2
Severity: important

Dear Maintainer,

What I did:

1. Download Release Candidate 1 Debian Installer image for Bullseye.
2. Make clean install with it
3. Login as root
4. apt install ypbind-mt
5. Add 'ypserver (IP address of NIS server)' to /etc/yp.conf
6. systemctl start ypbind.service

Expected behavior:

ypbind starts successfully.

What really happens:

ypbind fails to start. `systemctl status ypbind.service` shows
following log messages

----------------------------------------------------------------------
May 02 10:26:10 nisclienthost systemd[1]: Starting NIS Binding Service...
May 02 10:26:10 nisclienthost domainname[1234]: domainname: No such file or directory
May 02 10:26:10 nisclienthost systemd[1]: ypbind.service: Control process exited, code=exited, status=1/FAILURE
May 02 10:26:10 nisclienthost systemd[1]: ypbind.service: Failed with result 'exit-code'.
May 02 10:26:10 nisclienthost systemd[1]: Failed to start NIS Binding Service.
----------------------------------------------------------------------

What is the problem:

The source of the problem is that following is necessary between step
5 and 6.

5.5. cat (name of my NIS domain) > /etc/defaultdomain

But is isn't documented anywhere. So at least it should be documented
in the document of this packages. However, ypbind.service doesn't
start successfully without this file. So it should be created when
this package is installed.

-- System Information:
Debian Release: bullseye/sid
APT prefers testing-security
APT policy: (500, 'testing-security'), (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 5.10.0-6-amd64 (SMP w/4 CPU threads)
Locale: LANG=ja_JP.UTF-8, LC_CTYPE=ja_JP.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages ypbind-mt depends on:
ii hostname 3.23
ii libc6 2.31-11
ii libnsl2 1.3.0-2
ii libsystemd0 247.3-5
ii libtirpc3 1.3.1-1
ii rpcbind [portmap] 1.2.5-9

Versions of packages ypbind-mt recommends:
ii libnss-nis 3.1-4
ii nscd 2.31-11
ii yp-tools 4.2.3-3

ypbind-mt suggests no packages.

-- Configuration Files:
/etc/yp.conf changed:
ypserver 192.168.0.1


-- no debconf information

Francesco Paolo Lovergine

unread,
May 2, 2021, 3:20:04 AM5/2/21
to
Indeed, the general NIS howto included in the nis package provides the full documentation for who upgrades or install both servers and clients. A small per program README could probably be a good idea for minimal setup. My original idea was having the nis package as a doc only package after bullseye. It is now a migration package, instead. Well, I think that a simple README file could be added at this stage of release...

Il 02 maggio 2021 06:01:40 CEST, Yasuhiro Kimura <ya...@utahime.org> ha scritto:
Package: ypbind-mt
Version: 2.7.2-2
Severity: important

Dear Maintainer,

What I did:

1. Download Release Candidate 1 Debian Installer image for Bullseye.
2. Make clean install with it
3. Login as root
4. apt install ypbind-mt
5. Add 'ypserver (IP address of NIS server)' to /etc/yp.conf
6. systemctl start ypbind.service

Expected behavior:

ypbind starts successfully.

What really happens:

ypbind fails to start. `systemctl status ypbind.service` shows
following log messages
May 02 10:26:10 nisclienthost systemd[1]: Starting NIS Binding Service...
May 02 10:26:10 nisclienthost domainname[1234]: domainname: No such file or directory
May 02 10:26:10 nisclienthost systemd[1]: ypbind.service: Control process exited, code=exited, status=1/FAILURE
May 02 10:26:10 nisclienthost systemd[1]: ypbind.service: Failed with result 'exit-code'.
May 02 10:26:10 nisclienthost systemd[1]: Failed to start NIS Binding Service.

--
Francesco P. Lovergine

Yasuhiro Kimura

unread,
May 10, 2021, 6:00:03 AM5/10/21
to
From: Francesco Paolo Lovergine <fran...@lovergine.com>
Subject: Re: Bug#987920: ypbind-mt: /etc/defaultdomain should be created at installation time
Date: Sun, 02 May 2021 08:48:06 +0200

> Indeed, the general NIS howto included in the nis package provides the full documentation for who upgrades
> or install both servers and clients. A small per program README could probably be a good idea for minimal
> setup. My original idea was having the nis package as a doc only package after bullseye. It is now a
> migration package, instead. Well, I think that a simple README file could be added at this stage of
> release...

Though it doesn't cause problem for me, I have an unanswered question
about setting of this packages.

----------------------------------------------------------------------
yasu@rolling-vm-debian1[1030]% cat /lib/systemd/system/ypbind.service
[Unit]
Description=NIS Binding Service
Requires=rpcbind.service
Wants=network-online.target
After=network-online.target rpcbind.service
Before=systemd-user-sessions.service
Before=nss-user-lookup.target

[Service]
Type=forking
PIDFile=/run/ypbind.pid
Environment=YPBINDARGS=
EnvironmentFile=-/etc/default/nis
ExecStartPre=/bin/domainname -F /etc/defaultdomain
ExecStart=/usr/sbin/ypbind $YPBINDARGS

[Install]
WantedBy=multi-user.target
yasu@rolling-vm-debian1[1030]%
----------------------------------------------------------------------

According to the unit file of ypbind.service, the value of YPBINDARGS
environment variable is passed as arguments when systemd starts ypbind
process. Then how does user set it if he wants to start ypbind with
arguments? As far as I see the unit file this package doesn't seem to
provide the way to set it. I'm not familiar with systemd but does
systemd itself provide such functionality?

Francesco P. Lovergine

unread,
May 10, 2021, 6:10:03 AM5/10/21
to
On Mon, May 10, 2021 at 06:45:40PM +0900, Yasuhiro Kimura wrote:
>From: Francesco Paolo Lovergine <fran...@lovergine.com>
>Subject: Re: Bug#987920: ypbind-mt: /etc/defaultdomain should be created at installation time
>Date: Sun, 02 May 2021 08:48:06 +0200
>
>> Indeed, the general NIS howto included in the nis package provides the full documentation for who upgrades
>> or install both servers and clients. A small per program README could probably be a good idea for minimal
>> setup. My original idea was having the nis package as a doc only package after bullseye. It is now a
>> migration package, instead. Well, I think that a simple README file could be added at this stage of
>> release...
>
>According to the unit file of ypbind.service, the value of YPBINDARGS
>environment variable is passed as arguments when systemd starts ypbind
>process. Then how does user set it if he wants to start ypbind with
>arguments? As far as I see the unit file this package doesn't seem to
>provide the way to set it. I'm not familiar with systemd but does
>systemd itself provide such functionality?
>

Just set all vars in /etc/default/nis, this is the same approach used in the
old package and init file. Of course it is also possible to override the
default unit file with and administrator provided one in /etc/systemd

--
Francesco P. Lovergine

Yasuhiro Kimura

unread,
May 10, 2021, 6:40:03 AM5/10/21
to
From: "Francesco P. Lovergine" <fra...@debian.org>
Subject: Re: Bug#987920: ypbind-mt: /etc/defaultdomain should be created at installation time
Date: Mon, 10 May 2021 11:57:36 +0200

> Just set all vars in /etc/default/nis, this is the same approach used
> in the old package and init file. Of course it is also possible to
> override the default unit file with and administrator provided one in
> /etc/systemd

Thank you for replay. I tried the former and it worked fine as following.

----------------------------------------------------------------------
rootz@rolling-vm-debian1[134]# cat /etc/default/nis
YPBINDARGS=-no-ping
rootz@rolling-vm-debian1[135]# systemctl restart ypbind.service
rootz@rolling-vm-debian1[136]# ps auxwww | grep ypbind
rootz 2001 0.0 0.0 94444 2688 ? Sl 19:17 0:00 /usr/sbin/ypbind -no-ping
rootz 2006 0.0 0.0 7220 648 pts/3 S+ 19:17 0:00 grep ypbind
rootz@rolling-vm-debian1[137]#
----------------------------------------------------------------------

And it seems to come from following line of
/lib/systemd/system/ypbind.service

----------------------------------------------------------------------
Environment=YPBINDARGS=
EnvironmentFile=-/etc/default/nis
----------------------------------------------------------------------

But it isn't good that user need to check unit file to know how to
configure this package. So please also document it.
0 new messages