Originally created by @Pacman1988 on GitHub (Mar 5, 2025).
Check Existing Issues
I have searched the existing issues and discussions.
Installation Method
Docker
Open WebUI Version
0.5.19
Ollama Version (if applicable)
Operating System
Windows 11
Browser (if applicable)
Edge
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 checked the browser console logs.
I have checked the Docker container logs.
I have listed steps to reproduce the bug in detail.
Expected Behavior
Login and can go to Admin Panel with LDAP Administrator User, like E-Mail User:
Actual Behavior
Login and no Admin Panel there like normal user. Trying to access /admin does also not help and redirect to main page.
Steps to Reproduce
Upgrade from older version to 0.5.19.
Logs & Screenshots
See upper screenshots,
Additional Information
Maybe its related to the update notes:
v0.5.19 - 2024-03-04
LDAP Email Case Sensitivity
Resolved an issue where LDAP login failed due to email case sensitivity mismatches, improving authentication reliability.
No response
Originally created by @Pacman1988 on GitHub (Mar 5, 2025).
### Check Existing Issues
- [x] I have searched the existing issues and discussions.
### Installation Method
Docker
### Open WebUI Version
0.5.19
### Ollama Version (if applicable)
-
### Operating System
Windows 11
### Browser (if applicable)
Edge
### 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 checked the browser console logs.
- [x] I have checked the Docker container logs.
- [x] I have listed steps to reproduce the bug in detail.
### Expected Behavior
Login and can go to Admin Panel with LDAP Administrator User, like E-Mail User:

### Actual Behavior
Login and no Admin Panel there like normal user. Trying to access /admin does also not help and redirect to main page.

