gitlab standard account sometime can't login after configure ldap in gitlab.rb

gitlab standard account sometime can't login after configure ldap in gitlab.rb but always can login via ldap

gitlab.rb

  • gitlab.rb
gitlab_rails['ldap_enabled'] = true
gitlab_rails['ldap_servers'] = YAML.load <<-'EOS' # remember to close this block with 'EOS' below
  main: # 'main' is the GitLab 'provider ID' of this LDAP server
    label: 'LDAP'
    host: 'xxxxx'
    port: 389
    #uid: 'sAMAccountName'
    uid: 'uid'
    method: 'plain' # "tls" or "ssl" or "plain"
    bind_dn: 'cn=admin,dc=example,dc=com'
    password: '{SSHA}xxxxxxxxxxxxxxxxxxxxxx'
    active_directory: true
    allow_username_or_email_login: true
    block_auto_created_users: false
    base: 'dc=glh,dc=com'
    user_filter: ''
    #user_filter: 'memberOf=cn=groups,cn=it,dc=example,dc=com'
    attributes:
      username: ['uid', 'userid', 'sAMAccountName']
      email:    ['mail', 'email', 'userPrincipalName']
      name:       'cn'
      first_name: 'givenName'
      last_name:  'sn'
    ## EE only
    group_base: ''
    admin_group: ''
    sync_ssh_keys: false
EOS

gitlabstandard

Edited Jul 07, 2025 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading