Redmine integrates ldap users_PHP tutorial
redmine integrates ldap users
First, configure LDAP, otherwise it will exhaust you to deathLook for the LDAP installation process in the blog directory ()
To write corresponding slapd.conf configuration file
We need three data files
The first one is the base template directory file
vim base.ldif
---------------------------------------------
dn: dc =bb,dc=com
objectclass: dcObject
objectclass: organization
o: Cywx, Inc.
dc: bb
dn: cn=Ma,dc= bb,dc=com
objectclass: organizationalRole
cn: Ma
dn: ou=People,cn=Ma,dc=bb,dc=com
ou: People
objectclass: top
objectclass: organizationalUnit
dn: ou=Group,cn=Ma,dc=bb,dc=com
ou: Group
objectclass: top
objectclass: organizationalUnit
-------------------------------- -----------------------
The second one is the group file
vim group.ldif
--- ----------------------------
dn: cn=t1,ou=Group,cn=Ma,dc=bb,dc =com
objectClass: posixGroup
objectClass: top
cn: t1
userPassword: {crypt}x
gidNumber: 501
dn: cn=t2, ou=Group,cn=Ma,dc=bb,dc=com
objectClass: posixGroup
objectClass: top
cn: t2
userPassword: {crypt}x
gidNumber: 502
dn: cn=ldapuser1,ou=Group,cn=Ma,dc=bb,dc=com
objectClass: posixGroup
objectClass: top
cn: ldapuser1
userPassword : {crypt}x
gidNumber: 503
dn: cn=ldapuser2,ou=Group,cn=Ma,dc=bb,dc=com
objectClass: posixGroup
objectClass: top
cn: ldapuser2
userPassword: {crypt}x
gidNumber: 504
----------------------- -------------------------------------
The third group is the user file
vim passwd.ldif
---------------------------------- --------------------------------
dn: uid=t1,ou=People,cn=Ma,dc=bb, dc=com
uid: t1
cn: t1
#objectClass: account
objectClass: posixAccount
objectClass: top
objectClass: shadowAccount
objectClass: person
objectClass : OpenLDAPperson
surname: t1
givenName: z
mail: test1@wifi.tt
userPassword: {crypt}!!
shadowLastChange: 16772
shadowMin: 0
shadowMax : 99999
shadowWarning: 7
loginShell: /bin/bash
uidNumber: 500
gidNumber: 501
homeDirectory: /home/t1
dn: uid =t2,ou=People,cn=Ma,dc=bb,dc=com
uid: t2
cn: t2
#objectClass: account
objectClass: posixAccount
objectClass: top
objectClass: shadowAccount
objectClass: person
objectClass: OpenLDAPperson
surname: t2
givenName: z
mail: test1@wifi.t
userPassword: {crypt}!!
shadowLastChange: 16772
shadowMin: 0
shadowMax: 99999
shadowWarning: 7
loginShell: /bin/bash
uidNumber: 501
gidNumber: 502
homeDirectory: / home/t2
dn: uid=ldapuser1,ou=People,cn=Ma,dc=bb,dc=com
uid: ldapuser1
cn: ldapuser1
#objectClass : account
objectClass: posixAccount
objectClass: top
objectClass: shadowAccount
objectClass: person
objectClass: OpenLDAPperson
surname: ldapuser1
givenName: z
mail: test1 @wifi.tt
userPassword: {crypt}$6$a3DH5nze$WkfyBtwXFOgw3IDAeOHai1ltfailU72qRdNGOtqx/gm5uM7OWEbGBwTIqP.qIUwx8vGSLmjW0.daLBzmplElH.
shadowLastChange: 16772
shadow Min: 0
shadowMax: 99999
shadowWarning: 7
loginShell: /bin/bash
uidNumber: 502
gidNumber: 503
homeDirectory: /home/ldapuser1
dn: uid=ldapuser2,ou=People,cn=Ma ,dc=bb,dc=com
uid: ldapuser2
cn: ldapuser2
#objectClass: account
objectClass: posixAccount
objectClass: top
objectClass: shadowAccount
objectClass: person
objectClass: OpenLDAPperson
surname: ldapuser2
givenName: z
mail: test1@wifi.tt
userPassword: {crypt}$6$An0Hoxly$uKVAkEdt0KOgVXJYddUqtxAZfkKIZJIFZG9yoFG5mLRYHNvo./szTXFLf. JJAYWZTjYJKiXAtO6cARH.UQeZb1
shadowLastChange: 16773
shadowMin: 0
shadowMax: 99999
shadowWarning: 7
loginShell: /bin/bash
uidNumber: 503
gidNumber: 504
homeDirectory: / home/ldapuser2
-------------------------------- -------------------------------------------------- --------------------
Then start loading data
ldapadd -x -D "cn=Ma,dc=bb,dc=com" -W -f /etc/openldap/base.ldif
ldapadd -x -D "cn=Ma,dc=bb,dc=com" -W -f /etc/openldap/group.ldif
ldapadd -x - D "cn=Ma,dc=bb,dc=com" -W -f /etc/openldap/passwd.ldif
It will be ok after loading is complete
The effect seen through the client is Like this

This time it is configured in the redmine background, see the picture


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

In recent days, Ice Universe has been steadily revealing details about the Galaxy S25 Ultra, which is widely believed to be Samsung's next flagship smartphone. Among other things, the leaker claimed that Samsung only plans to bring one camera upgrade

OnLeaks has now partnered with Android Headlines to provide a first look at the Galaxy S25 Ultra, a few days after a failed attempt to generate upwards of $4,000 from his X (formerly Twitter) followers. For context, the render images embedded below h

Alongside announcing two new smartphones, TCL has also announced a new Android tablet called the NXTPAPER 14, and its massive screen size is one of its selling points. The NXTPAPER 14 features version 3.0 of TCL's signature brand of matte LCD panels

In recent days, Ice Universe has been steadily revealing details about the Galaxy S25 Ultra, which is widely believed to be Samsung's next flagship smartphone. Among other things, the leaker claimed that Samsung only plans to bring one camera upgrade

The Vivo Y300 Pro just got fully revealed, and it's one of the slimmest mid-range Android phones with a large battery. To be exact, the smartphone is only 7.69 mm thick but features a 6,500 mAh battery. This is the same capacity as the recently launc

Motorola has released countless devices this year, although only two of them are foldables. For context, while most of the world has received the pair as the Razr 50 and Razr 50 Ultra, Motorola offers them in North America as the Razr 2024 and Razr 2

Samsung has not offered any hints yet about when it will update its Fan Edition (FE) smartphone series. As it stands, the Galaxy S23 FE remains the company's most recent edition, having been presented at the start of October 2023. However, plenty of

The Redmi Note 14 Pro Plus is now official as a direct successor to last year'sRedmi Note 13 Pro Plus(curr. $375 on Amazon). As expected, the Redmi Note 14 Pro Plus heads up the Redmi Note 14 series alongside theRedmi Note 14and Redmi Note 14 Pro. Li
