| | |
| | | |
| | | exec($command); |
| | | $app->log("Added shelluser: ".$data['new']['username'],LOGLEVEL_DEBUG); |
| | | |
| | | //* Disable shell user temporarily if we use jailkit |
| | | if($data['new']['chroot'] == 'jailkit') { |
| | | $command = 'usermod -L '.escapeshellcmd($data['new']['username']); |
| | | exec($command); |
| | | $app->log("Disabling shelluser temporarily: ".$command,LOGLEVEL_DEBUG); |
| | | } |
| | | |
| | | } else { |
| | | $app->log("UID = $uid for shelluser:".$data['new']['username']." not allowed.",LOGLEVEL_ERROR); |
| | |
| | | // Get the UID of the user |
| | | $userid = intval($app->system->getuid($data['old']['username'])); |
| | | if($userid > $this->min_uid) { |
| | | $command = 'userdel'; |
| | | $command = 'userdel -f -r'; |
| | | $command .= ' '.escapeshellcmd($data['old']['username']); |
| | | |
| | | exec($command); |