Changes

Jump to: navigation, search

OPS335 NIS Lab

1,854 bytes added, 13:59, 18 March 2012
Part C: Adding the other VM's
paul:x:1000:1000:paul:/home/paul:/bin/bash
nis-user:x:1001:1001::/home/nis-user:/bin/bash
*While the two hosts share the same users, their UID and GID are different. This will cause a problem when mounting the home directory using NFS.
*Add an entry to your fstab so that you are mounting the home directories from the host machine, then mount and switch to your learnid (or other account where UID/GID differs between systems)
su <learnid>
cd ~
*You should recieve a permission denied error as the UID on the local system differs from the UID of the file owner on the remote server. Change back to your root account.
*Install ypbind, configure it to use your domain and NIS server and start the service.
*Edit the /etc/nsswitch file change the following lines as they appear below:
passwd: nis files
shadow: nis files
group: nis files
initgroups: files
*Save and exit the file. Again try to change to change to your learnid account (or other account where UID/GID differs between systems).
*You should now be successful, cd to your home directory and do a listing. Here is the output I recieved:
[paul@vm02 ~]$ ll
total 384
-rw-rw-r--. 1 nis-user nis-user 0 Mar 11 19:13 another_empty_file_from_vm03
drwxr-xr-x. 2 nis-user nis-user 4096 Mar 14 09:09 Desktop
drwxr-xr-x. 2 nis-user nis-user 4096 Feb 17 05:24 Documents
drwxr-xr-x. 2 nis-user nis-user 4096 Feb 17 05:45 Downloads
drwxr-xr-x. 2 nis-user nis-user 4096 Jan 4 10:12 Music
drwxr-xr-x. 2 nis-user nis-user 4096 Jan 4 10:12 Pictures
drwxr-xr-x. 2 nis-user nis-user 4096 Jan 4 10:12 Public
drwxr-xr-x. 2 nis-user nis-user 4096 Jan 4 10:12 Templates
drwxr-xr-x. 2 nis-user nis-user 4096 Jan 4 10:12 Videos
*Create an empty file and do a listing again
[paul@vm02 ~]$ touch empty_from_vm02
[paul@vm02 ~]$ ll
-rw-rw-r--. 1 nis-user nis-user 0 Mar 18 14:58 empty_from_vm02
*Ensure ypbind will start at boot and restart the vm.
==Completing the Lab==
1
edit

Navigation menu