openbsds don't allow names longer than 31
This commit is contained in:
parent
2deb2ff246
commit
60cb5c8651
1 changed files with 4 additions and 1 deletions
|
@ -56,7 +56,10 @@ define user::managed(
|
||||||
default => $shell,
|
default => $shell,
|
||||||
}
|
}
|
||||||
|
|
||||||
if strlength($name) > 32 {
|
if ($kernel == 'OpenBSD') and (strlength($name) > 31) {
|
||||||
|
fail("Usernames can't be longer than 31 characters. ${name} is too long!")
|
||||||
|
}
|
||||||
|
if ($kernel == 'Linux') and (strlength($name) > 32) {
|
||||||
fail("Usernames can't be longer than 32 characters. ${name} is too long!")
|
fail("Usernames can't be longer than 32 characters. ${name} is too long!")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue