To create users in bulk and assigning groups for them use below python script and follow steps as given in screen shot
save below file in any location to execute (create_users.py) .py - python script
serverConfig()
save below file in any location to execute (create_users.py) .py - python script
serverConfig()
print 'lookup DefaultAuthenticator'
password = 'weblogic123'
atnr=cmo.getSecurityConfiguration().getDefaultRealm().lookupAuthenticationProvider("DefaultAuthenticator")
print 'create group gcp_group'
group = 'gcp_group'
atnr.createGroup(group,group)
atnr.addMemberToGroup('BIConsumers','gcp_group')
users = ['user1','user2']
for user in
users:
print 'create user: ',user
atnr.createUser(user,password,user)
atnr.addMemberToGroup(group,user)
you can login to console and check users and group tab for above users
go through below oracle documentation which will give more commands to run using WLST
how to map user to roles directly instead of groups
ReplyDelete