Skip to content

Commit af1c095

Browse files
committed
Changed min userid from 999 to 499 to better support redhat based distributions.
1 parent cf8190f commit af1c095

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

server/plugins-available/shelluser_base_plugin.inc.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ class shelluser_base_plugin {
3232

3333
var $plugin_name = 'shelluser_base_plugin';
3434
var $class_name = 'shelluser_base_plugin';
35+
var $min_uid = 499;
3536

3637
//* This function is called during ispconfig installation to determine
3738
// if a symlink shall be created for this plugin.
@@ -73,7 +74,7 @@ function insert($event_name,$data) {
7374

7475
// Get the UID of the parent user
7576
$uid = intval($app->system->getuid($data['new']['puser']));
76-
if($uid > 999) {
77+
if($uid > $this->min_uid) {
7778
$command = 'useradd';
7879
$command .= ' --home '.escapeshellcmd($data['new']['dir']);
7980
$command .= ' --gid '.escapeshellcmd($data['new']['pgroup']);
@@ -98,7 +99,7 @@ function update($event_name,$data) {
9899

99100
// Get the UID of the parent user
100101
$uid = intval($app->system->getuid($data['new']['puser']));
101-
if($uid > 999) {
102+
if($uid > $this->min_uid) {
102103
$command = 'usermod';
103104
$command .= ' --home '.escapeshellcmd($data['new']['dir']);
104105
$command .= ' --gid '.escapeshellcmd($data['new']['pgroup']);

0 commit comments

Comments
 (0)