import pytest
import ConfigParser
import os
import tempfile
import ldap
def pytest_namespace():
return {'num_masters': 1,
'num_ad': 0,
'num_atomic': 0,
'num_replicas': 0,
'num_clients': 0,
'num_others': 0}
return session_multihost
""" Run authconfig to configure Kerberos and SSSD auth on remote host """
krbrealm = 'EXAMPLE.TEST'
def restore_authconfig():
""" Restore authconfig """
try:
except PkiLibException as err:
else:
return certdb
def remove_ldap():
def remove_kerberos():
try:
except Exception:
journalctl_cmd = "journalctl -x -n 50 --no-pager"
assert False
def stop_sssd():
'stop',
'sssd-kcm'])
'sssd.ldb', 'timestamps_%s.ldb' % ('EXAMPLE.TEST')]
for cache_file in sssd_cache:
secrets_db = '/var/lib/sss/secrets/secrets.ldb'
ds_rootdn = 'cn=Directory Manager'
ds_rootpw = 'Secret123'
for i in range(10):
'uid': 'foo%d' % i,
'uidNumber': '1458310%d' % i,
'gidNumber': '14564100'}
else:
print("Unable to add ldap User %s" % (user_info))
assert False
'gidNumber': '14564100',
'uniqueMember': memberdn}
try:
except Exception:
assert False
group_dn = 'cn=ldapusers,ou=Groups,dc=example,dc=test'
user_dn = 'uid=foo%d,ou=People,dc=example,dc=test' % i
assert ret == 'Success'
def teardown_session():
print("\n............Session Setup...............")
reqd_packages = '389-ds-base authconfig krb5-server krb5-workstation '\
'sssd-kcm openldap-clients'
print("\n............Session Ends.................")