### Steps to Reproduce
Upgrade from older version to 0.5.19.
### Logs & Screenshots
See upper screenshots,
### Additional Information
Maybe its related to the update notes:
v0.5.19 - 2024-03-04
LDAP Email Case Sensitivity
Resolved an issue where LDAP login failed due to email case sensitivity mismatches, improving authentication reliability.
_No response_
GiteaMirror
added the bug label 2025-11-11 15:49:36 -06:00
You should manually update the database to lowercase the emails.
Here's an example code you can run:
fromsqlalchemyimportcreate_engine,Column,String,Boolean,Text,BigIntegerfromsqlalchemy.ext.declarativeimportdeclarative_basefromsqlalchemy.ormimportsessionmakerimportjsonBase=declarative_base()classUser(Base):__tablename__="user"id=Column(String,primary_key=True)name=Column(String)email=Column(String)role=Column(String)profile_image_url=Column(Text)last_active_at=Column(BigInteger)updated_at=Column(BigInteger)created_at=Column(BigInteger)api_key=Column(String,nullable=True,unique=True)settings=Column(Text,nullable=True)# Using Text to store JSONinfo=Column(Text,nullable=True)# Using Text to store JSONoauth_sub=Column(Text,unique=True)classAuth(Base):__tablename__="auth"id=Column(String,primary_key=True)email=Column(String)password=Column(Text)active=Column(Boolean)# Database connection setup (modify this with your database URL)DATABASE_URL="sqlite:///example.db"# Replace with your actual DB connection URLengine=create_engine(DATABASE_URL)Session=sessionmaker(bind=engine)session=Session()# Function to update emails to lowercasedeflowercase_emails():# Update emails in the User tableusers=session.query(User).filter(User.email.isnot(None)).all()foruserinusers:user.email=user.email.lower()# Update emails in the Auth tableauth_entries=session.query(Auth).filter(Auth.email.isnot(None)).all()forauthinauth_entries:auth.email=auth.email.lower()# Commit changessession.commit()print("Emails have been updated to lowercase.")# Run the functionlowercase_emails()# Close the sessionsession.close()
@tjbck commented on GitHub (Mar 5, 2025):
You should manually update the database to lowercase the emails.
Here's an example code you can run:
```py
from sqlalchemy import create_engine, Column, String, Boolean, Text, BigInteger
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
import json
Base = declarative_base()
class User(Base):
__tablename__ = "user"
id = Column(String, primary_key=True)
name = Column(String)
email = Column(String)
role = Column(String)
profile_image_url = Column(Text)
last_active_at = Column(BigInteger)
updated_at = Column(BigInteger)
created_at = Column(BigInteger)
api_key = Column(String, nullable=True, unique=True)
settings = Column(Text, nullable=True) # Using Text to store JSON
info = Column(Text, nullable=True) # Using Text to store JSON
oauth_sub = Column(Text, unique=True)
class Auth(Base):
__tablename__ = "auth"
id = Column(String, primary_key=True)
email = Column(String)
password = Column(Text)
active = Column(Boolean)
# Database connection setup (modify this with your database URL)
DATABASE_URL = "sqlite:///example.db" # Replace with your actual DB connection URL
engine = create_engine(DATABASE_URL)
Session = sessionmaker(bind=engine)
session = Session()
# Function to update emails to lowercase
def lowercase_emails():
# Update emails in the User table
users = session.query(User).filter(User.email.isnot(None)).all()
for user in users:
user.email = user.email.lower()
# Update emails in the Auth table
auth_entries = session.query(Auth).filter(Auth.email.isnot(None)).all()
for auth in auth_entries:
auth.email = auth.email.lower()
# Commit changes
session.commit()
print("Emails have been updated to lowercase.")
# Run the function
lowercase_emails()
# Close the session
session.close()
```
Can you tell me how to do this in my docker container? Because the docker container does not have a text editor like vi or nano and I cannot even install one to run the script.
Can't you do it with db migration in the next update? Will this not affect more users?
@Pacman1988 commented on GitHub (Mar 5, 2025):
Can you tell me how to do this in my docker container? Because the docker container does not have a text editor like vi or nano and I cannot even install one to run the script.
Can't you do it with db migration in the next update? Will this not affect more users?
Do you use sqlite? External PostgreSQL?
If external, just connect to the DB
If SQLITE, move the script inside the docker container and execute it on the sqlite file?
@Classic298 commented on GitHub (Mar 5, 2025):
Do you use sqlite? External PostgreSQL?
If external, just connect to the DB
If SQLITE, move the script inside the docker container and execute it on the sqlite file?
I hope it helps others, but Im not satisfied to fix it myself when the application broke it.
Steps to fix with SQLITE and Docker Image
Create fix.py and change connection string to DATABASE_URL (I used the default Docker Container so it is webui.db - you can find it with docker exec -it open-webui ls data and there is a *.db file)
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
import json
Base = declarative_base()
class User(Base):
__tablename__ = "user"
id = Column(String, primary_key=True)
name = Column(String)
email = Column(String)
role = Column(String)
profile_image_url = Column(Text)
last_active_at = Column(BigInteger)
updated_at = Column(BigInteger)
created_at = Column(BigInteger)
api_key = Column(String, nullable=True, unique=True)
settings = Column(Text, nullable=True) # Using Text to store JSON
info = Column(Text, nullable=True) # Using Text to store JSON
oauth_sub = Column(Text, unique=True)
class Auth(Base):
__tablename__ = "auth"
id = Column(String, primary_key=True)
email = Column(String)
password = Column(Text)
active = Column(Boolean)
# Database connection setup (modify this with your database URL)
DATABASE_URL = "sqlite:///webui.db" # Replace with your actual DB connection URL
engine = create_engine(DATABASE_URL)
Session = sessionmaker(bind=engine)
session = Session()
# Function to update emails to lowercase
def lowercase_emails():
# Update emails in the User table
users = session.query(User).filter(User.email.isnot(None)).all()
for user in users:
user.email = user.email.lower()
# Update emails in the Auth table
auth_entries = session.query(Auth).filter(Auth.email.isnot(None)).all()
for auth in auth_entries:
auth.email = auth.email.lower()
# Commit changes
session.commit()
print("Emails have been updated to lowercase.")
# Run the function
lowercase_emails()
# Close the session
session.close()
Copy the Script into the docker container
docker cp fix.py open-webui:/app/backend/data/
Go into a Shell
docker exec -it open-webui /bin/sh
Switch to directory
cd data
Run python script
python fix.py
Output should show
Emails have been updated to lowercase.
@Pacman1988 commented on GitHub (Mar 5, 2025):
I hope it helps others, but Im not satisfied to fix it myself when the application broke it.
# Steps to fix with SQLITE and Docker Image
1. Create fix.py and change connection string to DATABASE_URL (I used the default Docker Container so it is `webui.db` - you can find it with `docker exec -it open-webui ls data` and there is a *.db file)
```from sqlalchemy import create_engine, Column, String, Boolean, Text, BigInteger
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
import json
Base = declarative_base()
class User(Base):
__tablename__ = "user"
id = Column(String, primary_key=True)
name = Column(String)
email = Column(String)
role = Column(String)
profile_image_url = Column(Text)
last_active_at = Column(BigInteger)
updated_at = Column(BigInteger)
created_at = Column(BigInteger)
api_key = Column(String, nullable=True, unique=True)
settings = Column(Text, nullable=True) # Using Text to store JSON
info = Column(Text, nullable=True) # Using Text to store JSON
oauth_sub = Column(Text, unique=True)
class Auth(Base):
__tablename__ = "auth"
id = Column(String, primary_key=True)
email = Column(String)
password = Column(Text)
active = Column(Boolean)
# Database connection setup (modify this with your database URL)
DATABASE_URL = "sqlite:///webui.db" # Replace with your actual DB connection URL
engine = create_engine(DATABASE_URL)
Session = sessionmaker(bind=engine)
session = Session()
# Function to update emails to lowercase
def lowercase_emails():
# Update emails in the User table
users = session.query(User).filter(User.email.isnot(None)).all()
for user in users:
user.email = user.email.lower()
# Update emails in the Auth table
auth_entries = session.query(Auth).filter(Auth.email.isnot(None)).all()
for auth in auth_entries:
auth.email = auth.email.lower()
# Commit changes
session.commit()
print("Emails have been updated to lowercase.")
# Run the function
lowercase_emails()
# Close the session
session.close()
```
2. Copy the Script into the docker container
`docker cp fix.py open-webui:/app/backend/data/`
3. Go into a Shell
`docker exec -it open-webui /bin/sh`
4. Switch to directory
`cd data`
5. Run python script
`python fix.py`
6. Output should show
`Emails have been updated to lowercase.`
did you not see my post about this, as soon as this error started appearing i opened a discussions on it.
ldap authentication causing duplicate users since CASE sensitive issue was "fixed" #11513
with no response from management :-)
still causing duplication of accounts in my net, until all users finish re-login.
@ips972 commented on GitHub (Mar 20, 2025):
did you not see my post about this, as soon as this error started appearing i opened a discussions on it.
ldap authentication causing duplicate users since CASE sensitive issue was "fixed" #11513
with no response from management :-)
still causing duplication of accounts in my net, until all users finish re-login.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @Pacman1988 on GitHub (Mar 5, 2025).
Check Existing Issues
Installation Method
Docker
Open WebUI Version
0.5.19
Ollama Version (if applicable)
Operating System
Windows 11
Browser (if applicable)
Edge
Confirmation
README.md.Expected Behavior
Login and can go to Admin Panel with LDAP Administrator User, like E-Mail User:
Actual Behavior
Login and no Admin Panel there like normal user. Trying to access /admin does also not help and redirect to main page.
Steps to Reproduce
Upgrade from older version to 0.5.19.
Logs & Screenshots
See upper screenshots,
Additional Information
Maybe its related to the update notes:
v0.5.19 - 2024-03-04
LDAP Email Case Sensitivity
Resolved an issue where LDAP login failed due to email case sensitivity mismatches, improving authentication reliability.
No response
@tjbck commented on GitHub (Mar 5, 2025):
You should manually update the database to lowercase the emails.
Here's an example code you can run:
@Pacman1988 commented on GitHub (Mar 5, 2025):
Can you tell me how to do this in my docker container? Because the docker container does not have a text editor like vi or nano and I cannot even install one to run the script.
Can't you do it with db migration in the next update? Will this not affect more users?
@Classic298 commented on GitHub (Mar 5, 2025):
Do you use sqlite? External PostgreSQL?
If external, just connect to the DB
If SQLITE, move the script inside the docker container and execute it on the sqlite file?
@Pacman1988 commented on GitHub (Mar 5, 2025):
I hope it helps others, but Im not satisfied to fix it myself when the application broke it.
Steps to fix with SQLITE and Docker Image
webui.db- you can find it withdocker exec -it open-webui ls dataand there is a *.db file)docker cp fix.py open-webui:/app/backend/data/docker exec -it open-webui /bin/shcd datapython fix.pyEmails have been updated to lowercase.@Classic298 commented on GitHub (Mar 5, 2025):
yeah i can understand you. the application should've migrated the emails in the database
@ips972 commented on GitHub (Mar 20, 2025):
did you not see my post about this, as soon as this error started appearing i opened a discussions on it.
ldap authentication causing duplicate users since CASE sensitive issue was "fixed" #11513
with no response from management :-)
still causing duplication of accounts in my net, until all users finish re-login.