| | |
| | | |
| | | //* Disable shell user temporarily if we use jailkit |
| | | if($data['new']['chroot'] == 'jailkit') { |
| | | $command = 'usermod -s /bin/false -L '.escapeshellcmd($data['new']['username']); |
| | | $command = 'usermod -s /bin/false -L '.escapeshellcmd($data['new']['username']).' 2>/dev/null'; |
| | | exec($command); |
| | | $app->log("Disabling shelluser temporarily: ".$command,LOGLEVEL_DEBUG); |
| | | } |
| | |
| | | exec($command); |
| | | $app->log("Executed command: $command ",LOGLEVEL_DEBUG); |
| | | */ |
| | | $groupinfo = posix_getgrnam($data['new']['pgroup']); |
| | | $app->system->usermod($data['old']['username'],0, $groupinfo[gid], $data['new']['dir'], $data['new']['shell'], $data['new']['password'], $data['new']['username']); |
| | | //$groupinfo = $app->system->posix_getgrnam($data['new']['pgroup']); |
| | | $app->system->usermod($data['old']['username'],0, $app->system->getgid($data['new']['pgroup']), $data['new']['dir'], $data['new']['shell'], $data['new']['password'], $data['new']['username']); |
| | | $app->log("Updated shelluser: ".$data['old']['username'],LOGLEVEL_DEBUG); |
| | | |
| | | // call the ssh-rsa update function |