<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>nis - Gagzen</title>
	<atom:link href="https://gagzen.net/tag/nis/feed/" rel="self" type="application/rss+xml" />
	<link>https://gagzen.net</link>
	<description></description>
	<lastBuildDate>Fri, 01 Apr 2011 16:00:53 +0000</lastBuildDate>
	<language>fr-FR</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0.2</generator>

<image>
	<url>https://gagzen.net/wp-content/uploads/2026/06/android-chrome-512x512-1-150x150.png</url>
	<title>nis - Gagzen</title>
	<link>https://gagzen.net</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Installation d&#8217;un serveur NIS + Client sur RHEL5.5</title>
		<link>https://gagzen.net/2011/04/01/installation-dun-serveur-nis-client-sur-rhel5-5/</link>
		
		<dc:creator><![CDATA[Baptiste]]></dc:creator>
		<pubDate>Fri, 01 Apr 2011 16:00:53 +0000</pubDate>
				<category><![CDATA[Scripting]]></category>
		<category><![CDATA[commandes]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[nis]]></category>
		<guid isPermaLink="false">http://www.gagneux.info/index.php/?p=411</guid>

					<description><![CDATA[<p>Présentation : Network Information Service (NIS) nommé aussi Yellow Pages est un protocole client serveur développé par Sun permettant la centralisation d&#8217;informations sur un réseau UNIX. Son but est de distribuer les informations contenues dans des fichiers de configuration contenant par exemple les noms d&#8217;hôte (/etc/hosts), les comptes utilisateurs (/etc/passwd), etc. sur un réseau. Un [&#8230;]</p>
<p>The post <a href="https://gagzen.net/2011/04/01/installation-dun-serveur-nis-client-sur-rhel5-5/">Installation d’un serveur NIS + Client sur RHEL5.5</a> first appeared on <a href="https://gagzen.net">Gagzen</a>.</p>]]></description>
										<content:encoded><![CDATA[<p style="text-align: left;"><strong><a href="https://gagzen.net/wp-content/uploads/2011/04/Nuvola_apps_kgpg-1.png"><img decoding="async" class="alignleft size-full wp-image-412" style="margin: 10px;" title="Nuvola_apps_kgpg" src="https://gagzen.net/wp-content/uploads/2011/04/Nuvola_apps_kgpg-1.png" alt="" width="128" height="128" /></a>Présentation : </strong><br />
Network Information Service (NIS) nommé aussi Yellow Pages est un protocole client serveur développé par Sun permettant la centralisation d&rsquo;informations sur un réseau UNIX.<br />
Son but est de distribuer les informations contenues dans des fichiers de configuration contenant par exemple les noms d&rsquo;hôte (/etc/hosts), les comptes utilisateurs (/etc/passwd), etc. sur un réseau.</p>
<p>Un serveur NIS stocke et distribue donc les informations administratives du réseau, qui se comporte ainsi comme un ensemble cohérent de comptes utilisateurs, groupes, machines, etc.</p>
<p>À l&rsquo;origine, NIS est sorti sous le nom de « Yellow Pages » (YP) ou Pages jaunes mais le nom étant déposé par la compagnie britannique British Telecom, Sun a renommé son protocole NIS. Cependant, les commandes NIS commencent toutes par yp.</p>
<p style="text-align: right;">
<em>http://fr.wikipedia.org/wiki/Network_Information_Service</em></p>
<p><strong><span id="more-411"></span>Définitions :</strong><br />
Master NIS : masternis masternis.testnis 192.168.0.1<br />
Client NIS : clientnis clientnis.testnis 192.168.0.2<br />
Domaine NIS : testnis</p>
<p><span style="text-decoration: underline;"><span style="color: #ff0000;"><strong>Partie Serveur : </strong></span></span><br />
Installation des packages yp-tools ypbind ypserv portmap nfsd<br />
# yum install yp-tools ypbind ypserv portmap nfs-utils nfs-utils-lib</p>
<p><span style="text-decoration: underline;">Définition du domaine NIS : </span><br />
# vi /etc/sysconfig/network<br />
Ajout de la ligne<br />
NISDOMAIN=testnis</p>
<p><span style="text-decoration: underline;">Définition du serveur :</span><br />
# vi /etc/yp.conf<br />
Ajout de la ligne<br />
ypserver 127.0.0.1</p>
<p><span style="text-decoration: underline;">Démarrage des services :</span><br />
# service portmap start # Gestion des ports<br />
# service yppasswdd start # gestion de la modification des mots de passe à distance<br />
# service ypserv start # Daemon principal NIS<br />
# service nfs start # Daemon nfs</p>
<p><span style="text-decoration: underline;">Démarrage forcé de ces daemons au lancement du serveur :</span><br />
# chkconfig portmap on<br />
# chkconfig yppasswdd on<br />
# chkconfig ypserv on<br />
# chkconfig nfs on</p>
<p><span style="text-decoration: underline;">Arrêt de autofs et forcage d&rsquo;arrêt au boot </span><br />
# service autofs start # Daemon automount<br />
# chkconfig autofs off</p>
<p><span style="text-decoration: underline;">Modification des fichiers liés à automount : </span><br />
# cat /etc/auto.master<br />
[&#8230;]<br />
/users  yp:auto.home  -timeout=30<br />
+auto.master<br />
# cat /etc/auto.home<br />
* master.testnisbg:/users/&amp;</p>
<p><span style="text-decoration: underline;">Vérification que tout est bien démarré :</span><br />
#  rpcinfo -p 127.0.0.1<br />
program vers proto   port<br />
100000    2   tcp    111  portmapper<br />
100000    2   udp    111  portmapper<br />
100004    2   udp    634  ypserv<br />
100004    1   udp    634  ypserv<br />
100004    2   tcp    637  ypserv<br />
100004    1   tcp    637  ypserv<br />
100009    1   udp    721  yppasswdd</p>
<p><span style="text-decoration: underline;">Configuration du nfs :</span><br />
Modifier le fichier /etc/exports<br />
# cat /etc/exports<br />
/users 192.168.0.0/24(sync)</p>
<p><span style="text-decoration: underline;">Configuration du NIS : </span><br />
# /usr/lib64/yp/ypinit -m # ou /usr/lib/yp/ypinit -m sur un linux 32bits<br />
At this point, we have to construct a list of the hosts which will run NIS<br />
servers.  masternis is in the list of NIS server hosts.  Please continue to add<br />
the names for the other hosts, one per line.  When you are done with the<br />
list, type a &lt;control D&gt;.<br />
next host to add:  masternis<br />
next host to add:<br />
next host to add:<br />
The current list of NIS servers looks like this:</p>
<p>masternis</p>
<p>Is this correct?  [y/n: y]  y<br />
We need a few minutes to build the databases&#8230;<br />
Building /var/yp/testnis/ypservers&#8230;<br />
Running /var/yp/Makefile&#8230;<br />
gmake[1]: Entering directory `/var/yp/testnis&rsquo;<br />
Updating passwd.byname&#8230;<br />
Updating passwd.byuid&#8230;<br />
Updating group.byname&#8230;<br />
Updating group.bygid&#8230;<br />
Updating hosts.byname&#8230;<br />
Updating hosts.byaddr&#8230;<br />
Updating rpc.byname&#8230;<br />
Updating rpc.bynumber&#8230;<br />
Updating services.byname&#8230;<br />
Updating services.byservicename&#8230;<br />
Updating netid.byname&#8230;<br />
Updating protocols.bynumber&#8230;<br />
Updating protocols.byname&#8230;<br />
Updating mail.aliases&#8230;<br />
gmake[1]: Leaving directory `/var/yp/testnis&rsquo;</p>
<p>masternis has been set up as a NIS master server.</p>
<p>Now you can run ypinit -s masternis on all slave server.</p>
<p><span style="text-decoration: underline;">Démarrage des derniers Daemons : </span><br />
# service ypbind start<br />
# service ypxfrd start<br />
# chkconfig ypbind on<br />
# chkconfig ypxfrd on<br />
# rpcinfo -p 127.0.0.1<br />
program vers proto   port<br />
100000    2   tcp    111  portmapper<br />
100000    2   udp    111  portmapper<br />
100004    2   udp    634  ypserv<br />
100004    1   udp    634  ypserv<br />
100004    2   tcp    637  ypserv<br />
100004    1   tcp    637  ypserv<br />
100009    1   udp    721  yppasswdd<br />
100007    2   udp    738  ypbind<br />
100007    1   udp    738  ypbind<br />
100007    2   tcp    741  ypbind<br />
100007    1   tcp    741  ypbind</p>
<p><span style="text-decoration: underline;">Paramétrage du fichier hosts :</span><br />
# vi /etc/hosts<br />
Ajout des lignes :<br />
192.168.0.1    masternis.testnis<br />
192.168.0.2    clientnis.testnis</p>
<p><span style="text-decoration: underline;">Modification du hosts.allow/deny : (à tuner pour une meilleure sécurité !!)</span><br />
# vi /etc/hosts.allow<br />
Ajout de la ligne<br />
ALL: 192.168.0<br />
# vi /etc/hosts.deny<br />
Ajout de la ligne<br />
ALL: ALL</p>
<p><strong><span style="text-decoration: underline;"><span style="color: #ff0000;">Partie Cliente :</span></span></strong><br />
Installation les packages yp-tools ypbind portmap autofs<br />
# yum install yp-tools ypbind portmap autofs</p>
<p><span style="text-decoration: underline;">Paramétrage du fichier hosts :</span><br />
# vi /etc/hosts<br />
ajout des lignes :<br />
192.168.0.1    masternis.testnis<br />
192.168.0.2    clientnis.testnis</p>
<p><span style="text-decoration: underline;">Renommage des fichiers locaux liés à automount pour éviter la confusion avec les fichiers liés à NIS</span><br />
# mv /etc/auto.master /etc/auto.master_OLD<br />
# mv /etc/auto.home /etc/auto.home_OLD</p>
<p><span style="text-decoration: underline;">Modification du nsswitch.conf :</span><br />
# cat /etc/nsswitch.conf<br />
[&#8230;]<br />
#automount:  files nis<br />
automount: nis files</p>
<p><span style="text-decoration: underline;">Création du point de montage des homes users</span><br />
# mkdir /users</p>
<p><span style="text-decoration: underline;">Configuration du NIS :</span><br />
# authconfig &#8211;enableshadow &#8211;enablenis &#8211;nisdomain=testnis &#8211;nisserver=masternis.testnis –update</p>
<p><span style="text-decoration: underline;">Démarrage des daemons :</span><br />
# service portmap start<br />
Starting portmapper: [  OK  ]<br />
# service ypbind restart<br />
Shutting down NIS services:                                [  OK  ]<br />
Binding to the NIS domain:                                 [  OK  ]<br />
Listening for an NIS domain server.<br />
# service autofs restart<br />
Stopping automount:                                        [  OK  ]<br />
ypcatStarting automount:                                   [  OK  ]</p>
<p># chkconfig ypbind on<br />
# chkconfig portmap on<br />
# chkconfig autofs on</p>
<p><span style="text-decoration: underline;">Contrôle que la connexion NIS fonctionne : </span><br />
# ypcat passwd<br />
user02:$1$V1xB1m0G$qT8BnJwY.g0aBIO.BNo4q/:59137:59137::/users/user02:/bin/bash<br />
user01:$1$z91qyCHc$gCRG2kcvaKw6a5U9vA1cx.:59136:59136::/users/user01:/bin/bash</p>
<p><span style="text-decoration: underline;">Test de la connexion avec un user non local : </span><br />
# su &#8211; user01<br />
Si cela fonctionne, vous pourrez vous authentifier, et le path sera /users/user01<br />
# pwd<br />
/users/user01</p>
<p>&nbsp;</p>
<p><em>Sources : </em><br />
<em>http://www.labo-linux.com/articles/software/3049-installation-et-configuration-de-nis-network-information-service?page=1</em><br />
<em>http://www.linuxcream.com/blog/linux-system/linux_redhat/step-by-step-to-configure-nis-in-rhel5-1/</em><br />
<em>http://dawidlinux.pagesperso-orange.fr/libres_fichiers/tuto-nis.html</em><br />
<em>http://iptables.gen.tr/2010/01/nis-server-and-client-configuration/</em></p>
<p><em>image : http://fr.wikipedia.org/wiki/Fichier:Nuvola_apps_kgpg.png</em></p><p>The post <a href="https://gagzen.net/2011/04/01/installation-dun-serveur-nis-client-sur-rhel5-5/">Installation d’un serveur NIS + Client sur RHEL5.5</a> first appeared on <a href="https://gagzen.net">Gagzen</a>.</p>]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
