Home > Back-end >  How to unlock a tomcat user in Lockout Realm using program
How to unlock a tomcat user in Lockout Realm using program

Time:06-01

How shall I unblock a specific user using a program? Should I need to create any configuration files for doing this? Please guide me with the steps. I didn't find any proper documentation for unblocking a user on our own. Thanks in Advance

CodePudding user response:

I'm not sure if there's a way to do it programmatically, but I do know for certain that you can browse to the LockOutRealm with JMX and put in a user account and unlock it. At minimum if nothing else works, you could programmatically invoke the JMX bean and unlock the account.

If you can find a way to lookup the org.apache.catalina.realm.LockOutRealm via JNDI, you may be able to find https://tomcat.apache.org/tomcat-8.0-doc/api/org/apache/catalina/realm/LockOutRealm.html#unlock(java.lang.String) method.

  • Related