How to unlock your admin account in 4.0 and up

    This applies to: 4.0.x and above

     

    High-Level Summary: How to regain access to your admin account if it loses its System Admin role or the password is changed.

     

    Be an enabler

     

    There are a few situations that can render your admin account unusable: It's disabled, the password is changed, or the System Admin role is removed. Ideally, you'd log into a second System Admin account to fix this through the Admin Console. In the case that admin was your only System Admin, here are the steps to fix it:

     

    • admin is disabled: You'll have to change the userEnabled flag in jiveUser from 0 to 1 for the user. An example query:
    UPDATE jiveUser SET userEnabled = 1 WHERE userID = 1;
    

     

    • admin's password is changed: You'll have to reset the passwordHash and the creationDate in jiveUser. Be sure that your jiveUser is not federated with LDAP by performing the first query below. The second example query is an example of this (this will change your password to admin):
    UPDATE jiveUser SET federated = 0 WHERE userID = 1;
    UPDATE jiveUser SET passwordHash = '5ca18bf6852bacbb8fe557a3673f778d1f83b51f3cdbced4b6f9668d85f04ad9', creationDate = 1238458204921 WHERE userID = 1;
    

     

    • admin's System Admin role is removed. Due to the new entitlements system in 4.0.x, this will take a few queries to fix:
    INSERT INTO jiveEntitlement VALUES ((SELECT (MAX(entitlementid)+1) as entid FROM jiveEntitlement), -2, -6, 1, -1, 501, 0, 1264448278648, 1264448278648); INSERT INTO jiveEntitlement VALUES ((SELECT (MAX(entitlementid)+1) as entid FROM jiveEntitlement), -2, -6, 1, -1, -1, 15, 1264448278699, 1264448278699); INSERT INTO jiveEntitlement VALUES ((SELECT (MAX(entitlementid)+1) as entid FROM jiveEntitlement), -2, -6, 1, -1, 22, 15, 1264448278699, 1264448278699); INSERT INTO jiveEntitlement VALUES ((SELECT (MAX(entitlementid)+1) as entid FROM jiveEntitlement), -2, -6, 1, -1, 4, 15, 1264448278699, 1264448278699); INSERT INTO jiveEntitlement VALUES ((SELECT (MAX(entitlementid)+1) as entid FROM jiveEntitlement), -2, -6, 1, -1, 600, 15, 1264448278699, 1264448278699); INSERT INTO jiveEntitlement VALUES ((SELECT (MAX(entitlementid)+1) as entid FROM jiveEntitlement), -2, -6, 1, -1, 370, 15, 1264448278699, 1264448278699); INSERT INTO jiveEntitlement VALUES ((SELECT (MAX(entitlementid)+1) as entid FROM jiveEntitlement), -2, -6, 1, -1, -2, 15, 1264448278699, 1264448278699); INSERT INTO jiveEntitlement VALUES ((SELECT (MAX(entitlementid)+1) as entid FROM jiveEntitlement), -2, -6, 1, -1, 102, 447, 1264448278699, 1264448278699); INSERT INTO jiveEntitlement VALUES ((SELECT (MAX(entitlementid)+1) as entid FROM jiveEntitlement), -2, -6, 1, -1, 14, 15, 1264448278699, 1264448278699); INSERT INTO jiveEntitlement VALUES ((SELECT (MAX(entitlementid)+1) as entid FROM jiveEntitlement), -2, -6, 1, -1, 37, 15, 1264448278699, 1264448278699); INSERT INTO jiveEntitlement VALUES ((SELECT (MAX(entitlementid)+1) as entid FROM jiveEntitlement), -2, -6, 1, -1, 702, 15, 1264448278699, 1264448278699); INSERT INTO jiveEntitlement VALUES ((SELECT (MAX(entitlementid)+1) as entid FROM jiveEntitlement), -2, -6, 1, -1, 38, 415, 1264448278699, 1264448278699); INSERT INTO jiveEntitlement VALUES ((SELECT (MAX(entitlementid)+1) as entid FROM jiveEntitlement), -2, -6, 1, -1, 700, 287, 1264448278699, 1264448278699); INSERT INTO jiveEntitlement VALUES ((SELECT (MAX(entitlementid)+1) as entid FROM jiveEntitlement), -2, -6, 1, -1, 2020, 15, 1264448278699, 1264448278699); INSERT INTO jiveEntitlement VALUES ((SELECT (MAX(entitlementid)+1) as entid FROM jiveEntitlement), -2, -6, 1, -1, 18, 479, 1264448278699, 1264448278699); INSERT INTO jiveEntitlement VALUES ((SELECT (MAX(entitlementid)+1) as entid FROM jiveEntitlement), -2, -6, 1, -1, 1100, 447, 1264448278699, 1264448278699); INSERT INTO jiveEntitlement VALUES ((SELECT (MAX(entitlementid)+1) as entid FROM jiveEntitlement), -2, -6, 1, -1, 1, 415, 1264448278699, 1264448278699);
    
    

     

    **Please note that these changes require a full restart (all nodes at once).  A rolling restart (one node at a time) produces inconsistent results.**