SET termout off head off
col nl newline
spool su.tmp
SELECT 'alter user &&1 identified by &&1;' nl,
'connect &&1/&&1' nl,
'alter user &&1 identified by values '''||u.password||''';' nl
FROM sys.dba_users u
WHERE u.username = UPPER('&&1')
AND u.username <> USER
/
spool off
@su.tmp
REM DELETE the file. USE "rm" ON Unix, "del" FOR Win/Dos
! rm su.tmp
! del su.tmp
SET termout ON
SELECT 'Connected as '||USER||' on '||global_name||'.'
FROM global_name;
SET termout ON head ON