mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Also remove useless nscd warning in user.py
This commit is contained in:
parent
a9e90390bc
commit
e606451872
1 changed files with 2 additions and 2 deletions
|
@ -185,7 +185,7 @@ def user_create(auth, username, firstname, lastname, mail, password,
|
||||||
|
|
||||||
if auth.add('uid=%s,ou=users' % username, attr_dict):
|
if auth.add('uid=%s,ou=users' % username, attr_dict):
|
||||||
# Invalidate passwd to take user creation into account
|
# Invalidate passwd to take user creation into account
|
||||||
subprocess.call(['nscd', '-i', 'passwd'])
|
subprocess.call(['nscd', '-i', 'passwd'], stderr=open(os.devnull, 'wb'))
|
||||||
|
|
||||||
# Update SFTP user group
|
# Update SFTP user group
|
||||||
memberlist = auth.search(filter='cn=sftpusers', attrs=['memberUid'])[0]['memberUid']
|
memberlist = auth.search(filter='cn=sftpusers', attrs=['memberUid'])[0]['memberUid']
|
||||||
|
@ -224,7 +224,7 @@ def user_delete(auth, username, purge=False):
|
||||||
|
|
||||||
if auth.remove('uid=%s,ou=users' % username):
|
if auth.remove('uid=%s,ou=users' % username):
|
||||||
# Invalidate passwd to take user deletion into account
|
# Invalidate passwd to take user deletion into account
|
||||||
subprocess.call(['nscd', '-i', 'passwd'])
|
subprocess.call(['nscd', '-i', 'passwd'], stderr=open(os.devnull, 'wb'))
|
||||||
|
|
||||||
# Update SFTP user group
|
# Update SFTP user group
|
||||||
memberlist = auth.search(filter='cn=sftpusers', attrs=['memberUid'])[0]['memberUid']
|
memberlist = auth.search(filter='cn=sftpusers', attrs=['memberUid'])[0]['memberUid']
|
||||||
|
|
Loading…
Add table
Reference in a new issue