Make sure the 32bit libraries are installed (root# sudo apt-get install ia32-libs)
Use the synaptic tool to install nfs-common (root# sudo apt-get install nfs-common).
Use the synaptic tool to install nis (root# sudo apt-get install nis).
#During the configuration of nis, set the domain name to
uncc.edu
Change the /etc/yp.conf file to have the entry (root# sudo vi /etc/yp.conf) :
(If you prefer other text edit tool like gvim, you can install it first (root# sudo apt-get install vim-gnome) then edit the configuration file (root# sudo gvim /etc/yp.conf))
#
# yp.conf Configuration file for the ypbind process. You can define
# NIS servers manually here if they can't be found by
# broadcasting on the local net (which is the default).
#
# See the manual page of ypbind for the syntax of this file.
#
# IMPORTANT: For the "ypserver", use IP addresses, or make sure that
# the host is in /etc/hosts. This file is only interpreted
# once, and if DNS isn't reachable yet the ypserver cannot
# be resolved and ypbind won't ever bind to the server.
# ypserver ypserver.network.com
ypserver visionserver-01.uncc.edu
Use the synaptic tool to install autofs (root# sudo apt-get install autofs).
Change the /etc/auto.master file to have the entry (root# sudo vi /etc/auto.master):
#
# $Id: auto.master,v 1.4 2005/01/04 14:36:54 raven Exp $
#
# Sample auto.master file
# This is an automounter map and it has the following format
# key [ -mount-options-separated-by-comma ] location
# For details of the format look at autofs(5).
#/misc /etc/auto.misc --timeout=60
#/smb /etc/auto.smb
#/misc /etc/auto.misc
#/net /etc/auto.net
/home /etc/auto.home --timeout=60 --ghost
Create the /etc/auto.home file (root# sudo touch /etc/auto.home)
Change the /etc/auto.home file to have the entry (root# sudo vi /etc/auto.home):
#/etc/auto.home
* -fstype=nfs4,sec=sys,rsize=8192,wsize=8192,soft,intr,nosuid,tcp visionserver-01:/home1/&
Change the /etc/nsswitch.conf (root# sudo vi /etc/nsswitch.conf)
# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc-reference' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.
passwd: nis compat
group: nis compat
shadow: nis compat
hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4
networks: files
protocols: db files
services: db files
ethers: db files
rpc: db files
netgroup: nis
Edit the /etc/passwd file (root# sudo vi /etc/passwd)
# add this line to the end
+::::::
Edit the /etc/group file (root# sudo vi /etc/group)
# add this line to the end
+:::
Edit the /etc/shadow file (root# sudo vi /etc/shadow)
# add this line to the end
+::::::::
Edit the /etc/default/nfs-common file (root# sudo vi /etc/default/nfs-common)
# modify the lines having NEED_IDMAPD= to be the following
NEED_IDMAPD=yes
Edit the /etc/idmapd.cont file (root# sudo vi /etc/idmapd)
# replace the contents of the file to include the following
[Translation]
Method = nsswitch
[General]
Verbosity = 0
Pipefs-Directory = /run/rpc_pipefs
# set your own domain here, if id differs from FQDN minus hostname
# Domain = localdomain
Domain = uncc.edu
[Mapping]
Nobody-User = nobody
Nobody-Group = nogroup
Modify the rc.local script to restart nis if it is skipped in boot (root# sudo vi /etc/rc.local). This step may not be necessary for versions of Ubuntu >= 11.10.
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
echo -n "Waiting for network to come up..."
while :; do
nm-tool | egrep -q 'DNS:[[:space:]]+[1-9]' && break
sleep 1
echo -n "."
done
echo " OK"
/etc/init.d/ntp restart
/etc/init.d/ypbind restart
/etc/init.d/autofs restart
exit 0
Go to the root directory (root# cd /)
Rename the home directory to home.old (root# sudo mv home home.old)
Make a new home directory (root# sudo mkdir /home)
Make a new server directory for server applications (root# sudo mkdir /server)
Edit the file /etc/fstab to automatically mount the server directory on boot (root# sudo vi /etc/fstab)
Rebuild the yp file references (root# cd /var/yp; sudo make)
# add the following line to this file
visionserver-01:/server /server nfs4 rw,soft,intr,nosuid,sec=sys,tcp,rsize=8192,wsize=8192 0 1
Mount the /server directory over the network (root# sudo mount -a)
Install ntp (root# sudo apt-get install ntp)
Restart nis (root# sudo /etc/init.d/nis restart)
Restart autofs (root# sudo /etc/init.d/autofs restart)
Actually you might as well reboot the whole system (root# sudo reboot)
You may have to wait 30 secs to a minute for the network manager to come up and the script from rc.local to execute that will start the nis services.