WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Cannot delete default admin user in multisite (30 posts)

  1. rhdesign
    Member
    Posted 1 year ago #

    Im going to start off by saying that I did a ton of searching on this and according to everything I have read, deleting the default admin user should be possible and should be done to enhance security; however it is not allowing me to delete it. I have a multisite install with 8 different sites running WP 3.5 and I ran into a multitude of issues while attempting to delete the default admin user:

    1. With the original "admin" super admin, I created 4 new users and assigned them all "super admin" privileges. For some reason, even though I assigned them super admin privileges, I still had to go through each of my 8 sites and add all four users and set them as admins for them to see the sites in their "my sites" drop-down (which this seems like a bug or a much needed enhancement; all "super admins" should have access to the entire network as an admin by default).

    2. I also went into each site and removed the default "admin" user leaving only my 4 new admin users. It is here I found another issue in that it never asked me if i wanted to transfer posts when i removed the admin user from each individual site. The user is no longer in the table (in the visual table, not referring to database table) however the posts still show as being written by admin.

    3. I also noticed that when i was looking at all users for a specific site, the categorization links at the top listed "Administrator (4) | Super Administrator (1)" event though when looking at the network admin panel for all users, my four new users are all set as "super admins". Once I deleted the default admin user from the individual sites, the categorization links just show "Administrator (4)" now

    I also set the network admin email to one of the new super admins I had created, as well as went into each site and through the settings I set the main email to the same new super admin user.

    After doing all of this, I am still not able to remove the admin user from the Network users. Am I missing something in this process or did I just happen to find 3 different multisite wordpress bugs in doing this?

  2. Are you trying to remove an admin from a site or the SUPER admin (aka network admin) from the network?

    You have to have at least one super admin to do anything.

  3. rhdesign
    Member
    Posted 1 year ago #

    I am trying to remove the username "admin" from the network; I was able to remove the user from the individual sites but not from the network...as I said in my original posting, I have already assigned 4 other network super admins.

  4. You said a lot of things, much of which was confusing :)

    Go to /wp-admin/network/users.php

    Edit the admin.

    UNCHECK the box for super-admin.

    Now you should be able to delete them from there.

  5. rhdesign
    Member
    Posted 1 year ago #

    Sorry, i tried to make it as clear as possible while still getting all the information across, I know it was a lot to take in :)

    I have already unchecked the "super admin" box for the admin user in the network

  6. Okay, uncheck and save. The box remains unchecked so go back to /wp-admin/network/users.php and dlete them.

    What happens then?

  7. rhdesign
    Member
    Posted 1 year ago #

    Yes I saved afterwards and no, it does not change anything; I still cannot delete that user.

  8. You mean the box remains checked after you uncheck and save?

  9. rhdesign
    Member
    Posted 1 year ago #

    no, the box is unchecked and the account no longer shows up as a super admin account, but I cannot delete it

  10. Are you trying to delete them from /wp-admin/network/users.php ?

  11. rhdesign
    Member
    Posted 1 year ago #

    yes

  12. And what error does it throw when you delete? Or is the link just not there?

  13. rhdesign
    Member
    Posted 1 year ago #

    there is no error. The "Delete" link does show but when i click it, it looks like the user table just refreshes but nothing has changed..."admin" user is still there and no error message or anything appears. It really seems like a bug.

  14. Go to /wp-admin/network/settings.php

    What's the email there? Is it the admin you can't delete?

  15. rhdesign
    Member
    Posted 1 year ago #

    I addressed that in my initial post; No, it is not the email of the admin i can't delete, I went in and changed it because i knew that is one thing that needs to be done before you delete a user.

  16. Well... the only thing left is SQL.

    Go into wp_sitemeta and look for site_admins

    In there you will see something like this: a:1:{i:0;s:7:"Ipstenu";} (though I bet yours is more like a:3:{i:0;s:5:"liono";i:1;s:8:"thundera";i:2;s:11:"swordofomens";} instead)

    You should make yours a:1:{i:0;s:8:"rhdesign";} to ONLY allow your ID to be super admin.

    However if you wanted to add WileyKit instead it would be a:1:{i:0;s:8:"WileyKit";}

  17. rhdesign
    Member
    Posted 1 year ago #

    can i set multiple super admins for the entire multisite that way? I work in a web department so my other programers will need admin access to the whole network.

    Also, what will happen with the posts written by the user "admin" if i remove it with SQL considering it never asked me to transfer posts when i deleted that user from each individual site?

  18. Yes, you can set multiples, though I generally set one (me) and then try to add more the normal way.

    Also, what will happen with the posts written by the user "admin" if i remove it with SQL considering it never asked me to transfer posts when i deleted that user from each individual site?

    Nothing. You're not deleteing the user at this point, you're removing the trigger that makes 'em super admin.

  19. rhdesign
    Member
    Posted 1 year ago #

    But i have already removed that user as super admin...my issue is removing the user, not the super admin privileges of the user

  20. I know, but I don't think that it actually worked, so I am suggesting you go edit that table.

    Is the user you're trying to delete listed there?

    ETA: If he has other posts on other sites, then that's probably why you can't delete him.

  21. rhdesign
    Member
    Posted 1 year ago #

    I have 8 sites total...the "admin" user has been removed from all 8 sites (it no longer is listed in the users table in the admin backend for each individual site); however, if you look at posts that were written by admin, they still say they were written by "admin" even though the user is not listed in the users table anymore.

    Even though the admin user does not show in any of the individual sites users table, it is still present in the network users table and it is here that I am not able to delete it.

    I can go into the table and confirm that the user is no longer a super admin but I don't see how that would solve my problem in any way considering that user is already showing as no longer being a super admin for any of the individual sites nor for the entire network.

  22. however, if you look at posts that were written by admin, they still say they were written by "admin" even though the user is not listed in the users table anymore.

    You'll have to change those manually or via SQL. I don't know how you broke it, but you did when you deleted them from your sites.

    I'm 99% sure that's why you can't delete him.

  23. updatediva
    Member
    Posted 1 year ago #

    rhdesign,
    Thanks for posting this issue clearly and concisely, I had no problem following everything you wrote since I have a similar situation and duplicated almost everything you did with the same results.

    The answers you got are very disappointing especially after last weeks Botnet attack. Mika, rhdesign didn't break anything and WPMU needs to get a fix together on this really fast that mimics the old single site method including asking about reassigning authorship. Suggesting we go through and manually changing admin as the author of reams of posts would get me fired.

    My attempt to add a new Superadmin and delete Admin failed because Admin owned the email account the site was registered to. It's looking like two Superadmins cannot have the same email account and I'm having no luck reassigning it.

    The answer I had to settle for was to reset admin back to being a regular user with no Superadmin priviledges. The posts that admin authored won't have to be changed and the new Superadmin is the author of new posts. Not sure how it's going to work with admin still owning the contact email and Superadmin unable to use it.

    So the fix needs to include the ability for either transferring ownership of the account email to a super-superuser (a prima inter pares?) or sharing it and a batch post rename.

    Mika is there any functionality like this at present (outside of going into the tables?)

  24. Sheesh. That was a long rant to ask if this was going to be fixed :)

    Surprise! It's fixed in WordPress 3.6. :D (I am making a happy face, BTW.)

    I was, however, answering the question as it stands today. Telling someone "Upgrade to the beta version to do this..." is crap advice, IMO. I'd rather help them now, as this is the support forum :)

    (And rhdesign did a lot of things, all at once, in a non-optimal way, which made it hard for someone not sitting right there to debug, that's all. It's the nature of the forums though).

  25. stempelschneider
    Member
    Posted 1 year ago #

    As I understood (I have the same "problem" in my Multisite):

    you can't delete the user at all, which has been you network admin (ID 0 or 1) for the first time. Revoking Super Admin Grants or changing the network admins ID doesn't effect anything. The user is still listed in the network users menu.

  26. finddarkpoet
    Member
    Posted 1 year ago #

    I confirm that I have exactly same issue both rhdesign and stempelschneider have.

    I couldn't find a way to delete the network admin with ID 0 or 1.

  27. JCBauza
    Member
    Posted 11 months ago #

    I had the same issue but I was able to delete the original admin user. Not sure if it was because it wasn't named admin to begin with. You can see on the following link the steps I took, perhaps I did something differently:
    http://technology.bauzas.com/technologies/wordpress/how-to-delete-default-admin-user-in-multisite/

    I am running the latest version 3.6

  28. paddelboot
    Member
    Posted 9 months ago #

    Same problem here:

    - Re-assigned network settings email to another user than "admin".
    - Removed super-admin privileges from user "admin".
    - In wp-admin/network/users.php, I get a "delete" button for the user "admin", but clicking it, nothing happens.

    This is a bug that leads to a security issue. Bug is addressed here:

    http://core.trac.wordpress.org/ticket/16293

    Hopefully, it will be fixed in 3.7

  29. rajuz
    Member
    Posted 8 months ago #

    @JCBauza thanks works great.

    If clicking Delete won’t work, then select the checkbox and then on bulk actions select delete and proceed. It should ask you to transfer the posts to another user.

  30. spstieng
    Member
    Posted 7 months ago #

    I've followed the steps described above and I've got exactly the same problem.

    Point 9. of @JSBauza's solution works great.
    "If clicking Delete won’t work, then select the checkbox and then on bulk actions select delete and proceed."

    "It should ask you to transfer the posts to another user." - Nope, it didn't. But I got to delete the user.

    So this is still a bug. (I'm using WP v3.6)

Topic Closed

This topic has been closed to new replies.

About this Topic