View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004363SOGoBackend Generalpublic2017-12-22 15:312018-03-01 11:21
Assigned Tofrancis 
PlatformLinuxOSCentosOS Version7
Product Version2.3.23 
Target VersionFixed in Version4.0.0 
Summary0004363: Unable to login with filed another then UID
DescriptionSOGoUserSources = (
  CNFieldName = displayName;
  UIDFieldName = uid;
  bindFields = (mail);

This configuration is working correclty in SOGo 2.2.16, but when I tried it in 2.3.23, the problem appears:

After entering e-mail as login, correct password and "remember username" selected, SOGo redirects me to the same login page, but in the login field my UID appears instead e-mail, which I entered.

When I changed it to "bindFields = (mail,uid)" I'm able to log in, but SOGo remembers my UID as login, so when I logged out, the login page appears with the UID in login field. There always should be the email, uids aren't friendly for my users.

I'm using multidomain configuration.
Steps To ReproduceJust try it with this config.
Additional InformationThe SOGo is compiled from sources.

SOGoHideSystemEMail = YES;
SOGoForceExternalLoginWithEmail = YES;
TagsNo tags attached.
Attached Files? file icon sogo.conf [^] (2,114 bytes) 2018-01-12 15:14
patch file icon remember_username.patch [^] (1,095 bytes) 2018-02-18 08:00 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
User avatar (0012508)
ludovic (administrator)
2018-01-12 14:33

Show your full config.
bofhus (reporter)
2018-01-12 15:14

I uploaded it as attachement
bofhus (reporter)
2018-01-24 17:03

Well, probably the bug, which disables posibility of log in to SOGo is minor for you, but it would be nice to confirm the problem at least - is it reproduceable in your enviroment, when it will be corected (if ever?), maybe a little patch? I reported the problem over a month ago...
efuste (reporter)
2018-01-25 06:41

You choose to define UIDFieldName = uid
So your primary login method is by uid. Witch is what the "remember username" will retain.
Your config worked "by chance" with 2.2.
How is constructed you directory and especially the rdn of your users ?
With 2.3 there was a change in the multidomain handling which could choke with the existing content of your profiles.

Anyway, in your case you shoud have used UIDFieldName = mail and bindFields = (uid) if your RDNs are uid based.
But if you change it now, all your profiles will be lost or your database need to be script post-processed.

We have the exact opposite:
UIDFieldName = uid and bindFields = (uid) because all our users are using their uid anywhere.
email login still work because it is hardcoded in SOGo, but "remember username" correctly use the uid.

SOGoForceExternalLoginWithEmail = YES is only used for connexions between SOGo and your SMTP server and change nothing to the web login process.

If you have a test platform, do some tests with a clean database and your existing ldap server.
bofhus (reporter)
2018-01-25 12:46
edited on: 2018-01-25 12:51

This is an example of my user record in LDAP:

dn: cn=u00051,o=bingo,dc=mydomain,dc=local
objectClass: top
objectClass: person
objectClass: knkPerson
cn: u00051
o: bingo
uid: u00051-bingo
knkMailQuota: 8192
displayName: <edited>
givenName: <edited>
sn: <edited>
telephoneNumber: <edited>

The UID field is just a number plus an group name (based on domain).
UID is unique forever, mail could be reused.

I set the UIDFieldName = UID because it is the best ID for database, but users always login using the e-mail address.

The bindFields config means the fields, which user can use to login. And "remember username" should remember the username entered by user, not replaced by the another one.

Is it any method, how to destroy the "remember username" feature? I could remove it from the forms (probably?), but what happens if the user already selected this checkbox?

bofhus (reporter)
2018-02-18 08:04

Near two month passed. No any help from developers. So I decided to make a workaround myself (God, why I have waited so long?). I attached a simple patch.
User avatar (0012622)
francis (administrator)
2018-03-01 11:21


- Related Changesets
sogo: master d49219ce
Timestamp: 2018-03-01 11:17:03
Author: francis
Details ] Diff ]
Save original username in cookie

Fixes 0004363
mod - NEWS Diff ] File ]
mod - UI/MainUI/SOGoRootPage.m Diff ] File ]

- Issue History
Date Modified Username Field Change
2017-12-22 15:31 bofhus New Issue
2018-01-12 14:32 ludovic Severity major => minor
2018-01-12 14:33 ludovic Note Added: 0012508
2018-01-12 15:14 bofhus File Added: sogo.conf
2018-01-12 15:14 bofhus Note Added: 0012509
2018-01-24 17:03 bofhus Note Added: 0012533
2018-01-25 06:41 efuste Note Added: 0012534
2018-01-25 12:46 bofhus Note Added: 0012537
2018-01-25 12:50 bofhus Note Edited: 0012537 View Revisions
2018-01-25 12:51 bofhus Note Edited: 0012537 View Revisions
2018-02-18 08:00 bofhus File Added: remember_username.patch
2018-02-18 08:04 bofhus Note Added: 0012611
2018-03-01 11:20 francis Changeset attached => sogo master d49219ce
2018-03-01 11:20 francis Assigned To => francis
2018-03-01 11:20 francis Resolution open => fixed
2018-03-01 11:21 francis Note Added: 0012622
2018-03-01 11:21 francis Status new => resolved
2018-03-01 11:21 francis Fixed in Version => 4.0.0

Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker