0

I am facing problem with login to Nis server from my host machine every time after reboot. NIS host machine is running with Ubuntu 16.04 server os.

The status of ypbind and rpcbind are as follows after reboot.

root@ubuntu:~# systemctl status rpcbind
● rpcbind.service - RPC bind portmap service
   Loaded: loaded (/lib/systemd/system/rpcbind.service; indirect; vendor preset: enabled)
  Drop-In: /run/systemd/generator/rpcbind.service.d
           └─50-rpcbind-$portmap.conf
   Active: inactive (dead)
root@ubuntu:~# 
root@ubuntu:~# systemctl status ypbind
● nis.service - LSB: Start NIS client and server daemons.
   Loaded: loaded (/etc/init.d/nis; bad; vendor preset: enabled)
   Active: active (exited) since Mon 2017-12-18 12:06:41 MUT; 53s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 1259 ExecStart=/etc/init.d/nis start (code=exited, status=0/SUCCESS)
    Tasks: 0
   Memory: 0B
      CPU: 0

Dec 18 12:06:35 ubuntu nis[1259]:  * ....
Dec 18 12:06:36 ubuntu nis[1259]:  * ....
Dec 18 12:06:37 ubuntu nis[1259]:  * ....
Dec 18 12:06:38 ubuntu nis[1259]:  * ....
Dec 18 12:06:39 ubuntu nis[1259]:  * ....
Dec 18 12:06:40 ubuntu nis[1259]:  * ....
Dec 18 12:06:41 ubuntu nis[1259]:  * ....
Dec 18 12:06:41 ubuntu nis[1259]:    ...fail!
Dec 18 12:06:41 ubuntu nis[1259]:    ...done.
Dec 18 12:06:41 ubuntu systemd[1]: Started LSB: Start NIS client and server daemons..

If i start both services with systemctl start command it will work perfect and i will be able to login to nis server.

And if i enable these services with systemctl enable command in order to start at booting time, i will get the following output.

root@ubuntu:~# systemctl enable rpcbind
Synchronizing state of rpcbind.service with SysV init with /lib/systemd/systemd-sysv-install...
Executing /lib/systemd/systemd-sysv-install enable rpcbind
root@ubuntu:~# 
root@ubuntu:~# systemctl enable ypbind
Failed to execute operation: No such file or directory
root@ubuntu:~# 
root@ubuntu:~# 

Note that even if systemctl enable rpcbind command ran without any error. the service is not starting while booting also i cannot enable the ypbind service at all.

I also tried systemctl daemon-reload still the same.

Can anyone help please ?

Rooney
  • 975

1 Answers1

1

ypbind seems to be provided by a SysV init script (/etc/init.d/nis). For a SysV init script, its systemd service is automatically generated and enabled based on the contents of the script and the links in /etc/rc*.d. Since there's no actual /etc/init.d/ypbind, it seems systemd is confused:

$ systemctl enable ypbind
Failed to execute operation: No such file or directory
$ systemctl enable nis
nis.service is not a native service, redirecting to systemd-sysv-install
Executing /lib/systemd/systemd-sysv-install enable nis
...

Probably a minor bug, but note that, by default it's already enabled (vendor preset: enabled).

muru
  • 207,228