[GH-ISSUE #11500] issue: login by ldap and create user with CN #54917

Closed
opened 2026-05-05 16:52:29 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @shihao138096 on GitHub (Mar 10, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/11500

Check Existing Issues

  • I have searched the existing issues and discussions.
  • I am using the latest version of Open WebUI.

Installation Method

Pip Install

Open WebUI Version

v0.5.20

Ollama Version (if applicable)

0.5.8-rc10

Operating System

CentOS 7.9

Browser (if applicable)

No response

Confirmation

  • I have read and followed all instructions in README.md.
  • I am using the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.
  • I have listed steps to reproduce the bug in detail.

Expected Behavior

expect the username to be create is the user input

Actual Behavior

site-packages/open_webui/routers/auths.py
line 267: name=cn,

this line should be 'name=username', because in some case, cn is the nickname.

Steps to Reproduce

  1. set Microsoft AD with cn is nickename, isn't username.
  2. config ldap in open webui
  3. use ldap login

Logs & Screenshots

Additional Information

No response

Originally created by @shihao138096 on GitHub (Mar 10, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/11500 ### Check Existing Issues - [x] I have searched the existing issues and discussions. - [x] I am using the latest version of Open WebUI. ### Installation Method Pip Install ### Open WebUI Version v0.5.20 ### Ollama Version (if applicable) 0.5.8-rc10 ### Operating System CentOS 7.9 ### Browser (if applicable) _No response_ ### Confirmation - [x] I have read and followed all instructions in `README.md`. - [x] I am using the latest version of **both** Open WebUI and Ollama. - [x] I have included the browser console logs. - [x] I have included the Docker container logs. - [x] I have listed steps to reproduce the bug in detail. ### Expected Behavior expect the username to be create is the user input ### Actual Behavior site-packages/open_webui/routers/auths.py line 267: name=cn, this line should be 'name=username', because in some case, cn is the nickname. ### Steps to Reproduce 1. set Microsoft AD with cn is nickename, isn't username. 2. config ldap in open webui 3. use ldap login ### Logs & Screenshots ### Additional Information _No response_
GiteaMirror added the bug label 2026-05-05 16:52:29 -05:00
Author
Owner

@shihao138096 commented on GitHub (Mar 10, 2025):

Image

<!-- gh-comment-id:2710271540 --> @shihao138096 commented on GitHub (Mar 10, 2025): ![Image](https://github.com/user-attachments/assets/946ad210-1cf1-47fd-b4d0-292877237985)
Author
Owner

@TheMasterFX commented on GitHub (Mar 10, 2025):

Does this correlate with my problem in the discussion? https://github.com/open-webui/open-webui/discussions/7298

<!-- gh-comment-id:2711545069 --> @TheMasterFX commented on GitHub (Mar 10, 2025): Does this correlate with my problem in the discussion? https://github.com/open-webui/open-webui/discussions/7298
Author
Owner

@shihao138096 commented on GitHub (Mar 11, 2025):

Image

First, you need to determine what attributes your AD domain has.
And then, config open webui ldap.
eg.
My LDAP(Microsoft AD) configuration is as attached. You can refer to it. Pay attention. Since the sAMAccountName attribute is the real username, I have replaced the "uid" with it.

<!-- gh-comment-id:2712244219 --> @shihao138096 commented on GitHub (Mar 11, 2025): ![Image](https://github.com/user-attachments/assets/d663ba38-0eee-404a-a7db-4a9df153f416) First, you need to determine what attributes your AD domain has. And then, config open webui ldap. eg. My LDAP(Microsoft AD) configuration is as attached. You can refer to it. Pay attention. Since the sAMAccountName attribute is the real username, I have replaced the "uid" with it.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#54917