Armathentication Guide

For all the help you need with Armagetron!
Post Reply
User avatar
delinquent
Match Winner
Posts: 760
Joined: Sat Jul 07, 2012 3:07 am

Armathentication Guide

Post by delinquent »

Credits to fman23 and Lover$boy
Maybe I'll post this on the wiki, I think it's a little more comprehensive than most. It's mainly here to gauge the response first.


Armathentication guide

YOU WILL NEED:
Access to FTP or a file manager
Access to your mysql database
A degree of patience, this will almost definitely not work first time.


Step one
For this project, we're going to use the simpler php version of the auth that was edited by fman23, which can be found at his launchpad directory. Go ahead and copy "Config" and "index", and put them somewhere safe.


Step two
We're going to have to edit that config file, just to make it play nice with a mysql installation. Open it up and find the line that talks about the login information table. Edit the file so that it looks more like the following:

Code: Select all

//Table containing login information
'table' => 'phpbb_users',

//Username column
'user_col' => 'username',

//Hash column, contains the md5 of the password after appending the prefixes and suffixes
'pass_prefix' => '',
'pass_suffix' => '',
'hash_col' => 'user_password',

//Role column, optionally contains the index of the user role (blank if disabled), it is designed to fit in with forums
'role_col' => 'group_id',
I would refrain from copy/pasting, syntax and formatting does not always copy with the selected text.

Whilst you're knee deep in confusion, go ahead and change "Host", "User", "Pass" and "Database" to the values that match your website.

Step three
Whilst we still have the config open, we're going to amend all the columns to match our database. For example: Your "user" column may be represented by "user", "php_user", "phpbb"user", you get the picture. Make sure everything matches up.

Save that shit, close that shit.

Step four
Here comes the scary bit. We're going to edit the files in your phpbb installation to enable your forum users passwords to be stored in md5. Go to the root of your ftp folder (public_html), and find the following path:

Code: Select all

/includes/functions.php
open up that php file and find the function "phpbb_hash"

Edit it so that it looks like so:

Code: Select all

function phpbb_hash($password)
{
  return md5($password);
}
Save and close.

Step five
Go back to the root of public_html and create the following folder paths:

Code: Select all

armaauth/0.1/
Now, upload the config and index files from earlier into the 0.1 folder, and exit.

Step six
Now, logout of the forum, login again, and request a password change. Change it to whatever, you can change it back to whatever was your previous password if you want to. For this to work, however, you must change the password at least once, for all users.

Open up your arma client, and see if you can login. For extra merit, cross your fingers. For even more good luck, cut off a rabbit's foot and hang it precariously over your PC.
User avatar
LOVER$BOY
Match Winner
Posts: 731
Joined: Thu Jan 24, 2008 12:46 pm

Re: Armathentication Guide

Post by LOVER$BOY »

Awesome work del!! ;)

3 hearty cheers for you!! :D
Image
User avatar
sinewav
Graphic Artist
Posts: 6413
Joined: Wed Jan 23, 2008 3:37 am
Contact:

Re: Armathentication Guide

Post by sinewav »

This should be a sticky somewhere. And on the wiki.
User avatar
delinquent
Match Winner
Posts: 760
Joined: Sat Jul 07, 2012 3:07 am

Re: Armathentication Guide

Post by delinquent »

User avatar
LOVER$BOY
Match Winner
Posts: 731
Joined: Thu Jan 24, 2008 12:46 pm

Re: Armathentication Guide

Post by LOVER$BOY »

Cool but del, mind stating what forums software you are referring to cause some users use SMF and might get confused about this.
Image
User avatar
Light
Reverse Outside Corner Grinder
Posts: 1667
Joined: Thu Oct 20, 2011 2:11 pm

Re: Armathentication Guide

Post by Light »

LOVER$BOY wrote:Cool but del, mind stating what forums software you are referring to cause some users use SMF and might get confused about this.
Should that be necessary with all the phpbb prefixes? :P But, it would be good to state in the requirements, that you need to have phpBB if you're going to use that.

Also, SMF wouldn't work with this unless you changed the encryption for password storage.
User avatar
delinquent
Match Winner
Posts: 760
Joined: Sat Jul 07, 2012 3:07 am

Re: Armathentication Guide

Post by delinquent »

Amended. I forgot that there were other options.

Adding a hints section too.
User avatar
kyle
Reverse Outside Corner Grinder
Posts: 1876
Joined: Thu Jun 08, 2006 3:33 pm
Location: Indiana, USA, Earth, Milky Way Galaxy, Universe, Multiverse
Contact:

Re: Armathentication Guide

Post by kyle »

Light wrote: But, it would be good to state in the requirements, that you need to have phpBB3 if you're going to use that.
Correction, phpbb2 (ct's forums) is different.
Image
User avatar
Light
Reverse Outside Corner Grinder
Posts: 1667
Joined: Thu Oct 20, 2011 2:11 pm

Re: Armathentication Guide

Post by Light »

kyle wrote:Correction, phpbb2 (ct's forums) is different.
It's still stored as MD5 ain't it? Just change the table / column names? I don't see why it wouldn't work then, though I haven't actually looked through the code. I just don't see much else being different.
User avatar
delinquent
Match Winner
Posts: 760
Joined: Sat Jul 07, 2012 3:07 am

Re: Armathentication Guide

Post by delinquent »

I think formatting and the php build is different, so I'll amend it again.
Post Reply