added length check to usernames
This commit is contained in:
parent
2bc082c505
commit
2deb2ff246
1 changed files with 4 additions and 0 deletions
|
@ -56,6 +56,10 @@ define user::managed(
|
|||
default => $shell,
|
||||
}
|
||||
|
||||
if strlength($name) > 32 {
|
||||
fail("Usernames can't be longer than 32 characters. ${name} is too long!")
|
||||
}
|
||||
|
||||
user { $name:
|
||||
ensure => $ensure,
|
||||
allowdupe => false,
|
||||
|
|
Loading…
Reference in a new issue