Pivotal Knowledge Base

Follow

How to change the way PCC does a username lookup by 'cn' instead of 'uid' when using LDAP.

Environment

  • PHD 2.x

Symptom

PCC returns unsuccessful When clicking 'Check username' in the PCC add new user page

Cause

PCC is hardcoded to lookup a username by 'uid' attribute with LDAP. Typically in a windows ldap environment we would not see the "uid" attribute defined in the schema. Inclusion of this attribute may not be a simple task for most organizations

Fix

To remedy this, change the ruby script to use 'cn' instead of 'uid'

  1. File to be modifed: /usr/local/pivotal-cc/app/models/ldap_client.rb
  2. Change from
    19 class << self
    20 def search uid
    21 execute do |ldap, config|
    22 mapped_result = {}
    23 filter = Net::LDAP::Filter.eq("uid", uid)
  3. Change to
    19 class << self
    20 def search uid
    21 execute do |ldap, config|
    22 mapped_result = {}
    23 filter = Net::LDAP::Filter.eq("cn", uid)
  4. Save the file and restart commander services
    => service commander restart
  5. Login to PCC again and check if the 'check username' field recognizes the username that you have entered

Comments

Powered by Zendesk