Skip to content

Commit 9e41c34

Browse files
committed
- Updated opensuse instructions.
- The home directory of a shell user gets deleted when the user is deleted.
1 parent a6628d4 commit 9e41c34

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

docs/INSTALL_OPENSUSE_11_1.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ The following guide is for the 32Bit version of openSUSE, for 64Bit installation
1212

1313
Install some basic packes and the compilers that we need later
1414

15-
yast2 -i findutils readline libgcc glibc-devel findutils-locate gcc flex lynx compat-readline4 db-devel wget gcc-c++ make vim telnet cron iptables iputils man man-pages
15+
yast2 -i findutils readline libgcc glibc-devel findutils-locate gcc flex lynx compat-readline4 db-devel wget gcc-c++ make vim telnet cron iptables iputils man man-pages nano pico
1616

1717
1) Istall Postfix, Courier, Saslauthd, MySQL, phpMyAdmin with the following command line (on one line!):
1818

install/dist/conf/opensuse110.conf.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@
145145
$conf['jailkit']['config_dir'] = '/etc/jailkit';
146146
$conf['jailkit']['jk_init'] = 'jk_init.ini';
147147
$conf['jailkit']['jk_chrootsh'] = 'jk_chrootsh.ini';
148-
$conf['jailkit']['jailkit_chroot_app_programs'] = '/usr/bin/groups /usr/bin/id /usr/bin/dircolors /usr/bin/lesspipe /usr/bin/basename /usr/bin/dirname /usr/bin/nano /usr/bin/pico';
148+
$conf['jailkit']['jailkit_chroot_app_programs'] = '/usr/bin/groups /usr/bin/id /usr/bin/dircolors /usr/bin/basename /usr/bin/dirname /usr/bin/nano /usr/bin/pico';
149149

150150

151151
?>

server/plugins-available/shelluser_base_plugin.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ function delete($event_name,$data) {
148148
// Get the UID of the user
149149
$userid = intval($app->system->getuid($data['old']['username']));
150150
if($userid > $this->min_uid) {
151-
$command = 'userdel --force';
151+
$command = 'userdel -f -r';
152152
$command .= ' '.escapeshellcmd($data['old']['username']);
153153

154154
exec($command);

server/plugins-available/shelluser_jailkit_plugin.inc.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,12 @@ function delete($event_name,$data) {
151151
//commented out proved to be dangerous on config errors
152152
//exec('rm -rf '.$data['old']['dir'].$jailkit_chroot_userhome);
153153

154-
155-
$app->log("Jailkit Plugin -> delete chroot home:".$data['old']['dir'].$jailkit_chroot_userhome,LOGLEVEL_DEBUG);
154+
if(@is_dir($data['old']['dir'].$jailkit_chroot_userhome)) {
155+
$command = 'userdel -f -r';
156+
$command .= ' '.escapeshellcmd($data['old']['username']);
157+
exec($command);
158+
$app->log("Jailkit Plugin -> delete chroot home:".$data['old']['dir'].$jailkit_chroot_userhome,LOGLEVEL_DEBUG);
159+
}
156160
}
157161

158162
$app->log("Jailkit Plugin -> delete username:".$data['old']['username'],LOGLEVEL_DEBUG);

0 commit comments

Comments
 (0)