Re: select connect in a PL/SQL routine

From: Fleury Marcel <marcel.fleury_at_bluewin.ch>
Date: 6 Jun 2002 05:04:40 -0700
Message-ID: <f18358b2.0206060404.420ddab7_at_posting.google.com>


Hello Jim,
My goal is not to unencrypt an Oracle password. But only to scan the all_users TABLE and trying to detect if some accounts use the same name for the username and the password (as dbsnmp)
For security reason I would like to not allow that the password is the same that the username.

So the following SQL command run well but only if I start it from SQL*PLUS :
SQL> select 'connect '||username||'/'||username from all_users;

My question was if it is possible to do the same within an PL/SQL code ?

But between the time I got an information that it is not possible.

Regards.

"Jim Kennedy" <kennedy-family_at_attbi.com> wrote in message news:<91pL8.116008$ux5.175252_at_rwcrnsc51.ops.asp.att.net>...
> You cannot. Why? The password is encrypted and so you cannot compare the
> username and password. Oracle, for security reasons, does not provide a
> mechanism to unencrypt the password. I haven't done this, but in the
> documentation you can write a routine that prevents people from creating a
> password that is the same as their username.
> Jim
> "Fleury Marcel" <marcel.fleury_at_bluewin.ch> wrote in message
> news:f18358b2.0206050458.1cab8c2c_at_posting.google.com...
> > Hello,
> > From sqplus I use the following command to display all accounts that
> > use the same string for the username and password :
> >
> > SQL> select 'connect '||username||'/'||username from all_users;
> >
> > 'CONNECT'||USERNAME||'/'||USERNAME
> > ---------------------------------------------------------------------
> > connect SYS/SYS
> >
> > But I would like to use this command into a PL/SQL routine.
> > How can I do it ?
> >
> > Tnak you
Received on Thu Jun 06 2002 - 14:04:40 CEST

Original text of this message