Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Change User
If you want to become another user, without knowing the user's password,
ofcourse the simple solution is to alter the user's password, if you are a
DBA. But it becomes your responsibility to reset the password back to its old
value. In order to do this review the following example :
1 select username, password from dba_users
2* where username = 'TEST'
SQL> /
USERNAME PASSWORD ------------------------------ ------------------------------ TEST 7A0F2B316C212D67
SQL> alter user test identified by dbapassword;
User altered.
SQL> connect test/dbapassword
Connected.
SQL> connect stordba/flubber
Connected.
SQL> alter user test identified by values '7A0F2B316C212D67';
User altered.
SQL> connect test/test
Connected.
SQL>
=== Notice now that user TEST is connected with password TEST and not
dbapassword!
Good luck,
CM
In article <35504a5d.2677139_at_newshost.us.oracle.com>,
jkallman_at_us.oracle.com (Joel R. Kallman) wrote:
>
> On Tue, 5 May 1998 12:00:14 -0400, "Murtaza Doctor"
> <mdoctor_at_firstsense.com> wrote:
>
> >
> > Is there a way for a dba to change a login to another user
> > - if he/she does not have the user password?
> > (without logging off ofcourse).
> >
> > Sybase has the "setuser" command to do this.
> >
> > Thankyou.
> >
> >
> >
> >
>
> Do this using the ALTER USER statement. If you are the DBA, you can
> change anyone's password without knowing what their old password was.
>
> ----
> SQL> create user foo identified by foo;
>
> User created.
>
> SQL> grant connect, resource to foo;
>
> Grant succeeded.
>
> SQL> connect foo/foo;
> Connected.
> SQL> connect system/manager;
> Connected.
> SQL> alter user foo identified by newpassword;
>
> User altered.
>
> SQL> connect foo/newpassword;
> Connected.
> SQL>
> --------
> Thanks!
>
> Joel
>
> Joel R. Kallman
> Oracle Government, Education, & Health
> Columbus, OH http://govt.us.oracle.com
> jkallman@us.oracle.com http://www.oracle.com
>
> ----
> The statements and opinions expressed here are my own
> and do not necessarily represent those of Oracle Corporation.
>
-----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/ Now offering spam-free web-based newsreading Received on Fri May 08 1998 - 16:20:46 CDT