mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Nscd version fixed at deb repo level, so this isn't needed anymore
This commit is contained in:
parent
16166917cb
commit
30ad9a9547
2 changed files with 4 additions and 4 deletions
|
@ -104,7 +104,7 @@ def tools_ldapinit():
|
||||||
auth.update('cn=admin', admin_dict)
|
auth.update('cn=admin', admin_dict)
|
||||||
|
|
||||||
# Force nscd to refresh cache to take admin creation into account
|
# 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
|
# Check admin actually exists now
|
||||||
try:
|
try:
|
||||||
|
@ -203,7 +203,7 @@ def _set_hostname(hostname, pretty_hostname=None):
|
||||||
pretty_hostname = "(YunoHost/%s)" % hostname
|
pretty_hostname = "(YunoHost/%s)" % hostname
|
||||||
|
|
||||||
# First clear nsswitch cache for hosts to make sure hostname is resolved...
|
# 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
|
# Then call hostnamectl
|
||||||
commands = [
|
commands = [
|
||||||
|
|
|
@ -194,7 +194,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'], stderr=open(os.devnull, 'wb'))
|
subprocess.call(['nscd', '-i', 'passwd'])
|
||||||
|
|
||||||
# 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']
|
||||||
|
@ -233,7 +233,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'], stderr=open(os.devnull, 'wb'))
|
subprocess.call(['nscd', '-i', 'passwd'])
|
||||||
|
|
||||||
# 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