Projet

Général

Profil

Tâche #34613

Scénario #34409: EoleAD : création de comptes préfixés (POC)

POC mapping des groupes spéciaux

Ajouté par Joël Cuissinat il y a plus d'un an. Mis à jour il y a environ un an.

Statut:
Fermé
Priorité:
Normal
Assigné à:
Début:
19/09/2022
Echéance:
% réalisé:

0%

Restant à faire (heures):
0.0

Historique

#1 Mis à jour par Joël Cuissinat il y a plus d'un an

Un hack rapide m'a permis de renommer tous les groupes du Scribe donc c'est possible !
Mais attention au "delete".
Je pense qu'il faudra ajouter un bloc XML dédié aux groupes eleves, professeurs et administratifs.

root@scribe:~# diff lsc.xml /etc/lsc/lsc.xml
403c403
<         <getOneFilter>(&amp;(objectClass=group)(!(isCriticalSystemObject=TRUE))(!(cn=DnsAdmins))(!(cn=DnsUpdateProxy))(sAMAccountName={cn}-xxx))</getOneFilter>
---
>         <getOneFilter>(&amp;(objectClass=group)(!(isCriticalSystemObject=TRUE))(!(cn=DnsAdmins))(!(cn=DnsUpdateProxy))(sAMAccountName={cn}))</getOneFilter>
406c406
<         <mainIdentifier>"CN=" + srcBean.getDatasetFirstValueById("cn") + "-xxx" + ",CN=Users,DC=domscribe,DC=ac-test,DC=fr"</mainIdentifier>
---
>         <mainIdentifier>"CN=" + srcBean.getDatasetFirstValueById("cn") + ",CN=Users,DC=domscribe,DC=ac-test,DC=fr"</mainIdentifier>
430,439c430
<             <string>srcBean.getDatasetFirstValueById("cn") + "-xxx"</string>
<           </forceValues>
<           <createValues></createValues>
<         </dataset>
<         <dataset>
<           <name>cn</name>
<           <policy>FORCE</policy>
<           <defaultValues></defaultValues>
<           <forceValues>
<             <string>srcBean.getDatasetFirstValueById("cn") + "-xxx"</string>
---
>             <string>srcBean.getDatasetFirstValueById("cn")</string>
512c503

#2 Mis à jour par Joël Cuissinat il y a plus d'un an

