Menu

Assign user admin rights via mysql command line (database tables)

Help
2016-08-23
2016-08-24
  • 916 Networks

    916 Networks - 2016-08-23

    Hello,
    I'm having a hard time getting into my admin account on an installation of OpenEMR that we have taken over from a previous consultant. She didn't leave us any admin logins.

    Is there a field for admin access? I'd like to assign an existing user admin rights, and then reset passwords from the GUI.

    Thanks!
    Scott

     
  • 916 Networks

    916 Networks - 2016-08-23

    Looking at the gacl tables. Lots of good stuff in there, but cant seem to find exactly what I'm looking for.

     
  • Wepp

    Wepp - 2016-08-24

    Hi,

    To give any users to admin rights,

    SELECT * FROM gacl_aro; - Get the id for the required user to which you have to give the admin rights

    then,

    SELECT * FROM gacl_aro_groups - Get the id for the admin value

    Update the group_id with aro_groups(id) from the gacl_aro_groups table for the aro_id(id) selected from the gacl_aro

    Once you create new admin user after login, you can revert this back to the old group_id which you have updated. Or in UI you can navigate to Administration->ACL Edit the users memberships for specific user.

    Hope this helps.

    Thanks,
    Wepp Team

     
  • 916 Networks

    916 Networks - 2016-08-24

    Awesome thanks! I'll give the gacl a try first, that seems to be my best bet. I'll post back the results.

     
  • 916 Networks

    916 Networks - 2016-08-24

    Is the group membership held in the order_value field in the gacl_aro table?

     
  • Wepp

    Wepp - 2016-08-24

    No. id from gacl_aro for the specific user and id from gacl_aro_groups for the Admin group.

    Update this on gacl_groups_aro_map , group_id from gacl_aro_groups and aro_id from gacl_aro.

    Let us know, if this helps.

    Thanks,
    Wepp Team

     
  • 916 Networks

    916 Networks - 2016-08-24

    Hey that's great, that worked perfect!!! Thanks so much.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.