I was needing to extract DDL for all users on Oracle Database . Then, I took the information about it using a DBMS_METADATA. Thus, follow how to take this information:
SQL> set heading off;
SQL> set echo off;
SQL> set pages 2000
SQL> set long 99999
SQL> set lines 2000
SQL> spool ddl_users.sql
SQL> select dbms_metadata.get_ddl(‘USER’,username) FROM dba_users;
##HERE WILL BE SHOWN ALL DLL USERS OF YOUR DATABASE##
SQL> spool off
I hope this post can help you!