Looking forward to create password functions on EC2? Easy, we just need to use AWS internal functions for it. Check below an example:
# To create it:
p_verify_function_name => 'CUSTOM_PASSWORD_FUNCTION',
p_min_length => 12,
p_min_uppercase => 2,
p_min_digits => 1,
p_min_special => 1,
p_disallow_at_sign => true);
In case you want to double check the code created, here goes a quick trick: Check on DBA_SOURCE:
col text format a150
select TEXT from DBA_SOURCE
where OWNER = 'SYS' and NAME = 'CUSTOM_PASSWORD_FUNCTION' order by LINE;
Hope it helps. Cheers!
This post will be a quick one. I needed to set a Oracle password as it was about to expire but the client did not want to change the password itself.
The simplest way to get the encrypted password was:
select name, password from sys.user$ where name=‘USER’;
But after Oracle 11g/12c seems a better option for security ends to use DBMS_METADATA.get_ddl or select the spare4 column on sys.user$
select name, spare4 from sys.user$ where name=‘USER’;
set long 9999999
set longc 9999999
select dbms_metadata.get_ddl('USER','DBSNMP') from dual;
And how to set this password back to the user?
alter user [USER] identified by values '[encrypted password]';
Hope it helps!
Did you know since Oracle Database 11g we have a way to quickly identify users with default passwords?
It’s implemented in a really simple way, with a single data dictionary view: DBA_USERS_WITH_DEFPWD
You can identify these users with the query:
select * from dba_users_with_defpwd
Example of output:
You can see SCOTT listed above, because his password is TIGER, the default one. Change it with:
SQL> alter user scott identified by tiger1;
Now if you check the view:
SQL> select * from dba_users_with_defpwd;
You don’t see SCOTT on the list anymore. It’s that simple!
Hope it helps to make you database more secure.
Ok, this is a common issue, once it’s like the default behavior of oracle for DEFAULT profile, used as DEFAULT to new users. But it’s really easy to solve. 🙂
Before expiring you should be received some:
ORA-28002: the password will expire within x days
Ok then, but what if you are facing errors to reuse the same password, don’t know the password and yet, how to never let it happen again?