Link to home
Start Free TrialLog in
Avatar of taaz
taaz

asked on

update user's password

how to update or set a new password  expiry_date for a user whose password has expired  in oracle
both using oem and through sqlplus.
regards
Avatar of Sean Stuber
Sean Stuber

you can't update the expiry_date directly.


you'll have to change the user's password or change the profile of the user
Avatar of taaz

ASKER

How to change the user's password or change the profile of the user?

thanks
What about changing the password to what it already is?

select password from dba_users where username = '<user>';
alter user <user> identified by values '<pass>';

Use the encrypted password returned by the first quey in the second statement to set the password.

I cannot test this on my system because we have a password validation function that requres the passwords be different.
Avatar of taaz

ASKER

can I just use

alter user abc password expire;
the thing is there is a user profile which is assigned to users and one of the user's password is expired
how to update that?
Avatar of taaz

ASKER

Johnsone thnaks a lot but will this set up a new expiry date for a user's password?
My guess is that it should.  I cannot confirm that because we have a password validation function in place that does not allow that statement because you are changing the password to the same thing it currently is.

Try it.  There is no down side.  The worst that can happen is you change the password to what it is already set to.
ASKER CERTIFIED SOLUTION
Avatar of Sean Stuber
Sean Stuber

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks for the confirmation.  I couldn't test it without changing the profile, which would reset the expire date and nullify the test.
Avatar of taaz

ASKER

So if a useer abc is unable to login because the passwd is expired.
To enable the password we will

reset the password like

  alter user abc password expire;

  and now when the next time user try to log in he would be asked to enter the new password.  is that right? would his pssword expire after 90 days?.

  or copy the original password and then change the password to new and then change it back to the original like

  select password,account_status from dba_users
where   username = 'abc';
 copy the password and save it

alter user abc identified by 'new_passwprd';

alter user abc identified by 'original_password';

thanks
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of taaz

ASKER

I really appreciate to both of you.
You guys are excellent.
glad we could help