aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-03-06 20:25:23 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-03-06 20:25:23 +0000
commit434bfc6b78f12200f486f0b5e78eb56fdd7095c2 (patch)
tree67d66f0defc0d655fefc816addcf4c21489273be /packages
parent73ceecc7867df67ed7a7f57d9849205883c48cf0 (diff)
downloadpfsense-packages-434bfc6b78f12200f486f0b5e78eb56fdd7095c2.tar.gz
pfsense-packages-434bfc6b78f12200f486f0b5e78eb56fdd7095c2.tar.bz2
pfsense-packages-434bfc6b78f12200f486f0b5e78eb56fdd7095c2.zip
Set users shell to /nonexistant after account creation.
Diffstat (limited to 'packages')
-rw-r--r--packages/pure-ftpd.xml4
1 files changed, 3 insertions, 1 deletions
diff --git a/packages/pure-ftpd.xml b/packages/pure-ftpd.xml
index 5ff852d4..6ec75f55 100644
--- a/packages/pure-ftpd.xml
+++ b/packages/pure-ftpd.xml
@@ -4,6 +4,7 @@
<version>1.0.20_1</version>
<title>Services: PureFTPD Accounts</title>
<!-- Menu is where this packages menu will appear -->
+ <aftersaveredirect>pkg_edit.php?xml=pure-ftpd.xml&amp;id=1</aftersaveredirect>
<menu>
<name>Pure FTPD Accounts</name>
<tooltiptext>Pure FTPd Server is a fast, production quality, standards-conformant FTP server based on Troll-FTPd. It has no known vulnerability, it is trivial to set up, and it is especially designed for modern kernels. Features include PAM support, IPv6, chroot()ed home directories, virtual domains, built-in 'ls', FXP protocol, anti-warez system, bandwidth throttling, restricted ports for passive downloads, an LDAP backend, XML output, and more.</tooltiptext>
@@ -80,12 +81,13 @@
config_lock();
$expires = "";
if($_POST['expiration']) $expires = " -e " . $_POST['expiration'];
- mwexec("/usr/sbin/pw useradd " . $_POST['username'] . $expires . " -m -k /home/ " . $_POST['username'] . " -s ftp");
+ mwexec("/usr/sbin/pw useradd " . $_POST['username'] . $expires . " -m -k /home/ " . $_POST['username'] . " -s \"/usr/sbin/nologin\"");
$fd = popen("/usr/sbin/pw usermod -n " . $_POST['username'] . " -H 0", "w");
$salt = md5(time());
$crypted_pw = crypt($_POST['password'],$salt);
fwrite($fd, $crypted_pw);
pclose($fd);
+ mwexec("/usr/sbin/pw usermod " . $_POST['username'] . " -s /nonexistent");
conf_mount_ro();
config_unlock();
$savemsg = "User has been added.";