Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Safely change the default user login
I assume that the “default” admin user is always the person with id 1 in the txp_users table?
Can I simply backup the DB, rename this user from phpMyAdmin, log back in to TXP and then change all articles from the article list screen to be owned by this new name? Any repercussions in doing it that way or should I change all the articles’ owners from within phpMyAdmin while I’m there?
Is the user login name (not real name) referenced anywhere other than the textpattern table? Or used in password/nonce creation that might cause havoc? I can’t find it referenced anywhere else, but that doesn’t mean it’s not hiding somewhere.
Oh, and does it matter that the original user was created in v4.0.3 and the password is only 16 chars? I notice ‘new’ logins have 40-char (SHA?) passwords now and start with a ‘*’ to (I assume) distinguish them from the ‘old’ passwords.
Just don’t wanna lock myself out of the site or make it so I can’t edit articles when I change the username…
Thanks for any insight.
Last edited by Bloke (2008-03-10 09:40:34)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
#2 2008-03-10 09:46:44
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Safely change the default user login
I assume that the “default” admin user is always the person with id 1 in the txp_users table?
No. It just so happens that the first user inserted into the database is the person that installed it, and they need to have Publisher privileges. As long as at least one other user is a Publisher, you can delete the first one, or reduce its privileges, if you so desired.
Can I simply backup the DB, rename this user from phpMyAdmin, log back in to TXP and then change all articles from the article list screen to be owned by this new name?
Sure.
Any repercussions in doing it that way…
No.
…or should I change all the articles’ owners from within phpMyAdmin while I’m there?
That would be easier on you, since then you can just run a single SQL query.
Is the user login name (not real name) referenced anywhere other than the textpattern table? Or used in password/nonce creation that might cause havoc? I can’t find it referenced anywhere else, but that doesn’t mean it’s not hiding somewhere.
I would just make sure that user is logged out of Textpattern while you modify the database.
Oh, and does it matter that the original user was created in v4.0.3 and the password is only 16 chars? I notice ‘new’ logins have 40-char (SHA-160?) passwords now and start with a ‘*’ to (I assume) distinguish them from the ‘old’ passwords.
What’s happened is that your MySQL version has been upgraded since, and they changed their password mechanism between the two versions. Resetting the passwords that you know while you’re at it wouldn’t hurt, but Txp compensates for the old password mechanism too, so it isn’t strictly necessary.
Last edited by Mary (2008-03-10 09:47:53)
Offline
Re: Safely change the default user login
Brill. All done with no problems, thanks for the reassurance.
Mary wrote:
What’s happened is that your MySQL version has been upgraded since, and they changed their password mechanism between the two versions.
Ahhh, makes sense. I’ve updated the passwords I know about and the rest can be done at some point in future.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Pages: 1