There is an easy way to do it using SQL Developer (a free tool, from Oracle):
- Click on the view menu and select “DBA”. This will make the “DBA” section be visible.
- In the DBA pannel create a connection to the desired database.
- Expand the “Security” node and then expand “Users”.
- Look for the user you want to “clone” and right-click on it and select “Create Like”.
- This will open a dialog where you can set the name for the new user and modify any of the details that were copied from the original user. There’s also an SQL tab where you can see the script that will be used to create the user and grant all the necessary privileges, etc.
Alternatively, you could use the dbms_metadata package to read the necessary details of the original user and create your new user creation script, as described in this article.