Open main menu

CDOT Wiki β

Changes

OPS535-lab-nfs

2,207 bytes added, 14:10, 4 September 2019
m
Investigation 3: File creation permission and user name mapping on NFS shares: - adding contenct to investigation 3.
==Investigation 3: File creation permission and user name mapping on NFS shares==
Create new users on the NFS server (vm2), and clients (vm1 and vm3) to study the user name mapping on NFS shares:
<ol>
<li>On the NFS server create two new users userS, and ops535 with the commands
<source>useradd -u 5001 -m userS
useradd -u 5350 -m ops535</source></li>
<li>On vm1 create two new users userA, and ops535 with the commands
<source>useradd -u 5001 -m userA
useradd -u 5350 -m ops535</source>
and use the "passwd" command to set the passwords for those users</li>.
<li>On vm1 login as userA and copy the password file to '''/nfs-mnt''', naming the copy '''passwd.A.map'''.
Confirm the copying of the file and make notes of the owner and group owner of the file.</li>
<li>Logout from userA and login as ops535. Copy the password file to /nfs-mnt, this time naming it '''passwd.A.ops'''.
Again, make notes of the owner and group owner of the file.</li>
<li>Login to the NFS server, and examine the ownership of the files you just created. Who is the owner and the group owner of the respective files?</li>
6. On vm1 and vm3, un-mount the remote directory nfs-server:/nfs-pub with the command
umount /nfs-mntPlease note that this must be done by "root" and the directory /nfs-mnt is not being used by any
process.
7. On the NFS server, make the following changes to the /etc/exports file:
change
/nfs-pub
to
/nfs-pub
change
/nfs-pub
to
/nfs-pub
ip-of-vm1(rw, root_squash)
ip-of-vm1(rw, no_root_squash)
ip-of-vm3(rw, root_squash)
ip-of-vm3(rw, no_root_squash)
and re-export the directory.
8. On vm1 and vm3, re-mount the share directory and repeat step 3 to step 6 under the super user
account "root" and copy the file /etc/group to the share directory /nfs-mnt with the
corresponding file name.
9. On vm1 and vm3, un-mount the remote directory.
10.On the NFS server, change the "rw" option in the /etc/exports file to "ro" and re-export the
directory.
11.On vm1 and vm3, re-mount the share directory and repeat step 3 to step 6 under the super user
account "root" and copy the file /etc/hosts to the share directory /nfs-mnt with the corresponding
file name.
ls -l /nfs-pub/passwd.A.*
(or ls -l /nfs-pub/passwd.B.*)
to check the file created by the user "userA" and "ops535" on vm1, vm3.
</ol>
==Completing the Lab==
932
edits