March 9th, 2010, 03:45 PM
-
Using ActiveLDAP for authentication
I would appreciate some help with the following issue. I have two servers running within our network. One is serving as an active directory for the network.
The second server runs a small corporate intranet, i would like to authenticate users of the corporate intranet to authenticate with the Active Directory. I have identified ActiveLDAP as a solution to the problem i have instlalled the required gems and have setup the active ldap yaml file.
It looks like it is connecting with the active directory server but i cannot work out how to check a username and password with the server. i cant seem to get a list of username and passwords.
Here is my YAML:
Code:
production:
host: 192.168.1.1
base: DC=HQ,DC=domain,DC=co,DC=uk
bind_dn: 'HQ\username'
password: password
And my model:
Code:
class ActiveUser < ActiveLdap::Base
ldap_mapping :dn_attribute => 'displayName', :classes => 'user'
end
running the line below blinks back an empty array rather than the names i would expect:
Code:
@user = ActiveUser.all
I have also tried:
Code:
@user = ActiveUser.find(:all, 'My Name')
Im not very familiar with activedirectory and have am not really sure what the ActiveDirectory tree looks like, it is however as far as im aware a very basic setup. Very little has changed from the default.
Is anyone familiar with the ActiveLdap gem, i have already spent hours looking at the official documentation (http://ruby-activeldap.rubyforge.org/doc/)
March 16th, 2010, 08:59 AM
-
map
Chile Tours & Trips
Stretching over half of South America, Chile offers a vast amount of different landscapes; from the massive peaks of Torres del Paine in the south, to the dry deserts and beautiful coastline. Tours in Chile offer something for every type of adventure traveler .