Ubuntu HPC NIS server setup on master node

From Notes_Wiki
Revision as of 06:43, 24 May 2023 by Saurabh (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Home > Ubuntu > HPC setup with openpbs and openmpi > NIS server setup on master node

  1. Install NIS packages and give nis domain name
    apt -y install nis
    During installation enter private domain name for NIS
  2. Configure this server as NIS master server by editing '/etc/default/nis' and updating below two parameter values:
    NISSERVER=master
    NISCLIENT=false
  3. Disable access to everyone and Allow NIS server access to sepecific subnet by editing '/etc/ypserv.securenets' as:
    255.255.255.0 <private-network-address>
    #0.0.0.0 0.0.0.0
  4. Initiate NIS database using
    /usr/lib/yp/ypinit -m
  5. When prompted with 'When you are done with the list, type a <control D>.', press 'Ctrl+D'.
  6. Confirm 'y' on 'Is this correct? [y/n: y' prompt.
  7. Restart NIS service
    systemctl restart nis
    systemctl enable nis
  8. Create user with home folder under /export/home
    useradd -m -d /export/home/user1 -s /bin/bash user1
    passwd user1
  9. Update NIS user database
    cd /var/yp
    make
    systemctl restart nis


In future whenever there is any change to /etc/passwd, /etc/group, /etc/shadow etc. (eg new user is added, user password is changed) then we need to run below command to update NIS database with latest information

make -C /var/yp;  systemctl restart nis

New user creation related steps are properly covered at Ubuntu HPC Create new user


Home > Ubuntu > HPC setup with openpbs and openmpi > NIS server setup on master node