[fix] also invalidate group cache

This commit is contained in:
Laurent Peuch 2020-04-09 17:37:04 +02:00 committed by Alexandre Aubin
parent a221b7b9f0
commit aaabf8c75c

View file

@ -213,8 +213,9 @@ def user_create(operation_logger, username, firstname, lastname, mail, password,
except Exception as e:
raise YunohostError('user_creation_failed', user=username, error=e)
# Invalidate passwd to take user creation into account
# Invalidate passwd and group to take user and group creation into account
subprocess.call(['nscd', '-i', 'passwd'])
subprocess.call(['nscd', '-i', 'group'])
try:
# Attempt to create user home folder