mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Raise error if dracr password is above 20 chars
This commit is contained in:
parent
7caead8630
commit
856eb4664f
@ -459,7 +459,11 @@ def change_password(username, password, uid=None, host=None,
|
|||||||
be necessary if one is not sure which user slot contains the one you want.
|
be necessary if one is not sure which user slot contains the one you want.
|
||||||
Many late-model Dell chassis have 'root' as UID 1, so if you can depend
|
Many late-model Dell chassis have 'root' as UID 1, so if you can depend
|
||||||
on that then setting the password is much quicker.
|
on that then setting the password is much quicker.
|
||||||
|
Raises an error if the supplied password is greater than 20 chars.
|
||||||
'''
|
'''
|
||||||
|
if len(password) > 20:
|
||||||
|
raise CommandExecutionError('Supplied password should be 20 characters or less')
|
||||||
|
|
||||||
if uid is None:
|
if uid is None:
|
||||||
user = list_users(host=host, admin_username=admin_username,
|
user = list_users(host=host, admin_username=admin_username,
|
||||||
admin_password=admin_password, module=module)
|
admin_password=admin_password, module=module)
|
||||||
|
Loading…
Reference in New Issue
Block a user