ldap config for 0229 nccu demo

This commit is contained in:
Matt Fu 2012-02-29 12:35:54 +08:00
parent 3209f9aa27
commit b84b7bad63
2 changed files with 6 additions and 4 deletions

View File

@ -9,8 +9,10 @@ class SessionsController < Devise::SessionsController
login_uid = params[:user][:nccu_ldap_uid]
result = false
ldap = Net::LDAP.new
ldap.port = '8001'
ldap.host = '127.0.0.1'
# ldap.port = '8001'
# ldap.host = '127.0.0.1'
ldap.port = '389'
ldap.host = '140.119.166.23'
ldap_filter = "(uid=#{login_uid})"
ldap_base = 'ou=People,dc=nccu,dc=edu,dc=tw'
ldap.authenticate("cn=uccn,ou=profile,dc=nccu,dc=edu,dc=tw","nccu2ucc")

View File

@ -4,8 +4,8 @@ require 'mysql2'
mid_host = {
:host => '127.0.0.1', #mruling.nccu.edu.tw
:port => 8005,
:host => 'mruling.nccu.edu.tw', #mruling.nccu.edu.tw or 127.0.0.1
:port => 3006, #3306 or 8005
:username => "root",
:password => "a3G6yWd9",
:database => "RSS23_NCCU_MIDDLE",