Using dbca to create a db and all the users are locked and expired

I create a template using dbca on 10gR2 with schema and data and when I use that to build a clone on another machine the users passwords are all locked and expired. I am doing this in silent mode from the command line and I am looking for a flag that produces the unlock users passwords feature which seems to be there if you manually run dbca from the GUI.

This is a unix script I use to unlock accouts. I should notice this script is used for educational pourposes, in a production database it is not a good practice to leave demo accounts unlocked and overall with login=password.
sqlplus -S /nolog <<ENDSQL
     connect / as sysdba
     SET LINESIZE 132
     SET PAGESIZE 0
     SET TERMOUT OFF
     SET NEWPAGE 0
     SET SPACE 0
     SET ECHO OFF
     SET FEEDBACK OFF
     SET HEADING OFF
     SPOOL x.sql
     SELECT 'ALTER USER '||username||' IDENTIFIED BY '||username||' ACCOUNT UNLOCK;'
     FROM   dba_users
     WHERE  account_status LIKE '%LOCK%';
     SPOOL OFF
     @x.sql
     !rm x.sql
     exit
<<ENDSQL~ Madrid.

Similar Messages

Maybe you are looking for