Skip to content

Commit 437887f

Browse files
author
Till Brehm
committed
Fixed #3196
1 parent be08cde commit 437887f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

server/plugins-available/shelluser_jailkit_plugin.inc.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,9 @@ function delete($event_name, $data) {
251251
$command .= 'userdel -f '.escapeshellcmd($data['old']['username']).' &> /dev/null';
252252
exec($command);
253253

254+
// Remove the jailed user from passwd and shadow file inside the jail
255+
$app->system->removeLine($data['old']['dir'].'/etc/passwd', $data['old']['username']);
256+
$app->system->removeLine($data['old']['dir'].'/etc/shadow', $data['old']['username']);
254257

255258
if(@is_dir($data['old']['dir'].$jailkit_chroot_userhome)) {
256259
$this->_delete_homedir($data['old']['dir'].$jailkit_chroot_userhome,$userid,$data['old']['parent_domain_id']);

0 commit comments

Comments
 (0)