mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[fix] uses strong hash for admin password
This commit is contained in:
parent
c5a44b8638
commit
970d9b0207
1 changed files with 4 additions and 1 deletions
|
@ -122,8 +122,11 @@ def tools_adminpw(auth, new_password):
|
||||||
new_password
|
new_password
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
from yunohost.user import _hash_user_password
|
||||||
try:
|
try:
|
||||||
auth.con.passwd_s('cn=admin,dc=yunohost,dc=org', None, new_password)
|
auth.update("cn=admin", {
|
||||||
|
"userPassword": _hash_user_password(new_password),
|
||||||
|
})
|
||||||
except:
|
except:
|
||||||
logger.exception('unable to change admin password')
|
logger.exception('unable to change admin password')
|
||||||
raise MoulinetteError(errno.EPERM,
|
raise MoulinetteError(errno.EPERM,
|
||||||
|
|
Loading…
Add table
Reference in a new issue