How to list all logged in users in Weblogic?
Dear All,
I want to list all the logged in users in weblogic since we have assigned each user a separate login.
Right now, weblogic console shows if any user is making any changes. However, I want to list all users logged in even if they are in idle state.
I have also looked in domainRuntime location using WLST but couldn't find any info.
Please suggest.
Thanks,
Karan
Hi,
can you try with this JMX code.
import javax.naming.*;
import javax.management.MBeanInfo;
import weblogic.jndi.Environment;
import weblogic.management.runtime.ServerRuntimeMBean;
import weblogic.security.providers.authentication.DefaultAuthenticatorMBean;
import weblogic.management.security.authentication.UserReaderMBean;
import weblogic.management.security.authentication.GroupReaderMBean;
import weblogic.management.MBeanHome;
import weblogic.management.WebLogicMBean;
import weblogic.management.tools.Info;
import weblogic.management.Helper;
import weblogic.management.security.authentication.*;
public class ListUsersAndGroups
public static void main(String[] args)
MBeanHome home = null;
try
Environment env = new Environment();
env.setProviderUrl(“t3://localhost:7001?);
env.setSecurityPrincipal(“weblogic”);
env.setSecurityCredentials(“weblogic”);
Context ctx = env.getInitialContext();
home = (MBeanHome)ctx.lookup(“weblogic.management.adminhome”);
weblogic.management.security.RealmMBean rmBean = home.getActiveDomain().getSecurityConfiguration().getDefaultRealm();
AuthenticationProviderMBean[] authenticationBeans = rmBean.getAuthenticationProviders();
DefaultAuthenticatorMBean defaultAuthenticationMBean = (DefaultAuthenticatorMBean)authenticationBeans[0];
UserReaderMBean userReaderMBean = (UserReaderMBean)defaultAuthenticationMBean;
GroupReaderMBean groupReaderMBean = (GroupReaderMBean)defaultAuthenticationMBean;
String userCurName = userReaderMBean.listUsers(“*”, 100);
while (userReaderMBean.haveCurrent(userCurName) )
String user = userReaderMBean.getCurrentName(userCurName);
System.out.println(“\n User: ” + user);
userReaderMBean.advance(userCurName);
String cursorName = groupReaderMBean.listGroups(“*”, 100);
while (groupReaderMBean.haveCurrent(cursorName) )
String group = groupReaderMBean.getCurrentName(cursorName);
System.out.println(“\n Group: ” + group);
groupReaderMBean.advance(cursorName);
catch (Exception e)
e.printStackTrace();
Regards,
Kal
Similar Messages
-
Sunone Messaging Server 6.1--How to list all mail user's last login time
hi,i want to know how to list all the mail user's last login time.
There are more than 100000 mailbox accounts on our mail server,
i want to know which account is not used for more than 2 or 3 years.
thanks.http://wikis.sun.com/display/CommSuite/imsconnutil
Somchai. -
How to print/list all the groups/users present in Weblogic using Java code
Hi,
Weblogic version : 11.1.1.5
How to print/list all the groups/users present in Weblogic using Java code
I want to make a remote connection to Weblogic server and print all the users/groups present in it.
I have gone through the below mentioned site, but I cannot use the same approach since most of the API' are deprecated for example "weblogic.management.MBeanHome;"
http://weblogic-wonders.com/weblogic/2010/11/10/list-users-and-groups-in-weblogic-using-jmx/
Thanks in advance,
Edited by: 984107 on 05-Feb-2013 05:26
Edited by: 984107 on 05-Feb-2013 22:59see this http://www.techpaste.com/2012/06/managing-user-groups-wlst-scripts-weblogic/
Hope this helps. -
How can I list all the domains configured for Weblogic Servers?
How can I list all the domains configured for Weblogic Servers?
I saw a note, which says the following:
"WebLogic Server does not support multi-domain interaction using either the Administration Console, the weblogic.Admin utility, or WebLogic Ant tasks. This restriction does not, however, explicitly preclude a user written Java application from accessing multiple domains simultaneously."
In my case, I just want to list all the domains, is that possible by using any scripts?
Thanks
AJIf you use WLS Node Manager and the Config Wizard was used to create the domains, then the list of domains should be in a location like this:
<MIDDLEWARE_HOME>\wlserver_10.3\common\nodemanager\nodemanager.domains
Enterprise Manager Grid Control also has support for multi-domain management of WLS in a console. -
How to list all files in a given directory?
How to list all the files in a given directory?
A possible recursive algorithm for printing all the files in a directory and its subdirectories is:
Print the name of the directory
for each file in the directory:
if the file is a directory:
Print its contents recursively
else
Print the name of the file.
Directory "games"
blackbox
Directory "CardGames"
cribbage
euchre
tetris
The Solution
This program lists the contents of a directory specified by
the user. The contents of subdirectories are also listed,
up to any level of nesting. Indentation is used to show
the level of nesting.
The user is asked to type in a directory name.
If the name entered by the user is not a directory, a
message is printed and the program ends.
import java.io.*;
public class RecursiveDirectoryList {
public static void main(String[] args) {
String directoryName; // Directory name entered by the user.
File directory; // File object referring to the directory.
TextIO.put("Enter a directory name: ");
directoryName = TextIO.getln().trim();
directory = new File(directoryName);
if (directory.isDirectory() == false) {
// Program needs a directory name. Print an error message.
if (directory.exists() == false)
TextIO.putln("There is no such directory!");
else
TextIO.putln("That file is not a directory.");
else {
// List the contents of directory, with no indentation
// at the top level.
listContents( directory, "" );
} // end main()
static void listContents(File dir, String indent) {
// A recursive subroutine that lists the contents of
// the directory dir, including the contents of its
// subdirectories to any level of nesting. It is assumed
// that dir is in fact a directory. The indent parameter
// is a string of blanks that is prepended to each item in
// the listing. It grows in length with each increase in
// the level of directory nesting.
String[] files; // List of names of files in the directory.
TextIO.putln(indent + "Directory \"" + dir.getName() + "\":");
indent += " "; // Increase the indentation for listing the contents.
files = dir.list();
for (int i = 0; i < files.length; i++) {
// If the file is a directory, list its contents
// recursively. Otherwise, just print its name.
File f = new File(dir, files);
if (f.isDirectory())
listContents(f, indent);
else
TextIO.putln(indent + files[i]);
} // end listContents()
} // end class RecursiveDirectoryList
Cheers,
Kosh! -
Wiki Server Requires "All logged in users" set to R&W
I continue to try and resolve spurious issues and unpredictable behavior. Now, I'm trying to rebuild a group wiki page because I could not control any of the permissions on the existing page. The purpose of the wiki is only to provide a shared calendar among a small subset (call them managers) of the users in the workgroup.
In order to make it so that "managers" would be the only people who could read and write to this calendar, I tried to set the wiki permissions to support this:
managers read & write
all logged in users read only
all unathenticated users no access
I could not get this to work. The only way I can get it so one of the users in the manager group can create or edit events in the calendar is if I have "All logged in users" set to read and write, which to me defeats the purpose of groups.
Either something is still jacked up with my wiki permissions (I did migrate from SLS quite some time ago but have never felt everything was working really reliably) or I am misunderstanding how the wiki permmissions are supposed to work.
Can someone help me with this, please?Having the same problem. I'd be interested in know if you managed to resolved this?
-
How to list all properties in the default Toolkit
I would like to know what kinds of properties are stored in the default Toolkit (Toolkit.getDefaultToolkit()). I don't know how to list all of them. Toolkit class has a method getProperty(String key, String defaultValue), but without knowing a list of valid keys, this method is useless.
Any idea would be appreciated.Here is a little utility that I wrote to display all the UIDefaults that are returned from UIManager.getDefaults(). Perhaps this is what you are looking for?
import javax.swing.*;
import java.util.*;
public class DefaultsTable extends JTable {
public static void main(String args[]) {
JTable t = new DefaultsTable();
public DefaultsTable() {
super();
setModel(new MyTableModel());
JFrame jf = new JFrame("UI Defaults");
jf.addWindowListener(new WindowCloser());
jf.getContentPane().add(new JScrollPane(this));
jf.pack();
jf.show();
class MyTableModel extends javax.swing.table.AbstractTableModel {
UIDefaults uid;
Vector keys;
public MyTableModel() {
uid = UIManager.getDefaults();
keys = new Vector();
for (Enumeration e=uid.keys() ; e.hasMoreElements(); ) {
Object o = e.nextElement();
if (o instanceof String) {
keys.add(o);
Collections.sort(keys);
public int getRowCount() {
return keys.size();
public int getColumnCount() {
return 2;
public String getColumnName(int column) {
if (column == 0) {
return "KEY";
} else {
return "VALUE";
public Object getValueAt(int row, int column) {
Object key = keys.get(row);
if (column == 0) {
return key;
} else {
return uid.get(key);
class WindowCloser extends java.awt.event.WindowAdapter {
public void windowClosing(java.awt.event.WindowEvent we) {
System.exit(0);
} -
How to list all the rows from the table VBAK
Friends ,
How to list all the rows from the table VBAK.select query and the output list is appreciated.Hi,
IF you want to select all the rows for VBAK-
Write-
Data:itab type table of VBAK,
wa like line of itab.
SELECT * FROM VBAK into table itab.
Itab is the internal table with type VBAK.
Loop at itab into wa.
Write: wa-field1,
endloop. -
Urgent: How to list all alias for a server throw DNS query?
Hi
Is there anyone know how to list all alias for a server by asking the network DNS. Is that possible?
It doesn't work with InetAddress it return a single result.
Best regardInetAddress will not get you the aliases, but you can certainly find all the different IP addresses for a specific host name using the getAllByName() method.
You won't be able to get the aliases since those IP addresses (assuming there are more than 1) will all be cached as mapping to the name you passed to the getAllByName() method and you can't clear the map cache until the JVM exits.
So your best hope is to get a list of IP's and either exit your app and restart with a new mode, or save them to a file for another app to read. -
How to select all files in "user dir" (LastAccessedDirectrory) using applet
Hi,
Can anyone tell me " How to select all files in "user dir" (Last Accessed Directrory) using applet"?
For this which method in applet used?
Thanks in Advance.1) Do you want "user dir" (watever that is) or do you wnat the last accessed directory? Last accessed by what/whom?
2) Applets can't access the local file sytem, and for good reason, unless they're signed and the client has given permission. -
How to get/capture log-on user name on PC (work station)
Hi,
Colud anyone give me how to get/capture log-on user name on my PC (work station)?
I need to get the infomation by using a function module.
Kind regards,
HisaoHi,
TH_USER_INFO shows me terminal ID, IP address and other information. howerver it does't show me log-on user name of OS.
Kind regards,
Hisao -
How to list all users present in Default Autheticator in WebLogic Security Realm
Hi All,
I need to get a list of all the users in my Weblogic server--> security realm--> Default Authenticator
There are more than 1000 users present in my security realm for different different Authentication Providers. So I can not get these details from WebLogic Admin Console.
Can anyone please help me in getting this list of all users in Default Authenticator? Please let me know how can I get these details.
My WebLogic version is 10.3.4.0
Thanks in Advance!You can use JMX to list users
http://weblogic-wonders.com/weblogic/2010/11/10/list-users-and-groups-in-weblogic-using-jmx/ -
How to list all user's "followed" count?
Dear all,
I need to genearate a report to list all user's Followed items count.
I found follow REST API:
http://msdn.microsoft.com/en-us/library/dn194080.aspx#bk_FollowedCount
By using "My/followedcount", I can get current user's count of items he or she followed. It is exactly what I need. But I need to list all users' "following count". How can I do it?
Thank you for any input.
MarkHi Mark Lui,
Please check the code sample in below article, whether it is working in your scenario, it is using the client object model to get the specified user’s followed content, to get all users’ following content, please first iterate users information, then use
this to get followed count:
How to get Count and List of documents and sites followed by a User in Office 365 SharePoint 2013 Site using CSOM:
http://sundarnarasiman.net/?p=186
Thanks,
Qiao Wei
TechNet Community Support -
How to list all available tables for user "karl"
How can I list all available tables (=table names) for user "karl"?
Nice to have would be if (after each table name in another column of each row) the number of data rows in this table can be listed similar to:
TABLE NUM ROWS
TESTA 12
TESTB 3455
ANOTHERTAB 234
How can I do this?from Laurent Schneider
http://laurentschneider.com/wordpress/2007/04/how-do-i-store-the-counts-of-all-tables.html
SQL> select
2 table_name,
3 to_number(
4 extractvalue(
5 xmltype(
6 dbms_xmlgen.getxml('select count(*) c from '||table_name))
7 ,'/ROWSET/ROW/C')) count
8 from user_tables;
TABLE_NAME COUNT
DEPT 4
EMP 14
BONUS 0
SALGRADE 5 -
How to list all calendars that are shared to a specific user?
Hi,
Using Exchange Management Shell/Powershell, I want to list all calendars that are shared to a specific user 'myuser'.
I have tried different approaches; list all calendars for all users and then figure out which ones are shared to 'myuser', list all mailboxfolders for 'myuser' with path 'calendar' and sort out the shared ones, ... No luck so far.
Anybody?
babuHi
If you try this command:
Get-MailboxPermission MyUser
Maybe you are looking for
-
I bought my Macbook pro in 2010 and had Snow Leopard which I upgraded when Mountain Lion was available. Now it keeps saying Mavarick is available. Is that another update? Or is that something else?
-
ABAP - INTERFACE_REGISTRATION_ERROR for outboud sync ABAP proxy
Hi, I have created ABAP sync client proxy in R/3 and trying to test using abap report. I am facing following error in XI sxmb_moni. I have created client proxy for outbound sync interface, however the error is pointing inbound sync interface (ie QAC
-
Help requested with major crashes and start-up probs with a G5 & OS 10.4.7
Not sure if this post should be on Tiger OS or hardware ... I have had my G5 for 14 months. It runs with a 20" Apple CRT monitor It has just developed quite serious problems. These have two elements - Three days ago, while writing a mail message, ver
-
Challan Mapping (TesmSe file not generated)
Dear Expert's We are running PC00_M40_CMAP for challan mapping. Challan mapped succesfully and save it also. But not generated TemSe file. After executing PC00_M40_F24Q challan detail is not coming. Please suggest me. Thanks & Regards Neelesh Sonkar
-
Adobe lightroom activation and downloading problem?
adobe didnt send me an email after i filled out an eligilibty form for confirming that im a student and nothing happened from there?