Wednesday, June 4, 2014

solaris 10 nis client

it never ends, does it?
 solaris 10 nis domain client  
 Add a client to the new NIS domain  
 /etc/hosts to include entries for the NIS master and all slaves.  
 10.10.10.1     nis1 nis1.nisdomainname  
 10.10.10.2     nis2 nis2.nisdomainname  
 # domainname nisdomainname  
 # domainname > /etc/defaultdomain  
 # cat /etc/defaultdomain  
 nisdomainname  
 # ypinit -c  
 Add the following hosts:  
 nis_master  
 nis_slave  
 nis_other_slave  
 nis_master-a   (other interface, if available)  
 nis_slave-a   (other interface, if available)  
 nis_other_slave-a   (other interface, if available)  
 Edit nsswitch.nis and copt it over to nsswitch.conf  

* nb: when doing ypinit, the hostname is the NAME not the IP address
  in /etc/hosts oh yes.
 ..............  
 # /etc/nsswitch.nis:  
 passwd:   files nis  
 group:   files nis  
 # consult /etc "files" only if nis is down.   
 hosts:   files dns nis  
 ipnodes:  files  
 networks:  files nis  
 protocols: files nis  
 rpc:    files nis  
 ethers:   files nis  
 netmasks:  files nis    
 bootparams: files nis   
 publickey: files nis  
 netgroup:  nis  
 automount: nis files  
 aliases:  files nis  
 # for efficient getservbyname() avoid nis  
 services:  files nis  
 sendmailvars:  files  
 printers:    user files nis  
 auth_attr: files nis  
 prof_attr: files nis  
 project:  files nis  
 ..............  
 # cp nsswitch.conf nsswitch.conf.orig ; mv nsswitch.nis nsswitch.conf  
 # /etc/init.d/nscd stop ; /etc/init.d/nscd start  
 Start NIS  
 # svcadm enable nis/client  
 # ypwhich   
 nis_master  
 # ypcat hosts  
 # ypcat passwd  
 a scad of stuff  
 If you're using automounts:  
 # svcadm enable filesystem/autofs  
Post a Comment