From stephane.branchoux at univ-perp.fr Fri Apr 7 18:17:49 2023 From: stephane.branchoux at univ-perp.fr (Stephane Branchoux) Date: Fri, 7 Apr 2023 18:17:49 +0200 Subject: Howto change userID Message-ID: Hi, I use automx since 2020. I have to change login information from uid to email adress but i dont know how to do this. In file /var/www/autoconfig/mail/config-v1.1.xml, username is %EMAILADDRESS% but when i check with curl, servers are well returned but login information is bad : uid of my ldap server ( i want email adress ) Any idea ? Many thanks -- Stephane BRANCHOUX Direction des syst?mes d?information de l'Universit? de Perpignan. Syst?mes/R?seaux - RSSI mailto:stephane.branchoux at univ-perp.fr 04 68 66 21 24 / 07 60 73 38 42 -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2459 bytes Desc: not available URL: From automx2 at seichter.de Fri Apr 7 21:20:53 2023 From: automx2 at seichter.de (Ralph Seichter) Date: Fri, 07 Apr 2023 21:20:53 +0200 Subject: Howto change userID In-Reply-To: References: Message-ID: <87wn2nqz1m.fsf@ra.horus-it.com> * Stephane Branchoux: > I use automx since 2020. Which version are you using exactly? The latest automx2 release is version 2022.1, available since May 2022. Is there a specific part of the "LDAP support" section of the documentation [1] which seems unclear to you? [1] https://rseichter.github.io/automx2/#ldap > In file /var/www/autoconfig/mail/config-v1.1.xml, username is > %EMAILADDRESS% [...] This makes me wonder what you are you trying to do exactly, and if your webserver is properly configured to forward requests. The whole point of automx2 is to *not* use a static configuration file like the one you mentioned, but having the configuration data generated dynamically by automx2 instead. -Ralph From stephane.branchoux at univ-perp.fr Fri Apr 7 21:31:11 2023 From: stephane.branchoux at univ-perp.fr (Stephane Branchoux) Date: Fri, 7 Apr 2023 21:31:11 +0200 Subject: Howto change userID In-Reply-To: <87wn2nqz1m.fsf@ra.horus-it.com> References: <87wn2nqz1m.fsf@ra.horus-it.com> Message-ID: <66872836-F4A2-48B9-A7FB-CCC0463D332F@univ-perp.fr> The webserver forward requests because it returns uid of the ldap user. How to tell him to return email adress ? I use automx downloaded in april 2020 -- Stephane BRANCHOUX Direction des syst?mes d?information de l'Universit? de Perpignan. Syst?mes/R?seaux - RSSI mailto:stephane.branchoux at univ-perp.fr 04 68 66 21 24 / 07 60 73 38 42 > Le 7 avr. 2023 ? 21:20, Ralph Seichter a ?crit : > > * Stephane Branchoux: > >> I use automx since 2020. > > Which version are you using exactly? The latest automx2 release is > version 2022.1, available since May 2022. Is there a specific part of > the "LDAP support" section of the documentation [1] which seems unclear > to you? > > [1] https://rseichter.github.io/automx2/#ldap > >> In file /var/www/autoconfig/mail/config-v1.1.xml, username is >> %EMAILADDRESS% [...] > > This makes me wonder what you are you trying to do exactly, and if your > webserver is properly configured to forward requests. The whole point of > automx2 is to *not* use a static configuration file like the one you > mentioned, but having the configuration data generated dynamically by > automx2 instead. > > -Ralph -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4229 bytes Desc: not available URL: From automx2 at seichter.de Fri Apr 7 21:52:41 2023 From: automx2 at seichter.de (Ralph Seichter) Date: Fri, 07 Apr 2023 21:52:41 +0200 Subject: Howto change userID In-Reply-To: <66872836-F4A2-48B9-A7FB-CCC0463D332F@univ-perp.fr> References: <87wn2nqz1m.fsf@ra.horus-it.com> <66872836-F4A2-48B9-A7FB-CCC0463D332F@univ-perp.fr> Message-ID: <87v8i7eagm.fsf@ra.horus-it.com> (Please keep responses on the mailing list) * Stephane Branchoux: > The webserver forward requests because it returns uid of the ldap > user. That may or may not be the case. Without logs and details about the webserver config, I cannot tell. :-) You also did not mention your platform at all, and I am not going to spend time guessing. > How to tell him to return email adress ? Did you read the online documentation I mentioned? That's the best starting point: https://rseichter.github.io/automx2/ > I use automx downloaded in april 2020 Well, given that I first released "automx2" in 2021, and due to you not providing the exact version number I asked for, I have to assume you are using the old "automx", which has nothing to do with me, so I won't be able to help you at all. I wrote "automx2" from scratch, as a replacemnt for "automx", which was authored by somebody else. -Ralph From stephane.branchoux at univ-perp.fr Sat Apr 8 10:19:56 2023 From: stephane.branchoux at univ-perp.fr (Stephane Branchoux) Date: Sat, 8 Apr 2023 10:19:56 +0200 Subject: Howto change userID In-Reply-To: <87v8i7eagm.fsf@ra.horus-it.com> References: <87wn2nqz1m.fsf@ra.horus-it.com> <66872836-F4A2-48B9-A7FB-CCC0463D332F@univ-perp.fr> <87v8i7eagm.fsf@ra.horus-it.com> Message-ID: <0479EB81-5ADF-4DFB-BF6B-724CF03080A8@univ-perp.fr> Hi, I just install this morning the last version of automx2 on a redhat 9.1 [root at radius0 automx2]# systemctl status automx2 ? automx2.service - MUA configuration service Loaded: loaded (/etc/systemd/system/automx2.service; enabled; vendor preset: disabled) Active: active (running) since Sat 2023-04-08 09:20:34 CEST; 46min ago Docs: https://rseichter.github.io/automx2/ Main PID: 85332 (flask) Tasks: 1 (limit: 24768) Memory: 57.1M CPU: 1.468s CGroup: /system.slice/automx2.service ??85332 /home/automx2/.venv/bin/python3 /home/automx2/.venv/bin/flask run --host=127.0.0.1 --port=4243 avril 08 09:55:24 radius0.univ-perp.fr flask[85332]: LDAP match uid=d3002690,ou=people,dc=univ-perp,dc=fr avril 08 09:55:24 radius0.univ-perp.fr flask[85332]: Returning list element "Pascal Blaise" avril 08 09:55:24 radius0.univ-perp.fr flask[85332]: Returning list element "d3002690" avril 08 09:55:24 radius0.univ-perp.fr flask[85332]: LookupResult(status=0, cn='Pascal Blaise', uid='d3002690?) In sqlite database, ldap server is declared like this : sqlite> select * from ldapserver; 0|ldapmaster.univ-perp.fr|389|0|ou=People,dc=univ-perp,dc=fr|(mail={0})|uid|cn|mail| When i test , username is uid and i would like username a emailadress : curl 'http://127.0.0.1:4243/mail/config-v1.1.xml?emailaddress=blaise.pascal at etudiant.univ-perp.fr' univ-perp.fretudiant.univ-perp.frUniversit? de PerpignanUniversit?partage.univ-perp.fr993SSLd3002690plainpartage.univ-perp.fr465SSLd3002690plain Le 7 avr. 2023 ? 21:52, Ralph Seichter a ?crit : > > (Please keep responses on the mailing list) > > * Stephane Branchoux: > >> The webserver forward requests because it returns uid of the ldap >> user. > > That may or may not be the case. Without logs and details about the > webserver config, I cannot tell. :-) You also did not mention your > platform at all, and I am not going to spend time guessing. > >> How to tell him to return email adress ? > > Did you read the online documentation I mentioned? That's the best > starting point: https://rseichter.github.io/automx2/ > >> I use automx downloaded in april 2020 > > Well, given that I first released "automx2" in 2021, and due to you not > providing the exact version number I asked for, I have to assume you are > using the old "automx", which has nothing to do with me, so I won't be > able to help you at all. I wrote "automx2" from scratch, as a replacemnt > for "automx", which was authored by somebody else. > > -Ralph -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2459 bytes Desc: not available URL: From automx2 at seichter.de Sat Apr 8 18:51:20 2023 From: automx2 at seichter.de (Ralph Seichter) Date: Sat, 08 Apr 2023 18:51:20 +0200 Subject: Howto change userID In-Reply-To: <0479EB81-5ADF-4DFB-BF6B-724CF03080A8@univ-perp.fr> References: <87wn2nqz1m.fsf@ra.horus-it.com> <66872836-F4A2-48B9-A7FB-CCC0463D332F@univ-perp.fr> <87v8i7eagm.fsf@ra.horus-it.com> <0479EB81-5ADF-4DFB-BF6B-724CF03080A8@univ-perp.fr> Message-ID: <87o7ny9v1z.fsf@ra.horus-it.com> * Stephane Branchoux: > sqlite> select * from ldapserver; > 0|ldapmaster.univ-perp.fr [...] You may potentially have exposed your LDAP bind password in your previous message. In any case, could you try the following: UPDATE ldapserver SET attr_uid='mail' WHERE id=0; The LDAP attribute name defined in the attr_uid column is the one used as the login ID / username in the generated config data, so if your users are expected to login with their email addresses instead of their UID, the value 'mail' should be useful. -Ralph From stephane.branchoux at univ-perp.fr Sat Apr 8 19:17:12 2023 From: stephane.branchoux at univ-perp.fr (Stephane Branchoux) Date: Sat, 8 Apr 2023 19:17:12 +0200 Subject: Howto change userID In-Reply-To: <87o7ny9v1z.fsf@ra.horus-it.com> References: <87wn2nqz1m.fsf@ra.horus-it.com> <66872836-F4A2-48B9-A7FB-CCC0463D332F@univ-perp.fr> <87v8i7eagm.fsf@ra.horus-it.com> <0479EB81-5ADF-4DFB-BF6B-724CF03080A8@univ-perp.fr> <87o7ny9v1z.fsf@ra.horus-it.com> Message-ID: <623610F5-5887-4062-8D6F-E83B41B7A414@univ-perp.fr> No there was no ldap bind password. Cool, with this update, it is ok. Many thanks -- Stephane BRANCHOUX Direction des syst?mes d?information de l'Universit? de Perpignan. Syst?mes/R?seaux - RSSI mailto:stephane.branchoux at univ-perp.fr 04 68 66 21 24 / 07 60 73 38 42 > Le 8 avr. 2023 ? 18:51, Ralph Seichter a ?crit : > > * Stephane Branchoux: > >> sqlite> select * from ldapserver; >> 0|ldapmaster.univ-perp.fr [...] > > You may potentially have exposed your LDAP bind password in your > previous message. In any case, could you try the following: > > UPDATE ldapserver SET attr_uid='mail' WHERE id=0; > > The LDAP attribute name defined in the attr_uid column is the one used > as the login ID / username in the generated config data, so if your > users are expected to login with their email addresses instead of their > UID, the value 'mail' should be useful. > > -Ralph -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2459 bytes Desc: not available URL: From automx2 at seichter.de Sat Apr 8 20:09:11 2023 From: automx2 at seichter.de (Ralph Seichter) Date: Sat, 08 Apr 2023 20:09:11 +0200 Subject: Howto change userID In-Reply-To: <623610F5-5887-4062-8D6F-E83B41B7A414@univ-perp.fr> References: <87wn2nqz1m.fsf@ra.horus-it.com> <66872836-F4A2-48B9-A7FB-CCC0463D332F@univ-perp.fr> <87v8i7eagm.fsf@ra.horus-it.com> <0479EB81-5ADF-4DFB-BF6B-724CF03080A8@univ-perp.fr> <87o7ny9v1z.fsf@ra.horus-it.com> <623610F5-5887-4062-8D6F-E83B41B7A414@univ-perp.fr> Message-ID: <87bkjyfdq0.fsf@ra.horus-it.com> * Stephane Branchoux: > Cool, with this update, it is ok. I'm glad I could help. It may also be worth mentioning the LDAP attribute semantics in the automx2 documentation, as they were apparently not as intuitive to use as I thought. -Ralph From stephane.branchoux at univ-perp.fr Sat Apr 8 20:20:44 2023 From: stephane.branchoux at univ-perp.fr (Stephane Branchoux) Date: Sat, 8 Apr 2023 20:20:44 +0200 Subject: Howto change userID In-Reply-To: <87bkjyfdq0.fsf@ra.horus-it.com> References: <87wn2nqz1m.fsf@ra.horus-it.com> <66872836-F4A2-48B9-A7FB-CCC0463D332F@univ-perp.fr> <87v8i7eagm.fsf@ra.horus-it.com> <0479EB81-5ADF-4DFB-BF6B-724CF03080A8@univ-perp.fr> <87o7ny9v1z.fsf@ra.horus-it.com> <623610F5-5887-4062-8D6F-E83B41B7A414@univ-perp.fr> <87bkjyfdq0.fsf@ra.horus-it.com> Message-ID: Yes it would be a good idea Thanks -- Stephane BRANCHOUX Direction des syst?mes d?information de l'Universit? de Perpignan. Syst?mes/R?seaux - RSSI mailto:stephane.branchoux at univ-perp.fr 04 68 66 21 24 / 07 60 73 38 42 > Le 8 avr. 2023 ? 20:09, Ralph Seichter a ?crit : > > * Stephane Branchoux: > >> Cool, with this update, it is ok. > > I'm glad I could help. It may also be worth mentioning the LDAP > attribute semantics in the automx2 documentation, as they were > apparently not as intuitive to use as I thought. > > -Ralph -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2459 bytes Desc: not available URL: