From a0cd40044a3917c40960b185a803a9e7a76ad972 Mon Sep 17 00:00:00 2001 From: Casper Bruun Date: Wed, 2 May 2018 15:27:07 +0200 Subject: [PATCH] Make default shell configurable --- add_user.php | 2 +- configs/config_example.php | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/add_user.php b/add_user.php index ee890a1..a9d351c 100644 --- a/add_user.php +++ b/add_user.php @@ -145,7 +145,7 @@ if (empty($infomsg)) { $ugid = ""; $ad_gid = array(); - $shell = "/bin/false"; + $shell = $cfg['default_shell']; } else { $ugid = $_REQUEST[$field_ugid]; $ad_gid = $_REQUEST[$field_ad_gid]; diff --git a/configs/config_example.php b/configs/config_example.php index bb6a8cf..33e4de0 100644 --- a/configs/config_example.php +++ b/configs/config_example.php @@ -41,6 +41,9 @@ $cfg['default_uid'] = ""; //if empty next incremental will be default $cfg['default_homedir'] = "/srv/ftp"; +// For sftp enabled servers install and use something like scponly or rssh shell +$cfg['default_shell'] = "/bin/false"; + // Use either SHA1 or MD5 or any other supported by your MySQL-Server and ProFTPd // "pbkdf2" is supported if you are using ProFTPd 1.3.5. // "crypt" uses the unix crypt() function.