summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcarlosg <carlosg>2006-06-05 12:35:49 +0000
committercarlosg <carlosg>2006-06-05 12:35:49 +0000
commit4d8ff7de3bc8ac6f4a7849e867ec10b9174d81f5 (patch)
tree411a366c408c814fc784241741172345447ab320
parentfa460722913213f7abe0cd0d87fb4a7588574f81 (diff)
2006-06-05 Carlos Garnacho <carlosg@gnome.org>
* Users/Users.pm (change_user_chfn): specify which user to modify. (add_user): remove a stray apostrophe. * Users/Groups.pm (change_group): get the correct state for the users
-rw-r--r--ChangeLog6
-rw-r--r--Users/Groups.pm4
-rw-r--r--Users/Users.pm6
3 files changed, 12 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 30e31db..c1eb72d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2006-06-05 Carlos Garnacho <carlosg@gnome.org>
+ * Users/Users.pm (change_user_chfn): specify which user to modify.
+ (add_user): remove a stray apostrophe.
+ * Users/Groups.pm (change_group): get the correct state for the users
+
+2006-06-05 Carlos Garnacho <carlosg@gnome.org>
+
* HostsConfig.pm: uncomment some needed code.
* Network/Hosts.pm: fix a couple of code typos.
* IfacesConfig.pm, Network/Ifaces.pm: get/set "auto"
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);
}