I've just setup gitlab, but I'm completely lost with regards to admin user. The wiki seems silent about this topic, and google hasn't been of help either.
So, how do I setup admin users with gitlab on LDAP authentication?
The LDAP DN is associated with existing GitLab users when: The existing user signs in to GitLab with LDAP for the first time. The LDAP email address is the primary email address of an existing GitLab user. If the LDAP email attribute isn't found in the GitLab user database, a new user is created.
In short, a client sends a request for information stored within an LDAP database along with the user's credentials to an LDAP server. The LDAP server then authenticates the credentials submitted by the user against their core user identity, which is stored in the LDAP database.
You can also set admin permissions to a user by doing something like this in the rails console:
User.find_by_email("[email protected]") do |i| i.admin = true i.save end
This is what I did to make a LDAP (or Windows AD) user vikas as admin.
First login on GitLab portal and logout, then run the below commands.
gitlab-rails console production u = User.where(id: 1).first u.admin = true u.save! exit
After running the above commands, login again and now your will have admin privileges for vikas AD user.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With