|
|
@ -52,16 +52,32 @@ if (!$dep){ |
|
|
|
City => 'Martillac', |
|
|
|
City => 'Martillac', |
|
|
|
Dept => 'Administration', |
|
|
|
Dept => 'Administration', |
|
|
|
Removable => 'no', |
|
|
|
Removable => 'no', |
|
|
|
PasswordSet => 'yes', |
|
|
|
PasswordSet => 'no', |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
unless ( system("/sbin/e-smith/signal-event", "user-create", "deploiement") == 0 ){ |
|
|
|
unless ( system("/sbin/e-smith/signal-event", "user-create", "deploiement") == 0 ){ |
|
|
|
die "Failed to create user account deploiement\n"; |
|
|
|
die "Failed to create user account deploiement\n"; |
|
|
|
} |
|
|
|
} |
|
|
|
esmith::util::setUserPassword ("deploiement", "$pass"); |
|
|
|
esmith::util::setUserPassword ("deploiement", "$pass"); |
|
|
|
|
|
|
|
$a->set_prop('deploiement', 'PasswordSet', 'yes'); |
|
|
|
unless ( system("/sbin/e-smith/signal-event", "password-modify", "deploiement") == 0 ){ |
|
|
|
unless ( system("/sbin/e-smith/signal-event", "password-modify", "deploiement") == 0 ){ |
|
|
|
die "Failed to set password for user deploiement\n"; |
|
|
|
die "Failed to set password for user deploiement\n"; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
$a->set_prop('deploiement', 'Password', "$pass"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else{ |
|
|
|
|
|
|
|
my $wpkg = $c->get('wpkg') || die "Couldn't find wpkg service\n"; |
|
|
|
|
|
|
|
my $new = $wpkg->prop('UserPassword') || ''; |
|
|
|
|
|
|
|
my $old = $dep->prop('Password') || ''; |
|
|
|
|
|
|
|
my $set = $dep->prop('PasswordSet') || 'no'; |
|
|
|
|
|
|
|
if (($old ne $new) || ($set ne 'yes')){ |
|
|
|
|
|
|
|
esmith::util::setUserPassword ("deploiement", "$new"); |
|
|
|
|
|
|
|
$a->set_prop('deploiement', 'PasswordSet', 'yes'); |
|
|
|
|
|
|
|
unless ( system("/sbin/e-smith/signal-event", "password-modify", "deploiement") == 0 ){ |
|
|
|
|
|
|
|
die "Failed to set password for user deploiement\n"; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
$a->set_prop('deploiement', 'Password', "$new"); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
# sharedfolder wpkg |
|
|
|
# sharedfolder wpkg |
|
|
|