I am having problems with this hack. It seems like I have done everything properly but still no luck.
I configured authvb.php file and put it in my vbulletin directory. Then I made my sample php page and included the line <?php require('./authvb.php'); ?> first just like it specified and changed the path to match where the file is located.
I go to the test page and it pops up the little name/password box just like it should and I enter my name and password but it doesn't seem to recognize my password.
Sorry guys I ermmm aint been reading much lately .
Anyhow glad to see some of you have found a use for this, The main reason this was done was because we wanted to give access to other sites on our network to our members but protect them using the vbulletin password system.
I then had the idea to use the script for my admin section to give access to specific functions in the admin panel to selected admins etc. This is cos I am a paranoid git who takes security very serious.
For example Admin A can alter styles whilst Admin B can not etc.
Or
For example Admin A can alter the vbull options whilst Admin B can not.
This is easily done by changing the scripts name to authadmin.php and then adding the line <?php require('./authadmin.php'); ?> to the top of the /admin/styles.php script and then setting the user ID for the person(s) who were to have access.
The script can be used to password protect any php script using the vbull username database.
Anyhow I think I will submit this as a finished hack ?
Originally posted by syion
I am still not sure Do if I have to customize anything in this area for the groups ? It is my understanding that these were for a different board and you need to customize them for your own board. Can anyone give a little more detail ?
If you for example make a new usergroup called "Old Farts" then all you do to give them access is go to the control panel and find out thier User Group ID and then just add that to the group to the access list.
# 1 Unregistered / Not Logged In
# 2 Registered
# 3 Users Awaiting Email Confirmation
# 4 (COPPA) Users Awaiting Moderation
# 5 JNR Admin
# 6 Administrator
# 7 Moderators
# 8 Banned
# 9 oldfarts [New User Group You Added]
$sql = "SELECT * FROM user WHERE
username = '$PHP_AUTH_USER' AND
password = '$chkpw' AND
(usergroupid = '5' or usergroupid = '6' or usergroupid = '7' or usergroupid = '9') ";
Which would give access to Admin/Jnr Admin/Mods/oldfarts usergroups.
Warning: Access denied for user: 'root@localhost' (Using password: NO) in /home/zanarka/public_html/snakeeyes/authvb.php on line 41
Warning: MySQL Connection Failed: Access denied for user: 'root@localhost' (Using password: NO) in /home/zanarka/public_html/snakeeyes/authvb.php on line 41
Unable to connect to server.
Ooops forgot to mention the most obvious have you filled in the part at the top with your details.
$checkservername = "localhost"; // hostname or ip of server
$dbcheckusername = "username here"; // user name
$dbcheckpassword = "password here"; // user password
$dbcheckbase = "database name here"; // name of database
$encryptedpw = true; // encrypted (md5) passwords on/off (true/false)
Remember for security always place it in the admin folder and alter the path in the php scripts you want to password.