<< This script changes the session password on all MPE connections and the user password on all Unix connections for a particular session name or login id. The script prompts for the session/login id and the new password. >> name SessionPassword Group "&Utility" Command "Session&Password"; dialog_result = dialog("Which login/session ID do you want to modify?", 1, ""); if dialog_result.button = 1 then -- OK button if dialog_result.enteredtext = "" then dialog_result = dialog("You have to enter a login/session ID!"); stop; else searchUserid = dialog_result.enteredtext; endif else -- Cancel button stop; endif dialog_result = dialog("What is the new login/session password? (enter ? to enable prompting)", 1, ""); if dialog_result.button = 1 then -- OK button newPassword = dialog_result.enteredtext; else -- Cancel button stop; endif conniterator = getconnectiontemplateiterator(); changeCount = 0; repeat for connTemplate in conniterator templogon = connTemplate.logoninformation; if templogon.connectiontype = "Unix" then if templogon.username = searchUserid then templogon.password = newPassword; connTemplate.setlogoninformation(templogon); changeCount = changeCount + 1; endif else -- MPE connection if pos(templogon.Hello, (searchUserid + ",")) = 1 then templogon.sessionpass = newPassword; connTemplate.setlogoninformation(templogon); changeCount = changeCount + 1; endif endif endrepeat if changeCount = 0 then msg = "No matching login/session IDs found"; else if changeCount = 1 then msg = "One password changed"; else msg = "A total of " + string(changeCount) + " passwords were changed"; endif endif dialog_result = dialog(msg);