@@ -46,24 +46,49 @@ defaults) and start `pure-ftpd` as a stand alone daemon.
46
46
passiveportrange => '49999:59999',
47
47
}
48
48
config_ldap => {
49
- $ ldapserver => 'ldap.example.com',
50
- $ ldapauthmethod => 'PASSWORD',
51
- $ ldapport => '389',
52
- $ ldapbinddn => 'cn=Manager,dc=c9x,dc=org',
53
- $ ldapbindpw => 'r00tPaSsw0rD',
54
- $ ldapbasedn => 'cn=Users,dc=c9x,dc=org',
55
- $ ldapfilter => '(&(objectClass=posixAccount)(uid=\L))',
56
- $ ldaphomedir => 'homeDirectory',
57
- $ ldapversion => '3',
58
- $ ldapdefaultuid => '100',
59
- $ ldapdefaultgid => '100',
60
- $ ldapdefaultgid => '100',
61
- $ ldapusetls => 'False',
62
- $ ldapauthmethod => 'PASSWORD',
49
+ ldapserver => 'ldap.example.com',
50
+ ldapauthmethod => 'PASSWORD',
51
+ ldapport => '389',
52
+ ldapbinddn => 'cn=Manager,dc=c9x,dc=org',
53
+ ldapbindpw => 'r00tPaSsw0rD',
54
+ ldapbasedn => 'cn=Users,dc=c9x,dc=org',
55
+ ldapfilter => '(&(objectClass=posixAccount)(uid=\L))',
56
+ ldaphomedir => 'homeDirectory',
57
+ ldapversion => '3',
58
+ ldapdefaultuid => '100',
59
+ ldapdefaultgid => '100',
60
+ ldapdefaultgid => '100',
61
+ ldapusetls => 'False',
62
+ ldapauthmethod => 'PASSWORD',
63
63
}
64
64
}
65
65
66
- ### TODO
67
- - add a configuration switch for the pem certificate file, in case TLS is used
68
- - Implement configuration variables for postgresql-based authentication
69
- - Implement configuration variables for MySQL-based authentication
66
+ ### Enabling PGSQL authentication
67
+
68
+ class { 'pureftpd':
69
+ use_selinux => true,
70
+ config => {
71
+ ipv4only => 'Yes',
72
+ passiveportrange => '49999:59999',
73
+ }
74
+ config_pgsql => {
75
+ pgsqlserver => 'localhost',
76
+ pgsqlport => '5432',
77
+ pgsqluser => 'postgres',
78
+ pgsqlpassword => 'rootpw',
79
+ pgsqldatabase => 'pureftpd',
80
+ pgsqlcrypt => 'cleartext',
81
+ pgsqlgetpw => 'SELECT Password FROM users WHERE User=\'\L\'',
82
+ pgsqlgetuid => 'SELECT Uid FROM users WHERE User=\'\L\'',
83
+ pgsqldefaultuid => '1000',
84
+ pgsqlgetgid => 'SELECT Gid FROM users WHERE User=\'\L\'',
85
+ pgsqldefaultgid => '1000',
86
+ pgsqlgetdir => 'SELECT Dir FROM users WHERE User=\'\L\'',
87
+ pgsqlgetqtafs => 'SELECT QuotaFiles FROM users WHERE User=\'\L\'',
88
+ pgsqlgetqtasz => 'SELECT QuotaSize FROM users WHERE User=\'\L\'',
89
+ pgsqlgetratioul => 'SELECT ULRatio FROM users WHERE User=\'\L\'',
90
+ pgsqlgetratiodl => 'SELECT DLRatio FROM users WHERE User=\'\L\'',
91
+ pgsqlgetbandwidthul => 'SELECT ULBandwidth FROM users WHERE User=\'\L\'',
92
+ pgsqlgetbandwidthdl => 'SELECT DLBandwidth FROM users WHERE User=\'\L\'',
93
+ }
94
+ }
0 commit comments