NIS-tjener

Fra GNUskole
Hopp til: navigasjon, søk

Dette er et oppsett for CentOS / RedHat v5.x (men jeg må sjekke om det virker :-) og jeg må oversette det til norsk)

Pakker du trenger å installere:

yum install yp-tools ypbind ypserv portmap

Edit /etc/yp.conf:

domain minskole.nis server ip.til.nis.server 

Edit /etc/ypserv.conf:

dns: no
files: 30
xfr_check_port: yes
* : * : shadow.byname : port
* : * : passwd.adjunct.byname : port 

Edit /etc/sysconfig/network:

NISDOMAIN="minskole.nis"

Set NIS domain name:

master# domainname minskole.nis
master# ypdomainname minskole.nis

Create file /var/yp/securenets:

host 127.0.0.1
255.255.255.0   192.168.0.0

Make sure the "portmap" service is running:

master# service portmap start
master# chkconfig portmap on

Portmap will need a rule in /etc/hosts.allow to allow access from localhost and any hosts that need to access NIS.

Start ypserv service:

master# service ypserv start

Check that it's listening:

master# rpcinfo -u localhost ypserv

You should see:

program 100004 version 1 ready and waiting
program 100004 version 2 ready and waiting

Initialize the NIS maps:

master# /usr/lib/yp/ypinit -m

Specify local hostname, Ctrl-D, y, let finish.

Start up ypbind, yppasswdd, ypxfrd:

master# service ypbind start
master# service yppasswdd start
master# service ypxfrd start

Set YP services to run on boot-up:

master# chkconfig ypserv on
master# chkconfig ypbind on
master# chkconfig yppasswdd on
master# chkconfig ypxfrd on