LDAP user can only log in once #2176

Closed
opened 2025-11-02 04:26:15 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @liszca on GitHub (Aug 12, 2018).

  • Gitea version (or commit ref): 1.5.0
  • Git version: 2.11.0
  • Operating system: Debian 9
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

Login in via LDAP only works once using PostgreSQL Database.
It can be fixed temporarily until next login by deleting the user!

2018/08/12 12:13:15 [I] Log Mode: File(Info)
2018/08/12 12:13:15 [I] XORM Log Mode: File(Info)
2018/08/12 12:13:15 [I] Cache Service Enabled
2018/08/12 12:13:15 [I] Session Service Enabled
2018/08/12 12:13:17 [I] Git Version: 2.11.0
2018/08/12 12:13:18 [I] SQLite3 Supported
2018/08/12 12:13:18 [I] Run Mode: Production
2018/08/12 12:13:19 [I] Listen: http://0.0.0.0:3000
2018/08/12 12:13:19 [I] LFS server enabled
2018/08/12 12:14:20 [W] Failed to login 'John' via 'LDAP': user already exists [name: John Doe]
2018/08/12 12:14:20 [I] Failed authentication attempt for John from 192.168.0.25
[database]
DB_TYPE  = postgres
HOST     = 127.0.0.1:5432
NAME     = gitea
USER     = gitea
PASSWD   = *************
SSL_MODE = disable
PATH     = data/gitea.db

Screenshots

Originally created by @liszca on GitHub (Aug 12, 2018). - Gitea version (or commit ref): 1.5.0 - Git version: 2.11.0 - Operating system: Debian 9 - Database (use `[x]`): - [X] PostgreSQL - [ ] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [X] Yes (provide example URL) - [ ] No - [ ] Not relevant - Log gist: ## Description Login in via LDAP only works once using PostgreSQL Database. It can be fixed temporarily until next login by deleting the user! ``` 2018/08/12 12:13:15 [I] Log Mode: File(Info) 2018/08/12 12:13:15 [I] XORM Log Mode: File(Info) 2018/08/12 12:13:15 [I] Cache Service Enabled 2018/08/12 12:13:15 [I] Session Service Enabled 2018/08/12 12:13:17 [I] Git Version: 2.11.0 2018/08/12 12:13:18 [I] SQLite3 Supported 2018/08/12 12:13:18 [I] Run Mode: Production 2018/08/12 12:13:19 [I] Listen: http://0.0.0.0:3000 2018/08/12 12:13:19 [I] LFS server enabled 2018/08/12 12:14:20 [W] Failed to login 'John' via 'LDAP': user already exists [name: John Doe] 2018/08/12 12:14:20 [I] Failed authentication attempt for John from 192.168.0.25 ``` ``` [database] DB_TYPE = postgres HOST = 127.0.0.1:5432 NAME = gitea USER = gitea PASSWD = ************* SSL_MODE = disable PATH = data/gitea.db ``` ## Screenshots <!-- **If this issue involves the Web Interface, please include a screenshot** -->
GiteaMirror added the type/question label 2025-11-02 04:26:15 -06:00
Author
Owner

@liszca commented on GitHub (Aug 12, 2018):

Solved, was my fault, I accidently had two uid on this user.

@liszca commented on GitHub (Aug 12, 2018): Solved, was my fault, I accidently had two ``uid`` on this user.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#2176