Jump to content

Recommended Posts

Posted (edited)

Hi Guys

 

I have currently configured apache 2.2 php 5.2.4 mysql 5.0.45 and mrbs 1.4.1 on a windows 2003 server and I am having problems authenticating users using ldap.

 

I got the mrbs home page to work fine once I installed SAMP but everytime I fiddle around with the config.inc.php and auth_ldap to get users to authenticate using ldap I get the same error http 500 internal server error in internet explorer.

 

I have attached my config files and error, hopefully someone Can help me and maybe point me in the right directoin as I am well and truly in a right pickle.

 

Thanx in advance

 

Justin

 

/***********************************************

* Authentication settings - read AUTHENTICATION

***********************************************/

 

$auth["session"] = "php"; // How to get and keep the user ID. One of

// "http" "php" "cookie" "ip" "host" "nt" "omni"

// "remote_user"

 

$auth["type"] = "ldap"; // How to validate the user/password. One of "none"

// "config" "db" "db_ext" "pop3" "imap" "ldap" "nis"

// "nw" "ext".

// NOTE: if you are using the "db" authentication scheme, then make sure you keep the admin user

// "administrator" below. The system initially relies on there being an admin called "administrator".

// Once you have set up the user list and created one or more other admins (by adding them both to the

// user list and the config file), then you can delete or rename the "administrator" user.

 

// Configuration parameters for 'cookie' session scheme

 

// The encryption secret key for the session tokens. You are strongly

// advised to change this if you use this session scheme

$auth["session_cookie"]["secret"] = "icttech";

// The expiry time of a session, in seconds

$auth["session_cookie"]["session_expire_time"] = (60*60*24*30); // 30 days

// Whether to include the user's IP address in their session cookie.

// Increases security, but could cause problems with proxies/dynamic IP

// machines

$auth["session_cookie"]["include_ip"] = TRUE;

 

 

// Cookie path override. If this value is set it will be used by the

// 'php' and 'cookie' session schemes to override the default behaviour

// of automatically determining the cookie path to use

$cookie_path_override = '';

 

// The list of administrators (can modify other peoples settings)

$auth["admin"][] = "127.0.0.1"; // localhost IP address. Useful with IP sessions.

$auth["admin"][] = "administrator"; // A user name from the user list. Useful

// with most other session schemes.

$auth["admin"][] = "Mark Hilton";

$auth["admin"][] = "Mike James";

$auth["admin"][] = "Justin Graham";

$auth["admin"][] = "Ben Jones";

 

// 'auth_config' user database

// Format: $auth["user"]["name"] = "administrator";

$auth["user"]["administrator"] = "*******";

$auth["user"]["bob"] = "b";

$auth["user"]["alice"] = "a";

 

// 'session_http' configuration settings

$auth["realm"] = "Room booking software";

 

// 'session_remote_user' configuration settings

//$auth['remote_user']['logout_link'] = '/logout/link.html';

 

// 'auth_ext' configuration settings

$auth["prog"] = "";

$auth["params"] = "";

 

// 'auth_db_ext' configuration settings

// The 'db_system' variable is equivalent to the core MRBS $dbsys variable,

// and allows you to use any of MRBS's database abstraction layers for

// db_ext authentication.

$auth['db_ext']['db_system'] = 'mysql';

$auth['db_ext']['db_host'] = 'localhost';

$auth['db_ext']['db_username'] = 'authuser';

$auth['db_ext']['db_password'] = 'authpass';

$auth['db_ext']['db_name'] = 'authdb';

$auth['db_ext']['db_table'] = 'users';

$auth['db_ext']['column_name_username'] = 'name';

$auth['db_ext']['column_name_password'] = 'password';

// Either 'md5', 'sha1', 'crypt' or 'plaintext'

$auth['db_ext']['password_format'] = 'md5';

 

// 'auth_ldap' configuration settings

// Where is the LDAP server

$ldap_host = "lh-whs-email.walkden.local";

// If you have a non-standard LDAP port, you can define it here

$ldap_port = 389;

// If you do not want to use LDAP v3, change the following to false

$ldap_v3 = true;

// If you want to use TLS, change the following to true

$ldap_tls = false;

// LDAP base distinguish name

// See AUTHENTICATION for details of how check against multiple base dn's

$ldap_base_dn = "ou=staff,ou=users,ou=walkden,dc=walkden,dc=local";

$account_suffix = "@walkden.local";

// Attribute within the base dn that contains the username

$ldap_user_attrib = "sAMAccountName";

 

// If you need to search the directory to find the user's DN to bind

// with, set the following to the attribute that holds the user's

// "username". In Microsoft AD directories this is "sAMAccountName"

$ldap_dn_search_attrib = "sAMAccountName";

// If you need to bind as a particular user to do the search described

// above, specify the DN and password in the variables below

$ldap_dn_search_dn = "cn=search,ou=ldap,ou=users,ou=walkden,dc=walkden,dc=local";

$ldap_dn_search_password = "*****";

 

// 'auth_ldap' extra configuration for ldap configuration of who can use

// the system

// If it's set, the $ldap_filter will be combined with the value of

// $ldap_user_attrib like this:

//(&($ldap_user_attrib=username)($ldap_filter))

// After binding to check the password, this check is used to see that

// they are a valid user of mrbs.

//$ldap_filter = "mrbsuser=y";

config-files.rar

Edited by walkden-high
Adding more information
  • 3 weeks later...
Posted (edited)
How did you fix this as I am having the same problem.

 

 

it will be a mistake in his php settings

 

in particular, you shoukd look at

$auth["type"] = "ldap"; // How to validate the user/password. One of "none"
// "config" "db" "db_ext" "pop3" "imap" "ldap" "nis"
// "nw" "ext".
// NOTE: if you are using the "db" authentication scheme, then make sure you keep the admin user
// "administrator" below. The system initially relies on there being an admin called "administrator".
// Once you have set up the user list and created one or more other admins (by adding them both to the
// user list and the config file), then you can delete or rename the "administrator" user.

and this..

 // 'auth_ldap' configuration settings
// Where is the LDAP server
$ldap_host = "lh-whs-email.walkden.local";
// If you have a non-standard LDAP port, you can define it here
$ldap_port = 389;
// If you do not want to use LDAP v3, change the following to false
$ldap_v3 = true;
// If you want to use TLS, change the following to true
$ldap_tls = false;
// LDAP base distinguish name
// See AUTHENTICATION for details of how check against multiple base dn's
$ldap_base_dn = "ou=staff,ou=users,ou=walkden,dc=walkden,dc=local" ;
$account_suffix = "@walkden.local"; 
// Attribute within the base dn that contains the username
$ldap_user_attrib = "sAMAccountName";

Edited by mossj
Posted (edited)
How did you fix this as I am having the same problem.

 

 

It was my php set up that was stoppping mine from working I hadn't enabled the ldap extension in the php installation, I was kicking myself when it dawned on me that's what it was lol..

 

Just go in to add and remove programs and modify the php set up and make sure you add the extension for ldap.

 

This link may help if that doesn't do the trick for you.

 

Anonymous LDAP operations in Windows 2003 AD

 

You can download the support tools kit here

 

http://www.microsoft.com/downloads/details.aspx?FamilyId=6EC50B78-8BE1-4E81-B3BE-4E7AC4F0912D&displaylang=en

 

 

Justin

Edited by walkden-high
added support tools link

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...