Remove Second Admin Account

Discussion in 'Installation/Configuration' started by Ignystix, Feb 18, 2024.

  1. Ignystix

    Ignystix New Member

    So I didn't follow the instructions and I added a new CP user because it was only supposed to be an admin.

    I realized that the sid admin could not access certain functions without allowing all admins to access the CP superadmin functions.

    I renamed the admin user, created a new client with the old admin name, renamed the second admin to the client name and tried to delete it but I deleted the admin group in the process and the sid admin is still there....
    lol.

    Did I break it?

    Everything still works, but I would like to fix it.

    [​IMG]
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes, but not in a way that it can't be fixed :)

    First, you must take care to add the original admin group back using, e.g., phpmyadmin. The SQL query is:

    Code:
    INSERT INTO `sys_group` (`groupid`, `name`, `description`, `client_id`) VALUES (1, 'admin', 'Administrators group', 0);
    run it with phpmyadmin in the dbispconfig database.

    Then, delete the second admin user manually with phpmyadmin; it is in the sys_user database table of the dbispconfig database.
     
    ahrasis and Ignystix like this.
  3. Ignystix

    Ignystix New Member

    Ah,
    Very good, so that didn't work, because the Administrators group never got removed as I thought. I was under the impression that the superadmin group was sys_group 0. But the sys_$ tables weren't visible from the left side. I found them in the tables on the right under the dbispconfig database and discovered my late night idiocy had caused the admin group to be renamed.

    The command caused an error that groupid 1 was already created.

    I renamed the group back and deleted the second admin user.

    You're awesome.
     

Share This Page