Help changing the default admin username in WPMU

I have a new install of WPMU with buddypress and BBPress. The users are being shared by WPandBBpress.

I had this install done by the WPMU.org service.

I thought it would be a simple change in the database but when I change the user ID I could log into the site but got a message saying I did not have permission to access when trying to go to the wp-admin dashboard.

I checked the meta info and it says that user is administrator as well as key master.

Rather than screw around and break the site I thought I would ask for some help.

Thanks

  • Timothy Bowers

    I know this might seem like I'm being picky here and forgive me for that!

    You changed the ID?

    Do you mean the user name? Because the UID usually a number unique to the user.

    Anyway, the easiest way for you would be to create a new admin account which you can name what ever your wish. :slight_smile:

    Just out of interest though, is there a reason to change the name? Because in your profile area you can change the display name to anything you please.

  • Timothy Bowers

    Yeah you can go into the database and change it, I think its the user meta table but would need to check to be sure. Just create another super admin to be sure and that way you won't get locked out by mistake.

    If you are concerned about brute force attacks then there are a couple of things which you should consider:

    1. Strong password, long with mixed characters. (perhaps 16 characters minimum)
    2. Make your firewall rules strict. Prevent f5 attacks (usually a sign of brute force I believe)

    Ultimately though I would be more concerned by the code and themes you add to your website, the chances are a cracker would attempt through known weaknesses first.

    Consider running something like suPHP and ensure all file and folder permissions and ownership it correct and stricts. Don't allow the upload of certain files, flash for one, jquery, etc.

    Last year was big on people sitting in coffee shops and near other wifi areas using a simple browser plugin to access accounts on Facebook and such. Never use connections which you are unsure about and never use WEP, use something much more secure! In fact if you are worried about security then don't use wifi at all, turn it off if you have it enabled.

    Anyway, a few considerations if you are really worried about security and I'm sure there are many more.

  • Rick Lewis

    changing the name under the user_meta doesn't do anything as that isn't where the username is at.

    The username is in the user table and noted as user_login. There is also user_nicename.
    Changing one or both causes the user to be blocked from the admin dashboard even though all the other stuff remains that same. That user is noted as administrator and Key Master.

    My primary concern with this is having a MU install and BBpress already integrated with it, I don't want to break that or lose my user in BBpress as well.

    Having had that happen once before simply by doing the WP Integration in BBpress I can be a true headache.

    If someone knows of a solution to changing the default admin username please let me know.
    Thanks.

  • Timothy Bowers

    I had a couple of seconds free so I opened up phpMyAdmin and had a quick look.

    In the "_users" table I changed the "user_login" column for the admin username from "admin" to "tim" and it appears to have worked perfectly for me. :slight_smile: Also changing the "user_nicename" appears to change the profile link and @ address for BuddyPress.

    For BuddyPress I found an instance in "_bp_xprofile_data" table, changing this appeared to just change the name echoed on your BuddyPress profile page.

    There could be other instances in the DB but changing those three had the desired affect for me, I haven't tested it in depth but I logged in and out successfully.

  • Timothy Bowers

    I noticed the Network Admin link is missing, so further exploration turned up that in the table "_sitemeta" There is a row "site_admins" with data under the column "meta-data", it will look like this:

    a:1:{i:0;s:5:"admin";}

    You might have changed the admin part to your own username but still had issues, that is because the 5 is the number of charecters. So for me, mine now looks like this:

    a:1:{i:0;s:3:"tim";}

    This gave me the network admin area back. :slight_smile:

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.