From 437887f7cc8482aaf9a641ffc08694e4bea91f1a Mon Sep 17 00:00:00 2001 From: Till Brehm <tbrehm@ispconfig.org> Date: Thu, 30 Jun 2016 19:34:32 +0200 Subject: [PATCH] Fixed #3196 --- server/plugins-available/shelluser_jailkit_plugin.inc.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server/plugins-available/shelluser_jailkit_plugin.inc.php b/server/plugins-available/shelluser_jailkit_plugin.inc.php index 184a8ca69..16dbcc7a6 100755 --- a/server/plugins-available/shelluser_jailkit_plugin.inc.php +++ b/server/plugins-available/shelluser_jailkit_plugin.inc.php @@ -251,6 +251,9 @@ class shelluser_jailkit_plugin { $command .= 'userdel -f '.escapeshellcmd($data['old']['username']).' &> /dev/null'; exec($command); + // Remove the jailed user from passwd and shadow file inside the jail + $app->system->removeLine($data['old']['dir'].'/etc/passwd', $data['old']['username']); + $app->system->removeLine($data['old']['dir'].'/etc/shadow', $data['old']['username']); if(@is_dir($data['old']['dir'].$jailkit_chroot_userhome)) { $this->_delete_homedir($data['old']['dir'].$jailkit_chroot_userhome,$userid,$data['old']['parent_domain_id']); -- GitLab