Mythruna

General Category => Tech Support => Topic started by: G1ZMO on December 16, 2012, 05:09:43 AM



Title: Server password reset?
Post by: G1ZMO on December 16, 2012, 05:09:43 AM
Hiya,

How do I reset the password for a user on my own server?

Is it possible to change a users name too?

Thanks

Paul


Title: Re: Server password reset?
Post by: Michael on December 16, 2012, 11:35:19 AM
When you create a new account for a server, it asks for your email. It says something like "email is for account modification" or something about that account.

Paul will be able to help you :)


Title: Re: Server password reset?
Post by: G1ZMO on December 16, 2012, 12:44:44 PM
I want to reset the password for someone on my own server though


Title: Re: Server password reset?
Post by: pspeed on December 16, 2012, 01:07:01 PM
I want to reset the password for someone on my own server though

This is one aspect of the current stuff that is a bit more limited than it should be.  Ideally, there should be an admin command for this but there isn't. :(

This information is stored/read from human-readable files, though.  So it is possible to do it with a little care and technical skill.

In the mythruna.db directory there is a users directory.  Under here there is a .json file for every user and a main userDd.settings.json that has the index for user name to user ID, etc..

A player has two different names.  One is their user ID and the other is their "character name".  The character name is what we see when they are logged in and the user ID is what the player uses to login.  User IDs must be unique but a character name need not be... and eventually players will be able to have more than one character per world/server under the same user ID.

Anyway, if it's the character name you are interested in changing then that can all be done without messing with the index... or without resetting the server.  Changes to user ID require changes to the index and the server needs to be shut down when you do it.  I try to avoid editing the index file, personally, so I don't let users change their ID.

Editing the user json file is straight forward as long as you don't mess up the JSON format.  All of the values can be edited as you'd expect.

The userInfo block is what controls the user data... this is where the password is.  It's an MD5 hash and so not directly editable but you can cut and paste the MD5 hash from a different user.  That's normally how I've handled this situation in the past.  Many players who forget their password create another account anyway, so I just copy the password from that account to their regular one.

Regarding some kind of server-side password reset command, I will say for those following along that this would be a pretty simple command to script for anyone writing mods and with basic familiarity with generating an MD5 hash.  This is really something that I should get around to including in the real server console commands, though... along with the ability to remove/delete a user.  There are over 15,000 user accounts created on my main server and probably 80% never got past the initial login and can be deleted.

Now that I have active server users, this stuff has bubbled up a little bit in my priorities but I don't know when I will get to it.  I have to do a small overhaul of account management when I hook up the mythruna.com logins.  This will probably include some commands to hook up an existing server account to a mythruna.com registered user account.  I may go ahead and add some other password reset, etc. commands while I'm in there.


Title: Re: Server password reset?
Post by: G1ZMO on December 16, 2012, 01:45:54 PM
Thanks Paul, all sorted now. :)



Title: Re: Server password reset?
Post by: Michael on December 16, 2012, 02:13:32 PM
G1ZMO, is your name Paul too? ::)


Title: Re: Server password reset?
Post by: G1ZMO on December 16, 2012, 02:22:13 PM
Yep


Title: Re: Server password reset?
Post by: Michael on December 16, 2012, 02:48:21 PM
o_o, too many Pauls..


Title: Re: Server password reset?
Post by: pspeed on December 16, 2012, 04:14:22 PM
o_o, too many Pauls..

o_O

Not possible.


Title: Re: Server password reset?
Post by: Iggyjeckel on December 16, 2012, 04:29:26 PM
The world needs more iggy's


Title: Re: Server password reset?
Post by: Blackslash on December 16, 2012, 05:45:59 PM
The world needs more iggy's


ur name is iggy


Title: Re: Server password reset?
Post by: Michael on December 16, 2012, 08:13:05 PM
The world needs more iggy's

oo.. that reminds me: we used to have a computer game called Sega Smash Pack 2. and there was a game called i think flicky and an enemy on it was called an iggy.


Title: Re: Server password reset?
Post by: Moonkey on December 17, 2012, 12:26:04 AM
Not enough Monkeys. õωõ