action #67126

Updated by riafarov over 3 years ago

In order to verify that "yast nis_server" and "yast nis" configuration on nis mm tests, works properly, a new module can be created for each test with following steps: 

 NIS server: 
 (as root) 
 * useradd nis_user -> in the current test, /home/nis_user folder is created and shared via nfs, so in order to avoid extra steps, the user added should be "nis_user". 
 * passwd nis_user 
 * chmod nis_user:users /home/nis_user -> current owner of the folder is "root". 
 * cd /var/yp  
 * make -> nis database needs to be aware of the new user. 
 * Check if /etc/defaultdomain and /etc/idmapd.conf contain the nis domain ( At maps setup of nis_server module, all entries are selected. There can be a check in /var/yp/ if entries correspond 

 NIS client: 
 (after above actions on nis server are completed) 
 * ypcat passwd | grep nis_user / ypmatch nis_user passwd / getent passwd nis_user -> one option out of three, in order to verify that the client connection to nis server database is successful and new user is visible. 
 * su - nis_user 
 * pwd -> verify home directory of nis_user is /home/nis_user 
 * echo "nis works"> file1 -> verify write  
 * grep "nis works"    -> verify read 
 * Check if /etc/yp.conf exists and has the entry "ypserv" 
 * Check if /etc/nsswitch.conf has expected entries e.g. "netgroup: files nis" 
 * Check if /etc/defaultdomain contains the nis domain 

 We should also extract settings to use same value for configuration and validation.