Skip to main content
Background Image
  1. Posts/

How to enable, configure and disable Jenkins LDAP

·183 words·1 min· ·
Xianpeng Shen
Author
Xianpeng Shen
Table of Contents

Introduction
#

In organizations, using LDAP login very common way for users to log in with their credentials.

How to configure LDAP
#

Preparation: Installed LDAP Jenkins plugin

LDAP plugin

About how to configure it, you can refer to Jenkins LDAP Plugin documentation https://plugins.jenkins.io/ldap/

This is my LDAP configuration just for testing.

LDAP configure1

LDAP configure2

Can not login with LDAP?
#

Sometimes, for some reason, there is a problem with your organization’s LDAP server and you can’t log in to Jenkins using LDAP, but you need to use Jenkins now.

You can disable LDAP authentication by changing config.xml.

# Login, cd to jenkins server folder
$ cd /var/lib/jenkins/

# Highly rememend you to backup config.xml before making any change !!!
# If you don't backup config.xml, you'll lost your LDAP configration after reboot service.
$ cp config.xml config.xml.bak

# Modify config.xml from
<useSecurity>true</useSecurity>
# To
<useSecurity>false</useSecurity>

# Restart Jenkins server
sudo service jenkins restart

Then you can log into the Jenkins server again.

Once your organization’s LDAP works again, you can replace config.xml with your backup config.xml file. Then your users can continue to log in via LDAP.

Related

Jenkins Multibranch Pipeline
·405 words·2 mins
Discusses the use of Jenkins Multibranch Pipeline to manage multiple branches in a project, enabling parallel builds for pull requests and efficient code review processes.
Jenkins Linux agent configuration
·298 words·2 mins
Provides a step-by-step guide on how to configure a Jenkins Linux agent, including setting up the Java runtime, creating the node, and troubleshooting common issues.
Jenkins Windows agent configuration
·544 words·3 mins
Provides a step-by-step guide on how to configure a Jenkins Windows agent, including setting up the Java runtime, creating the node, and troubleshooting common issues.
SonarQube installation and troubleshootings
·959 words·5 mins
This article documents the steps to install SonarQube, configure LDAP, and set up PostgreSQL as the database. It also includes troubleshooting tips for common issues encountered during setup.
How to make Jenkins job fail after timeout? (Resolved)
·208 words·1 min
This article explains how to handle Jenkins job timeouts effectively by using try and catch blocks to ensure the job fails correctly when a timeout occurs.
Resolved problem that ESlint HTML report is not displayed correctly in Jenkins job
·159 words·1 min
This article explains how to resolve the issue of ESlint HTML report not displaying correctly in Jenkins jobs due to Content Security Policy restrictions, including the steps to configure Jenkins to allow the report to load properly.