Handle removing a password if mutableUsers = false
This commit is contained in:
parent
1b53a3fcb7
commit
3696536115
@ -228,6 +228,7 @@ foreach my $line (-f "/etc/shadow" ? read_file("/etc/shadow") : ()) {
|
|||||||
my ($name, $hashedPassword, @rest) = split(':', $line, -9);
|
my ($name, $hashedPassword, @rest) = split(':', $line, -9);
|
||||||
my $u = $usersOut{$name};;
|
my $u = $usersOut{$name};;
|
||||||
next if !defined $u;
|
next if !defined $u;
|
||||||
|
$hashedPassword = "!" if !$spec->{mutableUsers};
|
||||||
$hashedPassword = $u->{hashedPassword} if defined $u->{hashedPassword} && !$spec->{mutableUsers}; # FIXME
|
$hashedPassword = $u->{hashedPassword} if defined $u->{hashedPassword} && !$spec->{mutableUsers}; # FIXME
|
||||||
push @shadowNew, join(":", $name, $hashedPassword, @rest) . "\n";
|
push @shadowNew, join(":", $name, $hashedPassword, @rest) . "\n";
|
||||||
$shadowSeen{$name} = 1;
|
$shadowSeen{$name} = 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user