Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am bashou on github.
  • I am bashou (https://keybase.io/bashou) on keybase.
  • I have a public key ASCEj4l09WgPGYortJ3F0ln26OlDVJSOS8vDEE8HkIQ1pwo

To claim this, I am signing this object:

@bashou
bashou / ldap_login_existing_users_fix.rb
Created January 28, 2015 10:59
Fix LDAP login with Gitlab and existing users
#!/usr/bin/env ruby
require "mysql"
require 'net/ldap'
ldap = Net::LDAP.new :host => "<LDAP_HOST>",
:port => "<LDAP_HOST_PORT>", # your LDAP host port goes here,
:base => "<LDAP_PORT>", # the base of your AD tree goes here,
:auth => {
:method => :simple,