Yellow Pages

Un petit article pour expliquer comment mettre en oeuvre YP sur OpenBSD. Pour info, YP c'est l'équivalent du “domaine” sous NT. En clair, on centralise les informations sur une machine pour éviter de se retaper la saisie sur toutes les autres. Donc, sur le serveur on configure YP:

# echo "<votre-domaine>" > /etc/defaultdomain
# ypinit -m <votre-domaine>

Ce qui doit ressembler à ca:

Server Type: MASTER Domain: foobar

Creating an YP server 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, something might not work. 

At this point, we have to construct a list of this domain's YP servers.
weed.foobar is already known as master server.
Please continue to add any slave servers, one per line. When you are
done with the list, type a <control D>.
        master server   :  weed.foobar
        next host to add:  ^D
The current list of NIS servers looks like this:

weed.foobar

Is this correct?  [y/n: y]  
Building /var/yp/foobar/ypservers...
Running /var/yp/foobar/Makefile...
updated passwd
updated group
updated hosts
couldn't find /etc/ethers
updated networks
updated rpc
updated services
updated protocols
updated netid
couldn't find /etc/netgroup
couldn't find /etc/amd/amd.home
updated aliases

weed.foobar has been setup as an YP master server without any errors.

On s'assure que portmap soit bien lancé au boot:

# echo "portmap=YES" >> /etc/rc.conf.local
# echo "inetd=YES" >> /etc/rc.conf.local

On reboote et on vérifie que portmap, ypbind, ypserv et rpc.yppasswdd se sont lancés sans erreur, et on passe aux clients. Si les client n'ont pas de comptes utilisateurs locaux dans /etc/master.passwd, on ajoute simplement avec vipw :

+:::::::::

et dans /etc/group :

+:::

Après ça on définit le domaine

</code># echo ”<votre-domaine>” > /etc/defaultdomain</code>

Et on active portmap et inetd au boot:

# echo "portmap=YES" >> /etc/rc.conf.local
# echo "inetd=YES" >> /etc/rc.conf.local

Pour vérifier que tout fonctionne, on reboote le client et on se loggue avec le compte d'un utilisateur NIS

Crédits

Auteur Original : Eric DILLENSEGER
Mis Sur Le Wiki Par Azwaw OUSADOU
Date De Parrution : 20/07/2009

documentations/admin/yp.txt · Dernière modification: 2009/07/20 18:55 par bsdmaniak
OpenBSD Apache Driven by DokuWiki
CC Attribution-Noncommercial-Share Alike 3.0 Unported