Hello all,
I would need a scirpt to perform the following operation:
- I would like to give a spreadsheet as input with 3 columns with firstname,lastname,userid in order
- The script should read from the spreadsheet and search if each user exists in particular groups "Group1" by using the command user show-groups userx and grep for group group1.If user has group1 then continue with the following commands :
- pdadmin -a sec_master -p XXXXX user modify userx password passwordx
- pdadmin -a sec_master -p XXXXX user modify userx password-valid no
or
If the user doesnt belong to the group group1 then do the following commands:
- pdadmin -a sec_master -p XXXXX group modify group1 add userx
- pdadmin -a sec_master -p XXXXX user modify userx account-valid yes
- pdadmin -a sec_master -p XXXXX user modify userx password passwordx
- pdadmin -a sec_master -p XXXXX user modify userx password-valid no
The values of XXXXX,group1,passwordx should be requested when the script is run.