From: marcel.fleury@bluewin.ch (Fleury Marcel)
Newsgroups: comp.databases.oracle
Subject: Re: select connect in a PL/SQL routine
Date: 6 Jun 2002 05:04:40 -0700
Organization: http://groups.google.com/
Lines: 43
Message-ID: <f18358b2.0206060404.420ddab7@posting.google.com>
References: <f18358b2.0206050458.1cab8c2c@posting.google.com> <91pL8.116008$ux5.175252@rwcrnsc51.ops.asp.att.net>
NNTP-Posting-Host: 153.45.86.64
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: posting.google.com 1023365081 5568 127.0.0.1 (6 Jun 2002 12:04:41 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: 6 Jun 2002 12:04:41 GMT


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@attbi.com> wrote in message news:<91pL8.116008$ux5.175252@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@bluewin.ch> wrote in message
> news:f18358b2.0206050458.1cab8c2c@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

