Nscd version fixed at deb repo level, so this isn't needed anymore

This commit is contained in:
Alexandre Aubin 2018-01-17 23:03:00 +01:00
parent 16166917cb
commit 30ad9a9547
2 changed files with 4 additions and 4 deletions

View file

@ -104,7 +104,7 @@ def tools_ldapinit():
auth.update('cn=admin', admin_dict)
# Force nscd to refresh cache to take admin creation into account
subprocess.call(['nscd', '-i', 'passwd'], stderr=open(os.devnull, 'wb'))
subprocess.call(['nscd', '-i', 'passwd'])
# Check admin actually exists now
try:
@ -203,7 +203,7 @@ def _set_hostname(hostname, pretty_hostname=None):
pretty_hostname = "(YunoHost/%s)" % hostname
# First clear nsswitch cache for hosts to make sure hostname is resolved...
subprocess.call(['nscd', '-i', 'hosts'], stderr=open(os.devnull, 'wb'))
subprocess.call(['nscd', '-i', 'hosts'])
# Then call hostnamectl
commands = [

View file

@ -194,7 +194,7 @@ def user_create(auth, username, firstname, lastname, mail, password,
if auth.add('uid=%s,ou=users' % username, attr_dict):
# Invalidate passwd to take user creation into account
subprocess.call(['nscd', '-i', 'passwd'], stderr=open(os.devnull, 'wb'))
subprocess.call(['nscd', '-i', 'passwd'])
# Update SFTP user group
memberlist = auth.search(filter='cn=sftpusers', attrs=['memberUid'])[0]['memberUid']
@ -233,7 +233,7 @@ def user_delete(auth, username, purge=False):
if auth.remove('uid=%s,ou=users' % username):
# Invalidate passwd to take user deletion into account
subprocess.call(['nscd', '-i', 'passwd'], stderr=open(os.devnull, 'wb'))
subprocess.call(['nscd', '-i', 'passwd'])
# Update SFTP user group
memberlist = auth.search(filter='cn=sftpusers', attrs=['memberUid'])[0]['memberUid']