ORA-24230: input to DBMS_DDL.WRAP is not a legal PL/SQL unit
Cause : The input supplied to DBMS_DDL.WRAP or DBMS_DDL.CREATE_WRAPPED did not specify a legal PL/SQL package specification, package body, type specification, type body, function or procedure. This error can occur if you used incorrect syntax in the CREATE OR REPLACE statement or specified a unit that cannot be wrapped (e.g., a trigger or anonymous block).
Action - How to fix it : DBA Scripts :: www.high-oracle.com/scripts
Provide a legal PL/SQL unit as input.
Well, the reason for above error is that i have taken the above script from a 11g database and running it on 10g database. 11g has bring some changes in password management. Below code is executed on 11g and user created successfully, which is expected result.