diff --git a/CHANGELOG.md b/CHANGELOG.md index 7bb4aaa2..bfbe297a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,8 @@ The **patch** part changes incrementally at each release. * mysql-oracle: new role to install MySQL 5.7 with Oracle packages * packweb-apache: choose mysql variant (default: `debian`) * haproxy: install Munin plugins +* proftpd: use proftpd_accounts list for manage ftp accounts + ### Changed * elasticsearch: use ES_TMPDIR variable for custom tmpdir, (from `/etc/default/elasticsearch` instead of changing `/etc/elesticsearch/jvm.options`). diff --git a/proftpd/README.md b/proftpd/README.md index 1fcb4910..dae8abef 100644 --- a/proftpd/README.md +++ b/proftpd/README.md @@ -16,3 +16,30 @@ Main variables are : * `proftpd_port` : port for the control socket (default: `21`) The full list of variables (with default values) can be found in `defaults/main.yml`. + +## Accounts management + +Proftpd accounts can be maintened with the `proftpd_accounts` var, it can be set in inventory/host_vars/inventory_hostname : + +~~~ +proftpd_accounts: +- { name: 'ftp1', home: '/srv/data/ftp1', uid: 116, gid: 65534 } +- { name: 'ftp2', home: '/srv/data/ftp2', uid: 116, gid: 65534 } +~~~ + +The password will be randomly generated and printed to the screen the first time you run the task. + +You can force is value by set the `password` field with the hashed version of your password. + +eg. for "test" password hashed with sha512 : + +~~~ +proftpd_accounts: +- { name: 'ftp1', home: '/srv/data/ftp1', uid: 116, gid: 65534, password: '$6$/Yy0b0No3GWh$3ZY1GZFI25eyQDBrANyHw.NFPqPqdg6sCi89nM/aNitmESZ2jGfROveS5xowy.WjX9tMC7.KPoabKPyxOpBJY0' } +~~~ + +For generate the sha512 version of yours password : + +~~~ +echo "test" | mkpasswd --method=sha-512 - +~~~