From time to time, Oracle is changing the password for my account. My project has one database pooling for each 60 seconds and another for each 600 seconds.
I don't believe this is the cause, but it abruptlies changes the password causing my code to try to login with wrong username or password that leads to an account lock.
The password is always the same and there's no way the program is trying to connect with a different username/password than the valid ones.
ORA-28000 is not a password change, it is an account lock either by the DBA or because the wrong password has been entered more than FAILED_LOGIN_ATTEMPTS times.
I have to wonder if there isn't one chunck of code somewhere that has a hardcoded, incorrect password that is being run. That or you just get too many people mis-typeing a password in a given time span.
If you want to track failed logins to try and identify what is causing this, check this link: http://www.dba-oracle.com/t_tracking_counting_failed_logon_signon_attempts.htm
Note that, from ORacle 10.2 on, the default for FAILED_LOGIN_ATTEMPTS in profiles is 10, not the unlimited that it used to be. for the default profile, check it with:
SELECT *
FROM DBA_PROFILES
WHERE profile = 'DEFAULT' AND resource_name = 'FAILED_LOGIN_ATTEMPTS';
Bet you get 10 back, and that this is the issue. You can update to a higher value, or backl to unlimited e.g.
ALTER PROFILE default LIMIT failed_login_attempts UNLIMITED;
(I think that is the right syntax - I'm away from my DB at the moment)
Well, it turns out that it was a configuration in the company lib that I was not aware of... sorry for all the mess....
Related
I set a new password and unblocked all Oracle database users.
Then I used the following rows in SQL developer under System user:
ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED;
ALTER PROFILE DEFAULT LIMIT PASSWORD_LOCK_TIME UNLIMITED;
ALTER PROFILE DEFAULT LIMIT PASSWORD_GRACE_TIME UNLIMITED;
ALTER PROFILE DEFAULT LIMIT FAILED_LOGIN_ATTEMPTS UNLIMITED;
Everything seemed fine but after a few weeks, I opened the USERS tab in Enterprise Manager and all users had an expired password and were locked out.
The same problem on the following databases: Oracle 11g, 12c, 18c, 19c
It is a database for testing only.
Can you advise me how to set it once and for all, please?
Please, write me a step-by-step manual on how to do it.
Thank you very much in advance.
Changing the profile does not change any existing passwords parameters. If a password has an expiry date set, then that will still be in effect until such time as the password is changed. The profile is only consulted at the time that a password is changed. So here's the sequence you observed:
profile had a password lifetime of 'n' days.
password for user SCOTT is created or changed; at that time the profile is consulted, and the users 'password expiry date' is set to sysdate + n.
you changed the profile to set password unlimited. This does NOT change any existing user attributes. SCOTT still has the password expiry date as set in step 2.
Reset SCOTT'S password. At this time the profile is consulted, and it is seen that the password lifetime is set to unlimited, so SCOTT's expiry date is set to null.
Read more here.
But I will concur with the others. Even if this is a test system, what you propose (unlocking all accounts) is an astoundingly bad idea.
we have oracle set up to lock a user after 3 failed login attempts. however, when we change a password, we have some systems that will continue to use the old password for a few seconds. This is causing these accounts to get locked.
The purpose of locking an account is to prevent people from brute forcing a password.. but if systems just try the same password over and over, that's not really the point of locking the account. is there any way to allow the same password to be tried repetitively, but lock the account after 3 different passwords are tried?
I don't believe there's any simple syntax for this.
Looking here you can probably develop a DDL trigger fired after an ALTER USER command that determines, from expiry_date on DBA_USERS, whether the password has just been changed. In that situation, it can change the profile to a less restrictive FAILED_LOGIN_ATTEMPTS. Then you'd have a batch job that picks up accounts with that profile after an hour or two, and sets it back to the standard profile.
I am facing a very unique situation here in Oracle DB.
I am facing "ORA-01017: invalid username/password; logon denied" error while logging in to my Oracle user using sqlplus.
Basic information about the system:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production.
2 database servers in cluster environment using Oracle clustering.
Please note that while using TOAD the user logs in perfectly however. The DB is accessible from toad using the connection details to login an individual db. It fails from TOAD while using the Cluster Scan-IP.
Following steps were performed before i started getting this issue.
I was getting a warning message from the Oracle for my user to change the password as it is expiring. Usually in situations like this i will reuse the same password however in this case it was not allowing me to reuse the same password. So I followed this link.
Now I am not able to login my user and I am even not able to completely change the password of my user and login.
Please advise with what went wrong.
Hi I am not sure exactly what your problem is, but these are the steps we follow to reuse a password:
get user profile
change profile to default
ALTER PROFILE "DEFAULT" LIMIT PASSWORD_REUSE_TIME UNLIMITED;
ALTER PROFILE "DEFAULT" LIMIT PASSWORD_REUSE_MAX UNLIMITED;
change password
ALTER PROFILE "DEFAULT" LIMIT PASSWORD_REUSE_TIME 120;
change profile back
Good luck!
The issue was caused because of special characters. I didn't imagine that "$" would be such a big deal in passwords. Anyway please find a work around for it here.
My company has a database for vehicle tracking system. And It has a website for user to log on and use.
After I change the sys and the main user password through "ALTER USER --- identified by' command. The website login became dysfunctional. Our DBA just quit so I have no idea how to troubleshoot.
Is there any guideline I can use?
It appears as though the application has the passwords either hardcoded or in a configuration file somewhere. If you can find where that is, then simply changing the corresponding values (ie passwords) should resolve the problem. If that doesn't work, you can try to change the password back to the what they were before using the same syntax you used to make the initial change ... "ALTER USER --- identified by ...
Can possibly be more help if you can tell what web server is hosting your site.
I have an application storing it's data in an Oracle 11g Express Edition database. When the Oracle user password is starting to expire (entering grace period), the application is throwing an exception (ORA-28002) and just stops working. I need to find a way to keep the application running during that period and inform an administrator, so the password can be changed before it expires.
However my real problem is, I need to set my database user in that grace period so I can program and test my application and see if my code works. I tried to change the expiry date in dba_users, but I do not have the required privileges to do so. I'm not even sure this is the correct approach.
What could I do to make the database server think my user account will expire soon so I can write code to handle that event?
You'll need privileges to do so at the database level. A normal user cannot even explicitly lock or expire his own account. (You can lock it by purposely using the wrong password if your profile is setup so)
The only other way I know to expire your user (without a database level command) is to fool the database by setting the clock forward.
If you don't have DBA privs, it is unlikely that you have privs to change the system clock.
I tried to change the expiry date in dba_users, but I do not have the
required privileges to do so. I'm not even sure this is the correct
approach.
No, don't make changes to DBA_USERS. You would need to alter the PASSWORD_GRACE_TIME for the DEFAULT profile using "ALTER PROFILE" command. All associated changes require ALTER PROFILE system priv to do so. So, without DBA privs, you can't do it.
Look in USER_USERS
It will give you the logged in user's own expiry date so that your application can warn the user ahead of the account expiring.
Solved:
Somehow my database admin changed the user profile from DEFAULT to EXPIREPROFILE. Then I modified the password life time and grace period of the profile:
ALTER PROFILE EXPIREPROFILE LIMIT PASSWORD_LIFE_TIME 1;
ALTER PROFILE EXPIREPROFILE LIMIT PASSWORD_GRACE_TIME 21;
I expired the account and changed the password. When I looked into dba_users the password expiry date was tomorrow. But after that the account didn't expire right away, it entered the 21 days grace period.
Now I can write code to handle this specific situation and test it. Thanks everyone for your help :)