-- name : su.sql -- date : 23-Jul-2001 -- Author : Pentest Limited -- Description: change to another user without knowing their password, remain connected -- as the new user and leave the original password of that user set. -- limitation : need to have access to any dba account to use this script. -- -- useage : SQL> connect sys/change_on_install -- : SQL> sho user -- : USER is "SYSTEM" -- : SQL> @su system -- : SQL> sho user -- : USER is "SYS" set head off set feed off set verify off set pages 0 set termout off spool su.lis select 'alter user '||username||' identified by values '''||password||''';' from dba_users where username=upper('&&1'); spool off alter user &&1 identified by temppswd; connect &&1/temppswd @su.lis -- uncomment the relevant line for your O/S --host rm -f su.lis --host del su.lis set head on set feed on set verify on set pages 24 set termout on