Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ###################################################################
- #
- # @author Copyright (c) 2010 - 2011 by Middleware Magic, All Rights Reserved.
- #
- #############################################################################
- from java.io import FileInputStream
- from weblogic.management.security.authentication import UserReaderMBean
- propInputStream = FileInputStream("details.properties")
- configProps = Properties()
- configProps.load(propInputStream)
- adminURL=configProps.get("admin.url")
- adminUserName=configProps.get("admin.userName")
- adminPassword=configProps.get("admin.password")
- userNameWildcard=configProps.get("user.name.wildcard")
- maximumToReturn=configProps.get("maximum.to.return")
- showAllAuthenticatorUserList=configProps.get("show.all.authenticator.userlist")
- connect(adminUserName, adminPassword, adminURL)
- realmName=cmo.getSecurityConfiguration().getDefaultRealm()
- authProvider = realmName.getAuthenticationProviders()
- for i in authProvider:
- if isinstance(i,UserReaderMBean):
- userName = i
- authName= i.getName()
- if showAllAuthenticatorUserList == 'true':
- userList = i.listUsers(str(userNameWildcard),int(maximumToReturn))
- print '======================================================================'
- print 'Below are the List of USERS which are in the: "'+authName+'"'
- print '======================================================================'
- num=1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement