SQL> ed
Wrote file afiedt.buf
1 create or replace procedure test_user
2 (user in varchar2,
3 pass in varchar2)
4 authid current_user
5 is
6 str varchar2(100);
7 begin
8 str:='alter user '||user||' identified by '||pass;
9 execute immediate str;
10* end;
SQL> /
Procedure created.
SQL> exec test_user('mag','mag');
PL/SQL procedure successfully completed.
SQL> connect mag/mag@rdtest;
Connected.
SQL> exec test_user('mag','newpass');
PL/SQL procedure successfully completed.
SQL> connect mag/newpass@rdtest;
Connected.