Title: RE: Password Generator...

We use this ...

PROCEDURE Generate ( USERID VARCHAR2 ) IS
newpass VARCHAR2(20);
dbname VARCHAR2(10);
/*
connect system
grant execute on admin_passwd to sys;
create synonym sys.admin_passwd for system.admin_passwd;
*/
BEGIN
DBMS_OUTPUT.ENABLE(100000);
newpass := dbms_random.string('U',4)||TO_CHAR(SYSDATE,'SS')||DBMS_RANDOM.STRING('U',2);
EXECUTE IMMEDIATE 'alter user '||USERID||' identified by '||newpass;
SELECT NAME INTO dbname FROM v$database;
UPDATE tcs.system_users SET password_update_date=TRUNC(SYSDATE) WHERE su_sys_user_name=USERID;
DBMS_OUTPUT.PUT_LINE('The new password for '||USERID||' is '||newpass||' in the '||dbname||' database.');
EXECUTE IMMEDIATE 'alter user '||USERID||' password expire';
EXECUTE IMMEDIATE 'alter user '||USERID||' account unlock';
EXCEPTION
WHEN NO_DATA_FOUND THEN
NULL;
WHEN OTHERS THEN
-- Consider logging the error and then re-raise
RAISE;
END generate;


this is inside a package which is propogated to all DB's ... the system_users is an application table.

Raj
______________________________________________________
Rajendra Jamadagni              MIS, ESPN Inc.
Rajendra dot Jamadagni at ESPN dot com
Any opinion expressed here is personal and doesn't reflect that of ESPN Inc.
QOTD: Any clod can have facts, but having an opinion is an art!
-----Original Message-----
From: Loughmiller, Greg [mailto:[EMAIL PROTECTED]]
Sent: Thursday, November 21, 2002 11:39 AM
To: Multiple recipients of list ORACLE-L
Subject: OT: Password Generator...


Hey folks-
I have a question that was presented to me by a web development team..
Does anyone know of products,procedures,etc that would generate a random password for a user? For example-similar to that at MetaLink when you forget your password-and they send you a new one that is just a string of characters/numeric digits...

Thanks!
Greg Loughmiller
Sr Manager - Enterprise Data Architecture
gloughmiller (IPS)
678.893.3217 (office)

********************************************************************This e-mail 
message is confidential, intended only for the named recipient(s) above and may 
contain information that is privileged, attorney work product or exempt from 
disclosure under applicable law. If you have received this message in error, or are 
not the named recipient(s), please immediately notify corporate MIS at (860) 766-2000 
and delete this e-mail message from your computer, Thank 
you.*********************************************************************2


Reply via email to