I tried this. But it dose not work for me.
And “glassfish/appserv-core/src/java/com/sun/enterprise/admin/server/core/jmx/auth/ASLoginDriverImpl.java” does not execute when I logon to the console. I even changed the isAuthorized(line92) to false, but I still could logon.
private void authorize(String user, String password, String realmName) {
System.out.println("----------------ASLoginDriverImpl------------------------");
boolean isAuthorized = false;
try {
boolean isValid = Realm.isValidRealm(realmName);
if (!isValid) {
realmName = Realm.getDefaultRealm();
}
Realm realm = Realm.getInstance(realmName);
Enumeration groups = realm.getGroupNames(user);
while (groups != null && groups.hasMoreElements()) {
String groupName = (String)groups.nextElement();
if (ASADMIN_GROUP.equals(groupName)) {
//change isAuthorized to false
isAuthorized = true;
break;
}
}
} catch (Exception ee) {
_logger.log(Level.WARNING, "core.auth_failed", realmName);
_logger.log(Level.INFO, "core.auth_fail_exception", ee);
SecurityException se = new SecurityException(
_strings.getString("admin.auth.failed"));
se.initCause(ee);
throw se;
}
if (!isAuthorized) {
throw new SecurityException(
_strings.getString("admin.auth.failed.nogroup"));
}
return;
}
Dose anyone know how to change the default group (asadmin) to other ones?
[Message sent by forum member 'wwwmonster' (wwwmonster)]
http://forums.java.net/jive/thread.jspa?messageID=325850