Saturday, June 4, 2011

How to Add Another Oracle APEX Admin User (APEX 4.X)

To add another admin user with ability to login Internal Workspace (like APEX Admin user) you need to have a DB user with ability to insert into "APEX_040000.WWV_FLOW_FND_USER" table (like sys or system).
Login URL is : http{s}://[server-IP][:port]/apex/apex_admin
And Sql to insert is :
INSERT INTO APEX_040000.WWV_FLOW_FND_USER
  ( USER_NAME, SECURITY_GROUP_ID, WEB_PASSWORD,
    ACCOUNT_LOCKED, ACCOUNT_EXPIRY,
     FIRST_PASSWORD_USE_OCCURRED, CHANGE_PASSWORD_ON_FIRST_USE )
  VALUES ('ATK2',10,'MyPass','N', sysdate + 1000,'Y','N' );

Tip is that you do not need to give value to WEB_PASSWORD2 in raw, just give pure password to WEB_PASSWORD and one trigger change it to hash and store in WEB_PASSWORD2.
Keep attention adding a hidden user without informing managers and system admin is wrong and not moral.

To reset password (not tested by ATK yet but should work)

Update APEX_040000.WWV_FLOW_FND_USER
    Set  WEB_PASSWORD = 'myNewPassword'
where USER_NAME = 'ADMIN' and SECURITY_GROUP_ID = 10;

Note: Attention you need replace  APEX_040000 with correct APEX schema if you use other APEX versions.

No comments:

Post a Comment