mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
create admin home folder
This commit is contained in:
parent
1f2061c9ee
commit
509d417070
1 changed files with 8 additions and 0 deletions
|
@ -104,6 +104,14 @@ def tools_ldapinit():
|
|||
# Force nscd to refresh cache to take admin creation into account
|
||||
subprocess.call(['nscd', '-i', 'passwd'])
|
||||
|
||||
try:
|
||||
# Attempt to create user home folder
|
||||
subprocess.check_call(["mkhomedir_helper", "admin"])
|
||||
except subprocess.CalledProcessError:
|
||||
if not os.path.isdir('/home/{0}'.format("admin")):
|
||||
logger.warning(m18n.n('user_home_creation_failed'),
|
||||
exc_info=1)
|
||||
|
||||
# Check admin actually exists now
|
||||
try:
|
||||
pwd.getpwnam("admin")
|
||||
|
|
Loading…
Add table
Reference in a new issue