| | |
| | | |
| | | var $plugin_name = 'shelluser_base_plugin'; |
| | | var $class_name = 'shelluser_base_plugin'; |
| | | var $min_uid = 499; |
| | | |
| | | //* This function is called during ispconfig installation to determine |
| | | // if a symlink shall be created for this plugin. |
| | | function onInstall() { |
| | | global $conf; |
| | | |
| | | if($conf['services']['web'] == true) { |
| | | return true; |
| | | } else { |
| | | return false; |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | /* |
| | |
| | | |
| | | // Get the UID of the parent user |
| | | $uid = intval($app->system->getuid($data['new']['puser'])); |
| | | if($uid > 999) { |
| | | if($uid > $this->min_uid) { |
| | | $command = 'useradd'; |
| | | $command .= ' --home '.escapeshellcmd($data['new']['dir']); |
| | | $command .= ' --gid '.escapeshellcmd($data['new']['pgroup']); |
| | |
| | | |
| | | // Get the UID of the parent user |
| | | $uid = intval($app->system->getuid($data['new']['puser'])); |
| | | if($uid > 999) { |
| | | if($uid > $this->min_uid) { |
| | | $command = 'usermod'; |
| | | $command .= ' --home '.escapeshellcmd($data['new']['dir']); |
| | | $command .= ' --gid '.escapeshellcmd($data['new']['pgroup']); |
| | | // $command .= ' --non-unique '; |
| | | $command .= ' --password '.escapeshellcmd($data['new']['password']); |
| | | $command .= ' --shell '.escapeshellcmd($data['new']['shell']); |
| | | if($data['new']['chroot'] != 'jailkit') $command .= ' --shell '.escapeshellcmd($data['new']['shell']); |
| | | // $command .= ' --uid '.escapeshellcmd($uid); |
| | | $command .= ' --login '.escapeshellcmd($data['new']['username']); |
| | | $command .= ' '.escapeshellcmd($data['old']['username']); |
| | |
| | | |
| | | // Get the UID of the user |
| | | $userid = intval($app->system->getuid($data['old']['username'])); |
| | | if($userid > 999) { |
| | | if($userid > $this->min_uid) { |
| | | $command = 'userdel'; |
| | | $command .= ' '.escapeshellcmd($data['old']['username']); |
| | | |