martinfst
12th January 2007, 12:41
Just figured that regular users are created by ISPConfig with a default shell of /dev/null. Unfortunately, this is invalid on Debian based systems, as the shell has to be an executable program/script. The most easy way I believe is to change the shell to /bin/false.
Looking at ISPConfig 2.2.9, I think the only place to modify this is in /root/ispconfig/scripts/lib/classes/ispconfig_system.lib.php and change the in function deactivateuser (lines 115 - 125) the shell, so the script will now look like:function deactivateuser($user_username){
$passwort = str_rot13($this->getpasswd($user_username));
$user_attr = $this->get_user_attributes($user_username);
$uid = $user_attr["uid"];
$gid = $user_attr["gid"];
$username = $user_attr["name"];
$homedir = $user_attr["homedir"];
$shell = "/bin/false"; // <======= Change this line
$this->deluser($user_username);
$this->adduser($user_username, $uid, $gid, $username, $homedir, $shell, $passwort);
}
I believe this will work for any Linux distribution.
Looking at ISPConfig 2.2.9, I think the only place to modify this is in /root/ispconfig/scripts/lib/classes/ispconfig_system.lib.php and change the in function deactivateuser (lines 115 - 125) the shell, so the script will now look like:function deactivateuser($user_username){
$passwort = str_rot13($this->getpasswd($user_username));
$user_attr = $this->get_user_attributes($user_username);
$uid = $user_attr["uid"];
$gid = $user_attr["gid"];
$username = $user_attr["name"];
$homedir = $user_attr["homedir"];
$shell = "/bin/false"; // <======= Change this line
$this->deluser($user_username);
$this->adduser($user_username, $uid, $gid, $username, $homedir, $shell, $passwort);
}
I believe this will work for any Linux distribution.