change password [message #153858] |
Wed, 04 January 2006 07:53 |
matrik02
Messages: 64 Registered: November 2005
|
Member |
|
|
I am still new in Oracle 9i .I have create the user account and password.Now i want to know,Does User can change the password?What the special priviledge i need to set for the user i have already create so that i want to prevent the user to change the password i have set for them... Hope some one can give an idea
Thanks
|
|
|
Re: change password [message #154283 is a reply to message #153858] |
Fri, 06 January 2006 10:25 |
DanielRey
Messages: 11 Registered: January 2006 Location: Mendoza, Argentina
|
Junior Member |
|
|
Hello matrik02.
Yeah, there is a way to prevent the user to change their own password.
First, you must create this function as SYS:
CREATE OR REPLACE FUNCTION "SYS"."VERIFY_FUNCTION_FIX_PWD"
(username VARCHAR2,
password VARCHAR2, old_password VARCHAR2) RETURN boolean IS
BEGIN
raise_application_error(-20009, 'SORRY, PASSWORD CANNOT BE CHANGED') ;
END ;
Second, you must create an profile, or assign this function to an existent one:
ALTER PROFILE "SECURE_PASS" LIMIT PASSWORD_VERIFY_FUNCTION VERIFY_FUNCTION_FIX_PWD;
Third, you must assign this profile to taht user:
ALTER USER "USER_NAME" PROFILE "SECURE_PASS";
That's all folks.
Regards
Daniel
|
|
|
|