Project

General

Profile

Tâche #21660

Scénario #21252: traitement express PNESR (40-42)

seth-membre: 'Utiliser la méthode par défaut de calcul des uid-gid' - n'est pas opérationnel si l'on choisi 'non'

Added by christophe guerinot almost 6 years ago. Updated almost 6 years ago.

Status:
Fermé
Priority:
Normal
Start date:
01/23/2017
Due date:
% Done:

100%

Estimated time:
4.00 h
Spent time:
Remaining (hours):
0.0

Description

si la variable 'ad_idmap_config_auto' est positionné à 'non' les comptes ne sont pas listés

Associated revisions

Revision ded550b6 (diff)
Added by christophe guerinot almost 6 years ago

seth-membre : Ajout de la configuration du backend idmap tdb

dans le cas où 'Utiliser la méthode par défaut de calcul des uid-gid' est à 'non' ( fixes #21660 @4.0h ).

  • ajout des varables 'ad_idmap_config_tdb_low' et 'ad_idmap_config_tdb_high'

Revision 3987a016
Added by Joël Cuissinat almost 6 years ago

Merge branch '2.6.1/master' into master

Conflicts:
dicos/25_smb_ad.xml

Ref: #21660

Revision 05e8f510 (diff)
Added by Joël Cuissinat almost 6 years ago

Revert "Ajout type de serveur de référence (dico, template, code)"

This reverts eole-ad-dc:ff834c730221a4b94d6e1795c354764b151983ce.

Conflicts:
dicos/25_smb_ad.xml

Ref: #21052
Ref: #21660

History

#1 Updated by christophe guerinot almost 6 years ago

deux modes sont proposés, dans les deux cas le calcul de l'uid se fait sur la base du RID

rubrique 'Active Directory' / <Utiliser la méthode par défaut de calcul des uid-gid>

(1) le mode 'par défaut' , 'ad_idmap_config_auto' positionné à 'oui'

la fourchette est en dur dans le template smb-ad.conf

  idmap config *:backend = autorid
  idmap config *:range = 1000000-19999999

le calcul uid/rid semble un peu abscon

man idmap_autorid

       The Unix ID for a RID is calculated this way:

                          ID =  REDUCED RID + IDMAP RANGE LOW VALUE + RANGE NUMBER * RANGE SIZE

       where REDUCED RID = RID % RANGE_SIZE and a DOMAIN RANGE INDEX = RID / RANGE_SIZE is used together with the domain sid to
       determine the RANGE NUMBER (stored in the database).

je suppose d'après le man ('The default value is 100000.')que
RANGE SIZE = 100 000

en dur on a
IDMAP RANGE LOW VALUE = 1 000 000

comme sur l'ensemble des seth-membre de test installés nous retrouvons la correspondance
uid = rid + 1 100 000
j'en déduis que
RANGE NUMBER =1

S'il n'y a besoin que de faire le mappage de comptes qui sont dans le domaine AD la configuration par défaut est suffisante S'il y a besoin de retrouver strictement les mêmes fourchettes de valeurs que pour l'esbl il faudrait créoliser les valeurs de la fourchette

en fait si la question serait d'avoir la possibilité de gérer le mappage de comptes issus d'autres domaines ou autres (groupes locaux type BUILTIN), il est nécessaire d'utiliser la deuxième méthode
(2) 'ad_idmap_config_auto' positionné à 'non'

cela ne fonctionne pas en l'état (les comptes ne sont pas récupérés par les commandes getent passwd et getent group), si on configure le backend idmap_tdb comme sur l'esbl, les comptes sont bien récupérés

adaptation à effectuer:

créoliser des variables pour la fourchette de valeurs pour configurer le backend idmap_tdb
adaptation du dictionnaire 25_smb-dc-ad.xml du projet eole-ad-dc

    <variable name='ad_idmap_config_tdb_low' type='number' description='Limite basse de la plage d’id pour le backend tdb' mode='expert' mandatory='True'/>
    <variable name='ad_idmap_config_tdb_high' type='number' description='Limite haute de la plage d’id pour le backend tdb' mode='expert' mandatory='True'/>

et en adaptant les conditions

        <condition name='disabled_if_in' source='ad_idmap_config_auto'>
            <param>oui</param>
            <target type='variable'>ad_idmap_config_domain</target>
            <target type='variable'>ad_idmap_config_tdb_low</target>
            <target type='variable'>ad_idmap_config_tdb_high</target>
        </condition>

adaptation du template smb-ad-dc.conf

root@seth-159:/usr/share/eole/creole/modif# cat ../patch/smb-ad.conf.patch 
--- distrib/smb-ad.conf    2017-06-12 16:04:47.000000000 +0200
+++ modif/smb-ad.conf    2017-10-12 17:42:11.103037111 +0200
@@ -84,6 +84,9 @@
   #kerberos method = secrets and keytab

 %if %%getVar('ad_idmap_config_auto', 'oui') == 'non'
+  idmap config * : backend = tdb
+  idmap config * : range = %%{ad_idmap_config_tdb_low}-%%{ad_idmap_config_tdb_high}
+
 %for %%idmap_config_domain in %%getVar('ad_idmap_config_domain')
   idmap config %%idmap_config_domain:backend = %%idmap_config_domain.ad_idmap_config_backend
   idmap config %%idmap_config_domain:range = %%{idmap_config_domain.ad_idmap_config_low}-%%{idmap_config_domain.ad_idmap_config_high}

test en prenant les mêmes fourchettes que pour l'esbl

# CreoleGet --list |grep idmap_config
ad_idmap_config_auto="non" 
ad_idmap_config_domain="formlyon3" 
ad_idmap_config_backend="rid" 
ad_idmap_config_high="90009999" 
ad_idmap_config_low="1000" 
ad_idmap_config_tdb_high="90090000" 
ad_idmap_config_tdb_low="90010000" 
# cat /etc/samba/smb.conf
(...)
  idmap config * : backend = tdb
  idmap config * : range = 90010000-90090000

  idmap config formlyon3:backend = rid
  idmap config formlyon3:range = 1000-90009999
(...)

vérif

# getent passwd FORMLYON3/bruno-3.com
FORMLYON3/bruno-3.com:*:2116:1513:COM Bruno-3:/home/FORMLYON3/bruno-3.com:/bin/false

# wbinfo -n FORMLYON3/bruno-3.com
S-1-5-21-1219246843-1905954336-1610319107-1116 SID_USER (1)

uid = rid (1116) + low range (1000) = 2116

man idmap_rid
ID = RID - BASE_RID + LOW_RANGE_ID

base rid = 0

#2 Updated by christophe guerinot almost 6 years ago

  • Status changed from Nouveau to En cours

#3 Updated by christophe guerinot almost 6 years ago

  • Assigned To set to christophe guerinot
  • Estimated time set to 4.00 h
  • Remaining (hours) set to 4.0

#4 Updated by Emmanuel IHRY almost 6 years ago

Donc nous nous allons configurer les SETH avec 'ad_idmap_config_auto' positionné à 'non'

Je comprends qu'il manque pour que ça marche la créolisation plus template de ad_idmap_config_tdb_low' et 'ad_idmap_config_tdb_high'. et comme ça on retombe sur les mêmes valeurs que les eSBL actuels --> ce qui est l'objectif. Donc OK.

Ce qui m'étonne c'est que je pensais que c'était déjà fonctionnel ?

#5 Updated by christophe guerinot almost 6 years ago

  • Status changed from En cours to Résolu
  • % Done changed from 0 to 100

#6 Updated by christophe guerinot almost 6 years ago

  • Remaining (hours) changed from 4.0 to 0.0

#7 Updated by Emmanuel IHRY almost 6 years ago

  • Status changed from Résolu to Fermé

Also available in: Atom PDF