max length is on both systems 31

This commit is contained in:
mh 2009-10-20 23:18:22 +02:00
parent 99c0b5ef60
commit 45b0dfcd6b

View file

@ -56,12 +56,9 @@ define user::managed(
default => $shell,
}
if ($kernel == 'OpenBSD') and (strlength($name) > 31) {
if 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!")
}
user { $name:
ensure => $ensure,