openbsds don't allow names longer than 31

This commit is contained in:
mh 2009-04-30 13:47:35 +00:00
parent 2deb2ff246
commit 60cb5c8651

View file

@ -56,7 +56,10 @@ define user::managed(
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!")
}