Exploitation des groupes :

  • scripts pre/post
    root@scribe:~# grep -Ei "professeurs|eleves|adminis" /usr/share/eole/p*/*
    /usr/share/eole/postservice/05-eolead-join-and-sync-ldap:        echo "Mauvais mot de passe administrateur du domaine" 
    /usr/share/eole/postservice/08-scribe:PROF="$WORKGROUPS/professeurs" 
    /usr/share/eole/postservice/08-scribe:PROFESSEURS='professeurs'
    /usr/share/eole/postservice/08-scribe:ELEVES='eleves'
    /usr/share/eole/postservice/08-scribe:ADMINIS='administratifs'
    /usr/share/eole/postservice/08-scribe:    setfacl -Rm g:${PROFESSEURS}:r-x $COMMUN
    /usr/share/eole/postservice/08-scribe:    setfacl -Rm g:${ELEVES}:r-x      $COMMUN
    /usr/share/eole/postservice/08-scribe:    setfacl -Rm g:${ADMINIS}:r-x      $COMMUN
    /usr/share/eole/postservice/08-scribe:    setfacl -Rm g:${PROFESSEURS}:rwx $COMMUN/travail
    /usr/share/eole/postservice/08-scribe:    setfacl -Rm g:${ADMINIS}:rwx $COMMUN/travail
    /usr/share/eole/postservice/08-scribe:# partage professeurs
    /usr/share/eole/postservice/08-scribe:# /!\ professeurs/gestion-postes est créé par controle-vnc-applis /!\
    /usr/share/eole/postservice/08-scribe:    setfacl -Rm g:${PROFESSEURS}:r-x $PROF
    /usr/share/eole/postservice/08-scribe:if [ ! -f $PROF/Administration.url ];then
    /usr/share/eole/postservice/08-scribe:    echo "[InternetShortcut]\nURL=https://${adresse_ip_eth0}:4200/" > $PROF/Administration.url
    /usr/share/eole/postservice/08-scribe:setfacl -Rm g:${PROFESSEURS}:rwx $DEVOIR
    /usr/share/eole/postservice/08-scribe:setfacl -Rm g:${ELEVES}:r-x $DEVOIR
    
  • librairie scribe
    root@scribe:~# rgrep setfacl /usr/lib/python3/dist-packages/scribe
    /usr/lib/python3/dist-packages/scribe/eoleshare.py:        system("setfacl -Rbk %s" % filepath)
    /usr/lib/python3/dist-packages/scribe/eoleshare.py:                system("setfacl -Rbk %s" % c_dir)
    /usr/lib/python3/dist-packages/scribe/eoletools.py:    # l'option -P de setfacl permet d'ignorer les liens symboliques
    /usr/lib/python3/dist-packages/scribe/eoletools.py:        cmd = ['setfacl', '-PRm', 'g:%s:%s' % (groupname, mode), '%s' % dirname]
    /usr/lib/python3/dist-packages/scribe/eoletools.py:        cmd = ['setfacl', '-Pm', 'g:%s:%s' % (groupname, mode), '%s' % dirname]
    /usr/lib/python3/dist-packages/scribe/eoletools.py:        system("""getfacl --access --absolute-names "%s" | setfacl -Rd -M- "%s" """ % (
    /usr/lib/python3/dist-packages/scribe/eoletools.py:        system("""getfacl --access --absolute-names "%s" | setfacl -d -M- "%s" """ % (
    /usr/lib/python3/dist-packages/scribe/enseignants.py:        system('setfacl -PRbk %s' % dev_dist_dir)
    /usr/lib/python3/dist-packages/scribe/enseignants.py:        system('setfacl -PRm u:%s:rwx %s' % (login, dev_dist_dir))
    /usr/lib/python3/dist-packages/scribe/enseignants.py:        system('setfacl -dPRm u:%s:rwx %s' % (login, dev_dist_dir))
    /usr/lib/python3/dist-packages/scribe/login.py:            cmd += '/usr/bin/setfacl -PRm u:%s:rwx %s;'%(uid, rep)
    /usr/lib/python3/dist-packages/scribe/login.py:            cmd += '/usr/bin/setfacl -dPRm u:%s:rwx %s;'%(uid, rep)
    /usr/lib/python3/dist-packages/scribe/login.py:            cmd += '/usr/bin/setfacl -PRbk %s;' % dev_dist_dir
    /usr/lib/python3/dist-packages/scribe/login.py:            cmd += '/usr/bin/setfacl -PRm u:%s:rwx %s;' % (uid, dev_dist_dir)
    /usr/lib/python3/dist-packages/scribe/login.py:            cmd += '/usr/bin/setfacl -dPRm u:%s:rwx %s;' % (uid, dev_dist_dir)
    /usr/lib/python3/dist-packages/scribe/login.py:    #system('setfacl -bk %s' % groupedir)
    /usr/lib/python3/dist-packages/scribe/eoleuser.py:        system('setfacl -PRm u:%s:rwx %s'%(login, rep))
    /usr/lib/python3/dist-packages/scribe/eoleuser.py:        system('setfacl -dPRm u:%s:rwx %s'%(login, rep))
    
  • partage professeur
    root@scribe:/etc/samba# grep professeurs conf.d/eole.conf 
    [professeurs]
            Write list = @professeurs
            Valid Users = @professeurs @"Domain Admins" 
            path = /home/workgroups/professeurs
    

#3 Mis à jour par Joël Cuissinat il y a plus d'un an

  • Statut changé de Nouveau à En cours
  • Assigné à mis à Joël Cuissinat

#4 Mis à jour par Joël Cuissinat il y a plus d'un an

  • Statut changé de En cours à Résolu

#5 Mis à jour par Joël Cuissinat il y a environ un an

  • Statut changé de Résolu à Fermé
  • Restant à faire (heures) mis à 0.0

Formats disponibles : Atom PDF