Project

General

Profile

Tâche #31497

Scénario #31492: Traitement express MEN (02-04)

Le compte eole-workstation-manager n’est pas membre du groupe Domain Admins en 2.8.1

Added by Daniel Dehennin 4 months ago. Updated 4 months ago.

Status:
Fermé
Priority:
Normal
Assigned To:
Start date:
01/06/2021
Due date:
% Done:

100%

Remaining (hours):
0.0

Description

Le script eole-workstation:source:postservice/30-eole-workstation-manager@94389c2b utilise des commandes CreoleRun qui ne fonctionnent pas comme prévues sur Scribe puisqu’il n’y que le groupe root.

Ainsi, la commande qui vérifie si l’utilisateur est bien membre de Domain Admins

CreoleRun "samba-tool group listmembers 'Domain Admins' | grep '^eole-workstation-manager$'" domaine

ne peut pas fonctionner, cela me renvoie les logs suivants :

ltdb: tdb(/var/lib/samba/private/sam.ldb): tdb_open_ex: could not open file /var/lib/samba/private/sam.ldb: No such file or directory

Unable to open tdb '/var/lib/samba/private/sam.ldb': No such file or directory
Failed to connect to 'tdb:///var/lib/samba/private/sam.ldb' with backend 'tdb': Unable to open tdb '/var/lib/samba/private/sam.ldb': No such file or directory
ERROR(ldb): Failed to list members of "Domain Admins" group  - Unable to open tdb '/var/lib/samba/private/sam.ldb': No such file or directory

Associated revisions

Revision 663cdc0b (diff)
Added by Joël Cuissinat 4 months ago

Unit tests : verify AD users groups

Ref: #31497

Revision 4382ced6 (diff)
Added by Joël Cuissinat 4 months ago

Unit tests : verify "gpo-addc" groups

Ref: #31497

Revision 90164b41 (diff)
Added by Joël Cuissinat 4 months ago

Unit tests : verify "eole-sasl" groups

Ref: #31497

Revision 0269441c (diff)
Added by Joël Cuissinat 4 months ago

reuse ssh instead of lxc-attach in postservice script

Ref: #31497

History

#1 Updated by Joël Cuissinat 4 months ago

  • Status changed from Nouveau to En cours

#2 Updated by Joël Cuissinat 4 months ago

  • Assigned To set to Joël Cuissinat

#3 Updated by Joël Cuissinat 4 months ago

Visiblement, la commande lxc-attach ne gère pas correctement les quotes et les espaces quand on lui envoie la commande via une variable...

À défaut de solution simple, nous allons ré-utiliser ssh dans ce script.

#4 Updated by Joël Cuissinat 4 months ago

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

#5 Updated by Fabrice Barconnière 4 months ago

Après Maj et avant reconfigure :

root@scribe:/usr/share/scribe/tests# py.test-3 test_ad_users.py                                                                                                                                                    
================================================ test session starts ====================================================
platform linux -- Python 3.8.5, pytest-4.6.9, py-1.8.1, pluggy-0.13.0                                                                                                                                              
rootdir: /usr/share/scribe/tests                                                                                                                                                                                   
collected 5 items                                                                                                                                                                                                  

test_ad_users.py .F...                                                                                                                                                                                      [100%] 

================================================= FAILURES ==============================================================
__________________________________________ test_eole_workstation_manager ________________________________________________

    def test_eole_workstation_manager():                                                                                                                                                                           
        """                                                                                                                                                                                                        
        Vérification des groupes AD pour eole-workstation-manager                                                                                                                                                  
        """                                                                                                                                                                                                        
        groups = system_out(['id', 'eole-workstation-manager'])[1]                                                                                                                                                 
>       assert '(domain admins)' in groups                                                                                                                                                                         
E       AssertionError: assert '(domain admins)' in 'uid=11110(eole-workstation-manager) gid=10513(domain users) groupes=10513(domain users),11110(eole-workstation-manager),2001(BUILTIN\\users)\n'               

test_ad_users.py:17: AssertionError                                                                                                                                                                                
==================================== 1 failed, 4 passed in 0.24 seconds =================================================

Après reconfigure :
root@scribe:/usr/share/scribe/tests# py.test-3 test_ad_users.py
================================== test session starts ============================================
platform linux -- Python 3.8.5, pytest-4.6.9, py-1.8.1, pluggy-0.13.0
rootdir: /usr/share/scribe/tests
collected 5 items                                                                                                                                                                                                 

test_ad_users.py .....                                                                       [100%]

=================================== 5 passed in 0.57 seconds ======================================

et
root@addc:~# samba-tool group listmembers 'Domain Admins' | grep '^eole-workstation-manager$'
eole-workstation-manager

La jonction au domaine par joineole est fonctionnelle sur Scribe 2.8.1

#6 Updated by Fabrice Barconnière 4 months ago

  • Status changed from Résolu to Fermé
  • Remaining (hours) set to 0.0

Also available in: Atom PDF