Introduction
In an IriusRisk On-Premise deployment, ensuring the security of user accounts is a top priority. One important aspect of account security is handling failed login attempts. When a user experiences four consecutive failed login attempts, their account becomes locked. To resolve this issue and unlock the account, you can access the database via the command-line interface (CLI). In this support article, we will guide you through the steps to reset failed login attempts for IriusRisk On-Premise deployments.
Resetting Failed Login Attempts via the Database
-
Connect to the Database:
- To access the database, open your command-line interface. You can connect to the database in different ways, but for the purpose of this article, we will use the following method:
sudo su postgres
psql
\c iriusprod
- Alternatively, you can use the following command with specific connection parameters:
psql -U username -d database_name -h host -p port
- To access the database, open your command-line interface. You can connect to the database in different ways, but for the purpose of this article, we will use the following method:
-
Querying User Data:
- After successfully connecting to the database, you can retrieve essential information about user accounts, including their usernames, account lock status, and the number of failed sign-in attempts. Use the following SQL query:
SELECT username, account_locked, auth_failed_count FROM users;
- After successfully connecting to the database, you can retrieve essential information about user accounts, including their usernames, account lock status, and the number of failed sign-in attempts. Use the following SQL query:
-
Filtering Locked Accounts with Failed Attempts:
- If you are interested in retrieving and displaying information only for users whose accounts are locked ('t') and who have encountered authentication failures (count greater than 0), you can use this query:
SELECT username, account_locked, auth_failed_count FROM users WHERE account_locked = 't' AND auth_failed_count > 0;
- If you are interested in retrieving and displaying information only for users whose accounts are locked ('t') and who have encountered authentication failures (count greater than 0), you can use this query:
-
Resetting Failed Login Attempts:
-
To unlock user accounts and reset the failed login attempts, use the following SQL query:
UPDATE users SET account_locked = 'f', auth_failed_count = 0;
-
If you want to update these values for a specific user, you should include a WHERE clause to target that user. For example, let's assume you want to update the account for a user with the username 'admin':
UPDATE users SET account_locked = 'f', auth_failed_count = 0 WHERE username = 'admin';
-
Conclusion
By following the steps outlined in this support article, you can effectively reset failed login attempts via the database, ensuring that locked accounts are unlocked, and authentication failure counts are reset to zero.
Comments
0 comments
Please sign in to leave a comment.