1. create a .py file, suppose admindisplay.py and copy below contents
import os
import sys
username='weblogic'
password='weblogic123'
url='t3://localhost:40510'
domain='JJTU_Domain1'
groupName='Administrators'
connect(username, password, url)
cd('SecurityConfiguration/'+domain+'/DefaultRealm/myrealm/AuthenticationProviders/DefaultAuthenticator')
ListUsersInGroups=cmo.listAllUsersInGroup(groupName,'*',0)
print ListUsersInGroups
Note - Change username, password, host, port and domain name accordingly
2. go to your_domain/bin and run setDomainEnv script
3. execute the admindisplay.py script like below ( see command in red )
--------------------------------------------------------------------------
C:\Oracle\Middleware2\user_projects\domains\JJTU_Domain1\bin>java weblogic.WLST admin.py
( Output )
Initializing WebLogic Scripting Tool (WLST) ...
Welcome to WebLogic Server Administration Scripting Shell
Type help() for help on available commands
Connecting to t3://localhost:40510 with userid weblogic ...
Successfully connected to Admin Server 'JJTU_AdminServer' that belongs to domain 'JJTU_Domain1'.
Warning: An insecure protocol was used to connect to the
server. To ensure on-the-wire security, the SSL port or
Admin port should be used instead.
array(java.lang.String,['weblogic', 'administrator'])
--------------------------------------------------------------------------------
import os
import sys
username='weblogic'
password='weblogic123'
url='t3://localhost:40510'
domain='JJTU_Domain1'
groupName='Administrators'
connect(username, password, url)
cd('SecurityConfiguration/'+domain+'/DefaultRealm/myrealm/AuthenticationProviders/DefaultAuthenticator')
ListUsersInGroups=cmo.listAllUsersInGroup(groupName,'*',0)
print ListUsersInGroups
Note - Change username, password, host, port and domain name accordingly
2. go to your_domain/bin and run setDomainEnv script
3. execute the admindisplay.py script like below ( see command in red )
--------------------------------------------------------------------------
C:\Oracle\Middleware2\user_projects\domains\JJTU_Domain1\bin>java weblogic.WLST admin.py
( Output )
Initializing WebLogic Scripting Tool (WLST) ...
Welcome to WebLogic Server Administration Scripting Shell
Type help() for help on available commands
Connecting to t3://localhost:40510 with userid weblogic ...
Successfully connected to Admin Server 'JJTU_AdminServer' that belongs to domain 'JJTU_Domain1'.
Warning: An insecure protocol was used to connect to the
server. To ensure on-the-wire security, the SSL port or
Admin port should be used instead.
array(java.lang.String,['weblogic', 'administrator'])
--------------------------------------------------------------------------------
No comments:
Post a Comment