diff --git a/salt/modules/dracr.py b/salt/modules/dracr.py index a0d2d5f3b8..1468504865 100644 --- a/salt/modules/dracr.py +++ b/salt/modules/dracr.py @@ -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)