summaryrefslogtreecommitdiff
path: root/Users
diff options
context:
space:
mode:
Diffstat (limited to 'Users')
-rw-r--r--Users/Groups.pm4
-rw-r--r--Users/Users.pm6
2 files changed, 6 insertions, 4 deletions
diff --git a/Users/Groups.pm b/Users/Groups.pm
index bd228de..c5e912e 100644
--- a/Users/Groups.pm
+++ b/Users/Groups.pm
@@ -106,7 +106,7 @@ sub add_group
sub change_group
{
my ($old_group, $new_group) = @_;
- my (%users, $user, $users_arr, $str);
+ my (%users, %user, $users_arr, $str);
my ($n, $o, $users, $i, $j, $max_n, $max_o, $r, @tmp); # for iterations
@@ -138,7 +138,7 @@ sub change_group
foreach $user (keys %users)
{
- $state = $users{$u};
+ $state = $users{$user};
if ($state == 2)
{
diff --git a/Users/Users.pm b/Users/Users.pm
index d3d57d9..1730429 100644
--- a/Users/Users.pm
+++ b/Users/Users.pm
@@ -539,7 +539,9 @@ sub change_user_chfn
{
$command .= " -o \'" . $office . "\'" .
" -p \'" . $office_phone . "\'";
- }
+ }
+
+ $command .= " $login";
}
&Utils::File::run ($command);
@@ -595,7 +597,7 @@ sub add_user
# password can't be set in non-interactive
# mode with adduser, call usermod instead
$command = "$cmd_usermod " .
- "' -p '" . $$user[$PASSWD] . "' " . $$user[$LOGIN];
+ " -p '" . $$user[$PASSWD] . "' " . $$user[$LOGIN];
&Utils::File::run ($command);
}