Wednesday, 20 December 2017

Changing password for existing user (passwordchange.py)

DomainName = "base_domain"

ADMINUrl = "t3://localhost:7001"

ADMINUser = "pavan"

oldPassword = "pavan123"

newPassword = "pavan456"

print  '*****************'
connect(ADMINUser,oldPassword,ADMINUrl)

cd('/SecurityConfiguration/'+DomainName+'/Realms/myrealm/AuthenticationProviders/DefaultAuthenticator')

cmo.resetUserPassword(ADMINUser,newPassword)

print  '*****************'

disconnect()

print '*** connecting with new password***......................................'


connect(ADMINUser,newPassword,ADMINUrl)

No comments:

Post a Comment