md5 hash changes when server is restarted

These are old archives. They are kept for historic purposes only.
Post Reply
csc2ya
Posts: 5
Joined: Fri Nov 17, 2006 6:04 pm

md5 hash changes when server is restarted

Post by csc2ya »

I'm running unreal 3.2.7 on Windows Server 2003. When setting up my configuration files, I put my link blocks and my oper blocks in seperate files to make it quicker to edit them if I need to add new opers or links, and then added include lines in the unrealircd.conf file.

For the oper passwords I used the /mkpasswd md5 password command to get an encrypted hash and put that in the opers.conf file.

This worked perfectly with no problems up until I restarted my server earlier today, when I could no longer oper when connecting to my server. I stopped my server, changed the password to an unhashed value for my oper account, started the server again, used the /mkpasswd command again, and then put what was returned into the opers.conf file in place of the plaintext password before rehashing the configuration files again, after which I could oper again using my original password with no problems again.

The following is my opers.conf file:
oper Vista {
class clients;
from {
userhost *;
};
password "*";
flags
{
netadmin;
can_die;
can_restart;
can_zline;
can_gkline;
can_gzline;
get_umodew;
get_host;
can_override;
can_addline;
};
snomask +cFfkejvGnNqsSo;
};
oper Ace {
class clients;
from {
userhost *;
};
password "*vSdtOpN1*k6Vqaw==";
flags
{
netadmin;
can_zline;
can_gzline;
can_gkline;
can_die;
can_restart;
global;
can_rehash;
helpop;
can_globops;
can_wallops;
};
snomask +cFfkejvGnNqsSo;
};
Note: I have left the password for my account unhashed for now, and so have starred it out. The password for my bot's account is hashed, but I have starred certain parts of that out to ensure the security of my server.

Is it normal for the password hash to change on restarting the server, and if not, has anyone got any idea what could be causing the issue?

Edit: I have just tried hashing exactly the same password on both servers on our network, and a different value was returned by each server despite the password being the same each time. However, I would guess that this cannot be normal behaviour since it would cause major problems if a server with hundreds or even thousands of operators went down for a restart and all their passwords were encrypted.
[dx]
Posts: 107
Joined: Sat Jun 16, 2007 1:03 am

Re: md5 hash changes when server is restarted

Post by [dx] »

Find:

password "*vSdtOpN1*k6Vqaw==";

Replace with:

password "*vSdtOpN1*k6Vqaw==" { md5; };

Dunno is that some windows issue, but on unix I've used same confs at different shells, servers, os systems etc.
Casper
Posts: 338
Joined: Sun Jul 08, 2007 7:44 am
Location: The Netherlands

Re: md5 hash changes when server is restarted

Post by Casper »

(15:26:29) -irc.*.nl- *** Authentication phrase (method=md5, para=test) is: $Fi+NDPgI$Gf4ozm6kRu/+aQXyXs7m0Q==
-
(15:26:29) -irc.*.nl- *** Authentication phrase (method=md5, para=test) is: $s3uHs7pF$ZLnQvcKIqyV/6bkqK0e7BQ==

(Both generated on the same day, without any rehash/restart between obviously)

It is completely normal. That's why it is so hard to break this md5 hash! :)
Ex Network-Administrator
csc2ya
Posts: 5
Joined: Fri Nov 17, 2006 6:04 pm

Re: md5 hash changes when server is restarted

Post by csc2ya »

Thanks for the help. I've added { md5; }; after the password hash and it still accepts my password after issuing a 'restart password', so it looks that was the problem.
Post Reply