Tips to Setup NIS Server with OpenBSD
Master server setup
* Enable RPC
/etc/rc.conf:
portmap=YES
* Enable the NFS server
/etc/rc.conf:
nfs_server=YES
lockd=YES
nfs_flags=”-tun 4″ # 4 simultaneous clients. Crank if needed
/etc/exports:
# change to match your lan addresses and requirements
/home -maproot=0 -network 172.21.0.0 -mask 255.255.0.0
* Enable NIS master server
root # echo “mynisdomain” > /etc/defaultdomain
(Change ‘mynisdomain’ to something suitable)
root # ypinit -m
/etc/rc.conf:
ypserv_flags=
yppasswdd_flags= # Allows password changes from remote machines
* Start the daemons
root # portmap
root # nfsd -tun 4
root # mountd
root # rpc.lockd
root # ypserv
root # ypbind
root # rpc.yppasswdd
These will all be restarted on reboot.
* Create user accounts and populate /home
Install favourite shells (for example zsh, bash). Update /etc/shells, /etc/usermgmt.conf and /etc/skel with preferences and defaults, for example, supply a default password and provide shell startup scripts.
root # useradd -m newuser
…
Add new users to supplementary groups in /etc/group, wheel for example.
* Create an automounter map for client machines
Edit /etc/amd/amd.home to contain these 2 lines:
/defaults type:=nfs;sublink:=${key};opts:=rw,soft,intr,vers=2,proto=udp
* rhost:=mymasterhost;rfs:=/home
Change mymasterhost to hostname of master server. Can also have special per-user settings if needed.
[Note vers=2 is the only option I could get locking over NFS working with a FreeBSD NFS client. OpenBSD's amd complains that these are old style options. What should I be using that's portable?]
* Update the master NIS maps with new changes
root # cd /var/yp; make
Source : www.openbsdsupport.org
Popular Tags for the article:
nfs openbsd amd, openbsd nis howto, openbsd usermgmt conf exemplesRelated posts:


