Bug 54712 - univention_samaccountname_ldap_check not activated after setup of single school
univention_samaccountname_ldap_check not activated after setup of single school
Status: RESOLVED WORKSFORME
Product: UCS@school
Classification: Unclassified
Component: Samba 4
UCS@school 4.4
Other Linux
: P5 normal (vote)
: ---
Assigned To: Samba maintainers
:
Depends on:
Blocks: 52758
  Show dependency treegraph
 
Reported: 2022-05-05 10:43 CEST by Arvid Requate
Modified: 2022-05-05 18:18 CEST (History)
1 user (show)

See Also:
What kind of report is it?: Development Internal
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Arvid Requate univentionstaff 2022-05-05 10:43:36 CEST
While starting to dig into Bug #52758 I found that the LDB module univention_samaccountname_ldap_check is not activated after setup of single school:

```
root@primary20:~# univention-app info
UCS: 5.0-1 errata296
Installed: cups=2.2.1 samba4=4.13 squid=3.5 ucsschool=5.0 v1 4.4/ucsschool-veyon-proxy=1.1
Upgradable: 

root@primary20:~# univention-check-join-status 
Joined successfully

root@primary20:~# ldbsearch -H /var/lib/samba/private/sam.ldb -b '@MODULES' -s base
# record 1
dn: @MODULES
@LIST: samba_dsdb
distinguishedName: @MODULES

# returned 1 records
# 1 entries
# 0 referrals

root@primary20:~# dpkg -l libunivention-ldb-modules
Gewünscht=Unbekannt/Installieren/R=Entfernen/P=Vollständig Löschen/Halten
| Status=Nicht/Installiert/Config/U=Entpackt/halb konFiguriert/
         Halb installiert/Trigger erWartet/Trigger anhängig
|/ Fehler?=(kein)/R=Neuinstallation notwendig (Status, Fehler: GROSS=schlecht)
||/ Name                      Version                     Architektur  Beschreibung
+++-=========================-===========================-============-=================================
ii  libunivention-ldb-modules 8.0.0-6A~5.0.0.202202031157 amd64        Univention LDB modules

root@primary20:~# ucr search samba4/ldb/sam/module/prepend
samba4/ldb/sam/module/prepend: univention_samaccountname_ldap_check
```

Expected behavior:

```
root@primary20:~# ldbsearch -H /var/lib/samba/private/sam.ldb -b '@MODULES' -s base
+ ldbsearch -H /var/lib/samba/private/sam.ldb -b @MODULES -s base
# record 1
dn: @MODULES
@LIST: univention_samaccountname_ldap_check,samba_dsdb
distinguishedName: @MODULES
```

We should discuss if my expectations are simply outdated and the behavior is intended or if this is a regression in UCS@school. From my PoC it's a bug, because re-running the joinscript would actually activate the module. This can be simulated like this:

```
eval "$(ucr shell)"; . /usr/share/univention-samba4/lib/base.sh; samba4_ldb_sam_module_prepend
```
Comment 1 Arvid Requate univentionstaff 2022-05-05 11:41:08 CEST
On Juan Pedros machine everything works as expected.

I guess I know the difference: I already had the samba4 app installed before.
I guess my case is not a relevant customer use case.
Comment 2 Juan Pedro Torres univentionstaff 2022-05-05 11:42:55 CEST
I just set up an environment and it worked for me.

root@ucs501:~# univention-app info
UCS: 5.0-1 errata302
Installed: cups=2.2.1 samba4=4.13 squid=3.5 ucsschool=5.0 v1 4.4/ucsschool-veyon-proxy=1.1
Upgradable: 


root@ucs501:~# univention-check-join-status 
Joined successfully


root@ucs501:~# ldbsearch -H /var/lib/samba/private/sam.ldb -b '@MODULES' -s base
# record 1
dn: @MODULES
@LIST: univention_samaccountname_ldap_check,samba_dsdb
distinguishedName: @MODULES

# returned 1 records
# 1 entries
# 0 referrals


root@ucs501:~# dpkg -l libunivention-ldb-modules
Deseado=desconocido(U)/Instalar/eliminaR/Purgar/retener(H)
| Estado=No/Inst/ficheros-Conf/desempaqUetado/medio-conF/medio-inst(H)/espera-disparo(W)/pendienTe-disparo
|/ Err?=(ninguno)/requiere-Reinst (Estado,Err: mayúsc.=malo)
||/ Nombre                    Versión                     Arquitectura Descripción
+++-=========================-===========================-============-=================================
ii  libunivention-ldb-modules 8.0.0-6A~5.0.0.202202031157 amd64        Univention LDB modules