mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Raise error if dracr password is above 20 chars
This commit is contained in:
parent
a1ffc5aacb
commit
2c55c55ff1
1 changed files with 4 additions and 0 deletions
|
@ -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.
|
||||
Many late-model Dell chassis have 'root' as UID 1, so if you can depend
|
||||
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:
|
||||
user = list_users(host=host, admin_username=admin_username,
|
||||
admin_password=admin_password, module=module)
|
||||
|
|
Loading…
Add table
Reference in a new issue