User Tools

Site Tools


user:jcavalu3:portfolio:eoce:0x1

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
user:jcavalu3:portfolio:eoce:0x1 [2014/05/07 17:31] – [Down to Business] jcavalu3user:jcavalu3:portfolio:eoce:0x1 [2014/05/08 04:55] (current) – [NIS Configuration] jcavalu3
Line 126: Line 126:
 # #
 # Example for NFSv2 and NFSv3: # Example for NFSv2 and NFSv3:
-/srv       masterchief(rw,sync,no_subtree_check,no_root_squash) arbiter(ro,sync,no_subtree_check,no_root_squash)+/srv       masterchief(rw,sync,no_subtree_check,no_root_squash) arbiter(rw,sync,no_subtree_check,no_root_squash)
 # #
 # Example for NFSv4: # Example for NFSv4:
Line 136: Line 136:
 **The uncommented line contains the client mount settings.** **The uncommented line contains the client mount settings.**
  
-**fstab** has been configured to mount cortana:/home to the client's /home directory.+**fstab** has been configured to mount cortana:/home to the client's /home directory on startup.
  
 <file> <file>
 +# /etc/fstab: static file system information.
 +#
 +# <file system> <mount point>   <type>  <options>       <dump>  <pass>
 +proc            /proc           proc    defaults        0       0
 +devpts          /dev/pts        devpts  rw,noexec,nosuid,gid=5,mode=620 0  0
 +/dev/xvda1 none swap sw 0 0
 +/dev/xvda2 / ext3 noatime,nodiratime,errors=remount-ro 0 1
 +cortana:/home /home             nfs     rw,sync,hard,intr             0
 +</file>
 +
 +====NIS Configuration====
 +----
 +
 +I followed a tutorial online to set up the NIS server and clients.
 +
 +Server configuration can be seen [[http://www.server-world.info/en/note?os=Debian_7.0&p=nis|here]].
 +Client configuration can be seen [[http://www.server-world.info/en/note?os=Debian_7.0&p=nis&f=2|here]].
 +
 +===Server===
 +
 +The NIS domain is on the cortana server (srv-059).
 +
 +The first order of business is installing the **nis** package onto the server:
 +
 +<cli>
 +apt-get install nis
 +</cli>
 +
 +At the end of the installation, it will ask you to to choose the NIS "domainname" for the server, which I called **cortana** to keep the naming scheme for the project uniform. Next comes the file configuration:
 +
 +To go along with the tutorial and keep things simple and readable, I will only list the important changes in each file (all changes indicated with **change**):
 +
 +<file>
 +
 +root@cortana:~# vi /etc/default/nis
 +
 +# line 6: set NISSERVER to master
 +NISSERVER=**master**
 +
 +
 +
 +root@cortana:~# vi /etc/ypserv.securenets
 +
 +# This line gives access to everybody
 +0.0.0.0 0.0.0.0
 +
 +
 +
 +root@cortana:~# vi /var/yp/Makefile
 +
 +# add shadow in front of passwd on line 119
 +
 +ALL = passwd **shadow** group hosts rpc services netid protocols netgrp
 +
 +
 +
 +root@cortana:~# vi /etc/hosts
 +
 +127.0.0.1     localhost
 +127.0.1.1     cortana cortana
 +# add the IP address for the NIS database
 +**10.80.3.59    cortana**
 +
 +
 +#update NIS database (press control-d when prompted)
 +root@cortana:~# /usr/lib/yp/ypinit -m
 +
 +
 +# start the NIS server
 +root@cortana:~# /etc/init.d/nis start
 +
 +# When adding new users, you MUST UPDATE THE NIS DATABASE with the following method
 +root@cortana:~# cd /var/yp
 +root@cortana:~# make
  
 </file> </file>
 +
 +===Client Configuration===
 +
 +Client configuration begins with the installation of the NIS package and asks for the NIS domain name, which will be **cortana**.
 +
 +Next, the real configuration:
 +
 +<file>
 +
 +root@client:~# vi /etc/yp.conf
 +
 +# At the end of the file, add the domain name followed by the server in the following format:
 +cortana cortana.projects.lan
 +
 +
 +
 +root@client:~# vi /etc/nsswitch.conf
 +
 +passwd:         compat **nis**     # added on line 7
 +group:          compat **nis**     # added
 +shadow:         compat **nis**     # added
 +
 +hosts:          files dns **nis**  # added
 +
 +# Lastly, reboot the client.
 +</file>
 +
 +With NFS and NIS configured correctly, you should now be able to log onto cortana from arbiter and masterchief as the users on cortana.
 +
user/jcavalu3/portfolio/eoce/0x1.1399483910.txt.gz · Last modified: 2014/05/07 17:31 by jcavalu3