OpenIndiana: NIS-Slave konfigurieren

Ich zeige hier, wie man auf einem Rechner namens onyx (OpenIndiana 151a3) den NIS-Slave-Dienst für die NIS-Domain babar eines NIS-Servers names rubin installiert. Es wird vorausgesetzt, dass der NIS-Service auf rubin bereits konfiguriert ist und das beide Rechner in /var/yp/ypservers vermerkt sind und beide Rechner müssen sich gegenseitig in /etc/hosts zu enthalten. So könnte das aussehen:

#/etc/hosts
[...]
192.168.0.11 onyx.local onyx
192.168.0.12 rubin.local rubin
[...]

Alle folgenden Befehle werden auf dem Slave-Server onyx ausgeführt.

NIS-Service installieren:

# pkg install service/network/nis

Domainname setzen

# domainname babar
# domainname > /etc/defaultdomain

NIS-Client konfigurieren. WICHTIG: Zuerst den Slave- und dann den Master-Server eintragen, also im Beispiel, erst onyx dann rubin.

# ypinit -c
In order for NIS to operate sucessfully, we have to construct a list of the
NIS servers. Please continue to add the names for YP servers in order of
preference, one per line. When you are done with the list, type a
 or a return on a line by itself.
 next host to add: onyx
 next host to add: rubin
 next host to add:
The current list of yp servers looks like this:
onyx

 rubin

Is this correct? [y/n: y] y

NIS-Client starten:

# svcadm enable -r nis/client

NIS-Slave konfigurieren:

# ypinit -s rubin
 Installing the YP database will require that you answer a few questions.
 Questions will all be asked at the beginning of the procedure.
Do you want this procedure to quit on non-fatal errors? [y/n: n]
 OK, please remember to go back and redo manually whatever fails. If you
 don't, some part of the system (perhaps the yp itself) won't work.
 The yp domain directory is /var/yp/babar
 Can we destroy the existing /var/yp/babar and its contents? [y/n: n] y
 There will be no further questions. The remainder of the procedure should take
 a few minutes, to copy the data bases from rubin.
 Transferring group.bygid...
 Transferring netgroup.byhost...
 Transferring auto.master...
 Transferring hosts.byname...
 Transferring hosts.byaddr...
 Transferring passwd.byuid...
 Transferring auto.direct...
 Transferring auto.nfs...
 Transferring passwd.byname...
 Transferring netgroup...
 Transferring ypservers...
 Transferring netgroup.byuser...
 Transferring auto.home...
 Transferring group.byname...

onyx's nis data base has been set up

without any errors.

Das war’s.