Setting up Solaris 9 as a NIS Client
  • Setting up Solaris 7/8/9 as an NIS client
    • NIS client setup involves two parts
      • 1. obtain NIS maps from the server
      • 2. using NIS maps for various services (login, netgroup, hosts.equiv, etc)
    • Getting NIS maps from the server
      • Please note that the older Solaris machines only accepts MD5 password and not the newer ones.
        • 1. Put your nis domain name in /etc/defaultdomain.
        • 2. As root, run domainname yournisdomain.
        • 3. As root, run ypinit -c and enter then names of all your nis servers. Do not put IP addresses here. You must ensure that /etc/hosts contains your nis servers.
        • 4. Edit /etc/nsswitch.conf and add nis to the end of the passwd: and group: lines.
        • 5. Reboot for NIS glory.
          • Alternately, run /usr/lib/netsvc/yp/ypbind to avoid rebooting. dtlogin may have to be restarted before GUI nis logins can proceed. Run /etc/init.d/dtlogin stop and /etc/init.d/dtlogin start. — RajaSubramanian - 16 Oct 2002
      • If you have a linux NIS server, your setup may still be incomplete. See the next section for more config.
  • Linux NIS server setup for Solaris clients
    • The Linux NIS server must not mangle passwords or depend on secure ports for solaris nis clients. Specifically, passwd.byname and passwd.byuid maps must be made open. Here is an example entry in /etc/ypserv.conf that will accomplish this.
    • say 192.168.1.19 is IP address of Solaris NIS client
    • you will need to append following lines into /etc/ypserv.conf on ther linux NIS server:
      • 192.168.1.19 : passwd.byname : none
      • 192.168.1.19 : passwd.byuid : none
    • See the linux ypserv(8) man page for details.

Using NIS maps

* Being able to ypcat some NIS map does not automagically allow you to use NIS for accounts, etc. Each service must be setup to use NIS maps, and this is rather easy to do. Keep reading.

  • NIS logins
    • NIS accounts is probably the most used feature of NIS. Ensure that /etc/nsswitch.conf contains nis entries for the passwd and group lines -
      • passwd: files nis
      • group: files nis
    • Note: Debian users see /usr/share/doc/nis/nis.debian.howto.gz
  • NFS exports
    • The netgroup maps can be consulted for NFS exporting filesystems. This allows easy automounting of our exports by other hosts. Simply mentioning the netgroup name instead of each host in the /etc/dfs/dfstab file will allow all hosts in the specified netgroup to nfs mount our filesystems. For example, to export /data/neo on host neo to all hosts in the hosts netgroup, the dfstab file on neo contains a line like this -
      • share -F nfs -o rw=my_hosts -d "data hosta" /data/hosta
  • DNS resolution
    • Distributing the /etc/hosts file over NIS makes it easier to access machines that are not yet DNS registered. Adding nis to the hosts line in the /etc/nsswitch.conf file solves this problem. Eg. hosts: files dns nis.
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License