1.- Edit /etc/hosts and and nis server host/ip
[su_note]
#localhost is your linux client hostname
127.0.1.1 localhostname.domain.com localhost
192.168.1.10 mynisvr.test.com
[/su_note]
2.- install portmap, ypbind, nfs-common and nis
[su_note] apt-get install nfs-common nis -y [/su_note]
2.1 to mount nfs home dirs install autofs5
[su_note] apt install autofs5 [/su_note]
2.a) Enter your nis domain, i.e tempnet or whatever your nis domain server is. To find out the domain name, from another client computer that’s already connected to a nis server, do [su_note] cat /etc/defaultdomain [/su_note]
3. Edit /etc/yp.conf
[su_note] ypserver 192.168.1.11
ypserver 192.167.1.12[/su_note]
4. Edit /etc/passwd, /etc/group and /etc/shadow and add the following at the end of the file.
For passwd with six :[su_note] +::::::[/su_note]
For group with 3 :[su_note]+:::[/su_note]
For shadow with 8 : [su_note]+::::::::[/su_note]
5: edit /etc/nsswitch.conf
[su_note]
automount: files nis
netgroup: nis
[/su_note]
6. Configure Ubuntu for manual login by creating a nis file: This only works for the gnome desktop.
/etc/lightdm/lightdm.conf.d/nis.conf
[su_note]
[SeatDefaults]
greeter-show-manual-login=true
user-session=true
[/su_note]
For Unity, the file location is sudo /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf
[su_note]
[SeatDefaults]
greeter-show-manual-login=true
guest-session=false
[/su_note]
6: Troubleshooting:
6.1 Test connection using ypwhich fails, export firewall from a known client.
[su_note]iptables-save > firewallclientconfig.txt[/su_note]
now import on new client
[su_note] itables-restore < firewallclientconfig.txt[/su_note]
6.2 With Ubuntu 16.04 the rpcbind daemon won’t start before the nis service. Run the following to fix it.
[su_note]sudo systemctl add-wants multi-user.target rpcbind.service[/su_note]
You should get a message that says
[su_note]Created symlink from /etc/systemd/system/multi-user.target.wants/rpcbind.service to /lib/systemd/system/rpcbind.service[/su_note]
Another troubleshooting step: do a
[su_note] su – remoteusername [/su_note]
if it complains about “cannot execute /bin/tcsh no such file or directory”, do
[su_note] apt-get install tcsh [/su_note]
If you cannot login using your nis credentials. Press Alt + F2. Use your local credentials to login and then add your nis username to the sudoers list.
[su_note]
sudo adduser nisusername sudo
[/su_note]
Log out and log back using your nis credentials. You should be able to check the logs for further troubleshooting /var/log/syslog /var/log/auth.log /var/log/lightdm/lightdm.log
If you are upgrading from Trusty (14.04) to Xenial (16.04), you may need to install gnome desktop.
[su_note]
sudo apt install ubuntu-gnome-desktop
[/su_note]
Check if mount points are ok.
[su_note] showmount -e NFS-server-IP-addr [/su_note]