trying to fix to set the password the first time
This commit is contained in:
parent
86c0afad32
commit
f23cf372ba
1 changed files with 4 additions and 4 deletions
|
@ -134,10 +134,10 @@ define user::define_user(
|
|||
default: {
|
||||
case $operatingsystem {
|
||||
openbsd: {
|
||||
exec { "setpass $name":
|
||||
onlyif => "grep '^$name:\\*:' /etc/master.passwd",
|
||||
command => "usermod -p '$password' $name",
|
||||
require => User[$name],
|
||||
exec { "setpass ${name}":
|
||||
onlyif => "grep -q '^${name}:\\**:' /etc/master.passwd",
|
||||
command => "usermod -p '${password}' ${name}",
|
||||
require => User["${name}"],
|
||||
}
|
||||
}
|
||||
default: {
|
||||
|
|
Loading…
Reference in a new issue