ORA-28582: a direct connection to this agent is not allowed
Cause : A user or a tool tried to establish a direct connection to either an external procedure agent or a Heterogeneous Services agent, for example: "SVRMGR> CONNECT SCOTT/TIGER@NETWORK_ALIAS". This type of connection is not allowed.
Action - How to fix it : DBA Scripts :: www.high-oracle.com/scripts
When executing the CONNECT statement, make sure your database link or network alias is not pointing to a Heterogeneous Option agent or an external procedure agent.
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.