Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: help,help-- How to develop a changing password program using d2k?

Re: help,help-- How to develop a changing password program using d2k?

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Fri, 26 Mar 1999 13:34:44 GMT
Message-ID: <370a8c4b.9688110@192.86.155.100>


A copy of this was sent to "Johnson" <zhang_at_aqua.ocn.ne.jp> (if that email address didn't require changing) On Fri, 26 Mar 1999 21:28:14 +0900, you wrote:

>Hello, :
> It seems so strange that I can not find a way to develop a changing
>password program using d2k. Finally, I use dynamic SQL to send "alter user"
>command to change the password, but it can only do with my own account, when
>i use this stored procedure to change other's pwd, I am always told there is
>rights problem. Please help me.
>

If the user executing the FORM has the "alter user" privelege (a very generous priv. anyone with this priv can become any user in the database) then:

   forms_ddl( 'alter user ' || username || ' identifed by ' || new_password );

will work. On the other hand, if another user creates a procedure "change_pw( uname, pword )", and that other user has the alter user priv., they can grant execute on that stored procedure to whomever and then people with execute on that procedure can change passwords.

So -- if you use forms_ddl, the user needs to have alter user from either a ROLE or granted directly to them.

If you use a stored procedure, the OWNER of the procedure must have ALTER USER granted directly to them, not via a role...

>Thanks, in advance
>Johnson Chao
>zhang_at_aqua.ocn.ne.jp
>
 

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Service Industries
Reston, VA USA

--
http://govt.us.oracle.com/ -- downloadable utilities  



Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Fri Mar 26 1999 - 07:34:44 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US