Commit c6538449 authored by Till Brehm's avatar Till Brehm

Fixed: FS#3564 - shell users accounts are not removed.

parent 4f1e6a27
...@@ -231,7 +231,7 @@ class shelluser_base_plugin { ...@@ -231,7 +231,7 @@ class shelluser_base_plugin {
if($userid > $this->min_uid) { if($userid > $this->min_uid) {
// We delete only non jailkit users, jailkit users will be deleted by the jailkit plugin. // We delete only non jailkit users, jailkit users will be deleted by the jailkit plugin.
if ($data['old']['chroot'] != "jailkit") { if ($data['old']['chroot'] != "jailkit") {
$command = 'userdel -f'; $command = 'killall -u '.escapeshellcmd($data['old']['username']).' ; userdel -f';
$command .= ' '.escapeshellcmd($data['old']['username']).' &> /dev/null'; $command .= ' '.escapeshellcmd($data['old']['username']).' &> /dev/null';
exec($command); exec($command);
$app->log("Deleted shelluser: ".$data['old']['username'], LOGLEVEL_DEBUG); $app->log("Deleted shelluser: ".$data['old']['username'], LOGLEVEL_DEBUG);
......
...@@ -226,7 +226,7 @@ class shelluser_jailkit_plugin { ...@@ -226,7 +226,7 @@ class shelluser_jailkit_plugin {
$app->system->web_folder_protection($web['document_root'], false); $app->system->web_folder_protection($web['document_root'], false);
if(@is_dir($data['old']['dir'].$jailkit_chroot_userhome)) { if(@is_dir($data['old']['dir'].$jailkit_chroot_userhome)) {
$command = 'userdel -f'; $command = 'killall -u '.escapeshellcmd($data['old']['username']).' ; userdel -f';
$command .= ' '.escapeshellcmd($data['old']['username']).' &> /dev/null'; $command .= ' '.escapeshellcmd($data['old']['username']).' &> /dev/null';
exec($command); exec($command);
$app->log("Jailkit Plugin -> delete chroot home:".$data['old']['dir'].$jailkit_chroot_userhome, LOGLEVEL_DEBUG); $app->log("Jailkit Plugin -> delete chroot home:".$data['old']['dir'].$jailkit_chroot_userhome, LOGLEVEL_DEBUG);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment