我正在尝试在机器上设置 NIS。所有指令始终期望 /etc/init/nis 存在,因为在配置结束时预计会使用它重新启动服务。对我来说它不存在。我确实尝试过apt remove nis; apt install nis
,但没有什么区别。
root@vplab030:/var/log# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.1 LTS
Release: 14.04
Codename: trusty
root@vplab030:/var/log#
root@vplab030:/var/log# apt show nis
Package: nis
Priority: extra
Section: universe/net
Installed-Size: 638 kB
Maintainer: Ubuntu Developers <[email protected]>
Original-Maintainer: Mark Brown <[email protected]>
Version: 3.17-32ubuntu6
Depends: libc6 (>= 2.15), libdbus-1-3 (>= 1.0.2), libdbus-glib-1-2 (>= 0.78), libgdbm3 (>= 1.8.3), libglib2.0-0 (>= 2.12.0), libslp1, netbase, make, rpcbind (>= 0.2.0-6ubuntu1), lsb-base (>= 3.0-6), hostname (>= 2.98), upstart (>= 0.9.7-2)
Pre-Depends: debconf (>= 0.5.00) | debconf-2.0
Suggests: nscd
Conflicts: netstd (<= 1.26)
Download-Size: 152 kB
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu
APT-Manual-Installed: yes
APT-Sources: http://us.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages
Description: clients and daemons for the Network Information Service (NIS)
This package provides tools for setting up and maintaining a NIS domain.
NIS, originally known as Yellow Pages (YP), is mostly used to let
several machines in a network share the same account information, such
as the password file.
root@vplab030:/var/log# ls -l /etc/init.d/ypbind /etc/init.d/nis
ls: cannot access /etc/init.d/ypbind: No such file or directory
ls: cannot access /etc/init.d/nis: No such file or directory
root@vplab030:/var/log#
yp.conf:
root@vplab030:/var/log# cat /etc/yp.conf
#
# yp.conf Configuration file for the ypbind process. You can define
# NIS servers manually here if they can't be found by
# broadcasting on the local net (which is the default).
#
# See the manual page of ypbind for the syntax of this file.
#
# IMPORTANT: For the "ypserver", use IP addresses, or make sure that
# the host is in /etc/hosts. This file is only interpreted
# once, and if DNS isn't reachable yet the ypserver cannot
# be resolved and ypbind won't ever bind to the server.
# ypserver ypserver.network.com
domain dev.domname.com server ds4
domain dev.domname.com server ds2
root@vplab030:/var/log#
root@vplab030:/var/log# grep ypbind /var/log/syslog
Sep 9 12:49:30 vplab030 ypbind: Host name lookup failure
Sep 9 12:49:30 vplab030 kernel: [ 5.630218] init: ypbind main process (830) terminated with status 1
Sep 9 12:49:30 vplab030 kernel: [ 5.630240] init: ypbind main process ended, respawning
Sep 9 12:49:35 vplab030 kernel: [ 10.700047] init: wait-for-state (autofsypbind) main process (1126) killed by TERM signal
Sep 9 12:49:35 vplab030 kernel: [ 10.700660] init: wait-for-state (lightdmypbind) main process (1134) killed by TERM signal
root@vplab030:/var/log# date
Tue Sep 9 13:59:11 CDT 2014
root@vplab030:/var/log#
root@vplab030:/var/log# service --status-all
[ + ] acpid
[ - ] anacron
[ + ] apparmor
[ ? ] apport
[ + ] autofs
[ + ] avahi-daemon
[ + ] bluetooth
[ - ] brltty
[ ? ] console-setup
[ + ] cron
[ + ] cups
[ + ] cups-browsed
[ - ] dbus
[ ? ] dns-clean
[ + ] friendly-recovery
[ - ] grub-common
[ ? ] irqbalance
[ + ] kerneloops
[ ? ] killprocs
[ ? ] kmod
[ ? ] lightdm
[ ? ] networking
[ ? ] nxserver
[ ? ] ondemand
[ ? ] pppd-dns
[ - ] procps
[ - ] pulseaudio
[ ? ] rc.local
[ + ] resolvconf
[ + ] rpcbind
[ - ] rsync
[ + ] rsyslog
[ + ] saned
[ ? ] sendsigs
[ ? ] speech-dispatcher
[ - ] ssh
[ - ] sudo
[ + ] udev
[ ? ] umountfs
[ ? ] umountnfs.sh
[ ? ] umountroot
[ - ] unattended-upgrades
[ - ] urandom
[ - ] x11-common
root@vplab030:
答案1
不是你的错,这是文档中的错误:
https://bugs.launchpad.net/ubuntu/+source/nis/+bug/1303717
该软件包使用 upstart,它使用 /etc/init/ 中的文件而不是 /etc/init.d/ 中的文件。