Emidio Planamente 's Homepage

Home GNU/Linux Programming Technology Sport Others Contact

Search

  Google linux


Debian

  Apt-get
  Debian Anatomy
  Debian Backports
  Debian Help
  Debian Planet
  Debian Swiss
  History of Debian
  Getdeb
  Kernel
  Kernel 2.6
  Packages
  Refcard for newbie
  Reference book
  SATA raid
  Weekly News


Official Docs

  Distrowatch
  Firewire
  Gimp
  Gimp Photo Archive
  Linuxdoc
  Linuxdoc Reference
  Linux Focus
  Linux From Scratch
  Linux Hacks
  Linux Hardware
  Linux Printing
  MySQL
  O'Reilly
  Rute
  Source Forge
  USB guide


Installation

  Instalinux
  Preseed


Laptop

  Linux on Laptops
  Linux Toshiba
  Tux Mobil


Live-CDs

  Create it Your self
  Knoppix
  Kororaa XGL 3


Pictures

  Bay13
  Gnomelook
  Kuznetsov


Security

  GNU/Linux
  PortsDB


Linux based product

  Dreambox


Free web service

  S5 presents


Against Micro$oft

  Combatti Micro$oft
  Microsuck


HTML validator CSS validator

 

NIS micro howto


1. NIS server

2. NIS client

3. Troubleshooting

4. Releated documents


1. NIS server


1.1. Installation


  apt-get install netbase nis


1.2. Configuration


1.2.1. File /etc/hosts


Add in this file, for each server/client, all the servers and clients of your network.


1.2.2. File /etc/defaultdomain


This file contains the domain name of the NIS.


You don't need to update it, because it's already done during the installation of the nis package.


1.2.3. File /etc/default/nis


Set at least the following value:


  NISSERVER=master


1.2.4. File /etc/ypserv.securenets


Add your local network, like


255.255.255.0   192.168.128.0


1.2.5. File /etc/ypserv.conf


If you want more security, edit this file. For normal cases, it's not necessary to do something here.


1.2.6. Setup the server


Call


  /usr/lib/yp/ypinit -m


and ignore the various


  "failed to send ..."


messages.


1.2.7. NIS on server


If you want NIS access also on the server, after have configured this last, just continue setting it up like a client.


1.2.8. Start the NIS service


  /etc/init.d/nis restart


2. NIS client


2.1. Installation


  apt-get install netbase nis


2.2. Configuration


2.2.1. File /etc/passwd


Add the following line at the end of this file:


  +::::::


2.2.2. File /etc/groups


Add the following line at the end of this file:


  +::0:


2.2.3. File /etc/nsswitch.conf


Add


  nis


to the "hosts" line.


For example:


  hosts:          nis files dns


2.2.4. Start the NIS service


  /etc/init.d/nis restart


3. Troubleshooting


3.1. Changing domain name


The domain name should normaly be changed calling


  dpkg-reconfigure nis


but this seems to don't reask it. A workaround is


  apt-get remove --purge nis; apt-get install nis


or simply edit the file /etc/defaultdomain.


3.2. Clients not updated


If you have changed passwords or other settings and there are not been reflected to the NIS client, try


  cd /var/yp/

  make


3.3. Groups not propagated to clients


If you want to set up only once the group access for each user and this shall be valid for all the NIS clients, change in /var/yp/Makefile the following value


  MINGID=1000


A good value could be:


MINGID=7


Don't forget to updated the NIS configuration:


  cd /var/yp/

  make


3.4. NIS Login failure on client side


If you can successfully login with a NIS account on the server side, but not on the client side and on the client side you see the NIS users/groups (login as root, then ls -l /home), it could be you have a problem with the shadow passwords.


The default Debian configuration seems to don't work very well with shadow password.


If you want a cheap solution, simply disable it on both client and server sides, by calling on both sides


  dpkg-reconfigure passwd


Note, the only difference between shadow or not shadow password, is the crypted password is not showed in the /etc/passwd file that is world readable but is stored in the /etc/shadow file that is reabable by the root only.


4. Releated documents


4.1. Debian NIS howto


This micro howto is based on http://www.linux-nis.org/doc/nis.debian.howto.



Emidio Planamente

Last modified on 2024-08-02