Skip to content

Commit 525a731

Browse files
committed
Fixed a bug in usermod command in shelluser_base plugin.
1 parent 5fa6803 commit 525a731

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

server/plugins-available/shelluser_base_plugin.inc.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,15 +89,16 @@ function update($event_name,$data) {
8989
$command = 'usermod';
9090
$command .= ' --home '.escapeshellcmd($data['new']['dir']);
9191
$command .= ' --gid '.escapeshellcmd($data['new']['pgroup']);
92-
$command .= ' --non-unique ';
92+
// $command .= ' --non-unique ';
9393
$command .= ' --password '.escapeshellcmd($data['new']['password']);
9494
$command .= ' --shell '.escapeshellcmd($data['new']['shell']);
95-
$command .= ' --uid '.escapeshellcmd($uid);
95+
// $command .= ' --uid '.escapeshellcmd($uid);
9696
$command .= ' --login '.escapeshellcmd($data['new']['username']);
9797
$command .= ' '.escapeshellcmd($data['old']['username']);
9898

9999
exec($command);
100-
$app->log("Updated shelluser: ".$data['new']['username'],LOGLEVEL_DEBUG);
100+
// $app->log("Updated shelluser: $command ",LOGLEVEL_DEBUG);
101+
$app->log("Updated shelluser: ".$data['old']['username'],LOGLEVEL_DEBUG);
101102

102103
} else {
103104
$app->log("UID = $uid for shelluser:".$data['new']['username']." not allowed.",LOGLEVEL_ERROR);

0 commit comments

Comments
 (0)