Mijn vraag
ProFTPd + Windows AD (LDAP) - users kunnen niet aanmelden
Relevante software en hardware die ik gebruik
- Debian 10
- Proftpd-basic
- Proftpd-mod-auth
Wat ik al gevonden of geprobeerd heb:
Logging gecontroleerd: https://pastebin.com/V5ctygHh
Gebruikte tutorial: https://warlord0blog.word...nd-ldap-active-directory/
Idee is dat iedereen die lid is van "FTP-users" toegang tot de FTP heeft. (iedereen heeft een personal login, maar kan wel nagenoeg overal bij).
Settings aangepast naar diverse varianten.
ProFTPd + Windows AD (LDAP) - users kunnen niet aanmelden
Relevante software en hardware die ik gebruik
- Debian 10
- Proftpd-basic
- Proftpd-mod-auth
Wat ik al gevonden of geprobeerd heb:
Logging gecontroleerd: https://pastebin.com/V5ctygHh
Gebruikte tutorial: https://warlord0blog.word...nd-ldap-active-directory/
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
| 2020-01-08 22:37:34,021 mod_ldap/2.9.4[500]: generated filter OU=ad-domain-name-Users,DC=corp,DC=ad-domain-name,DC=xyz from template OU=ad-domain-name-Users,DC=corp,DC=ad-domain-name,DC=xyz and value ftp-user 2020-01-08 22:37:34,021 mod_ldap/2.9.4[500]: generated filter (&(objectClass=user)(sAMAccountName=ftp-user)) from template (&(objectClass=user)(sAMAccountName=%u)) and value ftp-user 2020-01-08 22:37:34,021 mod_ldap/2.9.4[500]: parsed 'ldap://a.b.c.d/??sub' as 'ldap://a.b.c.d:389/??sub' 2020-01-08 22:37:34,021 mod_ldap/2.9.4[500]: attempting connection to URL ldap://a.b.c.d/??sub 2020-01-08 22:37:34,026 mod_ldap/2.9.4[500]: set LDAP protocol version to 3 2020-01-08 22:37:34,026 mod_ldap/2.9.4[500]: connected to URL ldap://a.b.c.d/??sub 2020-01-08 22:37:34,029 mod_ldap/2.9.4[500]: successfully bound as DN 'CN=read-only user,CN=Users,DC=corp,DC=ad-domain-name,DC=xyz' with password (see config) 2020-01-08 22:37:34,030 mod_ldap/2.9.4[500]: set dereferencing to 0 2020-01-08 22:37:34,030 mod_ldap/2.9.4[500]: set query timeout to 5 secs 2020-01-08 22:37:34,031 mod_ldap/2.9.4[500]: searched under base DN OU=ad-domain-name-Users,DC=corp,DC=ad-domain-name,DC=xyz using filter (&(objectClass=user)(sAMAccountName=ftp-user)) 2020-01-08 22:37:34,031 mod_ldap/2.9.4[500]: fetching values for attribute sAMAccountName 2020-01-08 22:37:34,031 mod_ldap/2.9.4[500]: fetching values for attribute uidNumber 2020-01-08 22:37:34,031 mod_ldap/2.9.4[500]: fetching values for attribute gidNumber 2020-01-08 22:37:34,031 mod_ldap/2.9.4[500]: no values for attribute gidNumber, trying defaults 2020-01-08 22:37:34,031 mod_ldap/2.9.4[500]: using LDAPDefaultGID 100 2020-01-08 22:37:34,031 mod_ldap/2.9.4[500]: fetching values for attribute homeDirectory 2020-01-08 22:37:34,031 mod_ldap/2.9.4[500]: no values for attribute homeDirectory, trying defaults 2020-01-08 22:37:34,031 mod_ldap/2.9.4[500]: no homeDirectory attribute for DN CN=FTP USER,OU=ad-domain-name-Users,DC=corp,DC=ad-domain-name,DC=xyz, LDAPGenerateHomedir not enabled 2020-01-08 22:37:34,035 mod_ldap/2.9.4[500]: generated filter OU=ad-domain-name-Users,DC=corp,DC=ad-domain-name,DC=xyz from template OU=ad-domain-name-Users,DC=corp,DC=ad-domain-name,DC=xyz and value ftp-user 2020-01-08 22:37:34,035 mod_ldap/2.9.4[500]: generated filter (&(objectClass=user)(sAMAccountName=ftp-user)) from template (&(objectClass=user)(sAMAccountName=%u)) and value ftp-user 2020-01-08 22:37:34,035 mod_ldap/2.9.4[500]: parsed 'ldap://a.b.c.d/??sub' as 'ldap://a.b.c.d:389/??sub' 2020-01-08 22:37:34,035 mod_ldap/2.9.4[500]: attempting connection to URL ldap://a.b.c.d/??sub 2020-01-08 22:37:34,035 mod_ldap/2.9.4[500]: set LDAP protocol version to 3 2020-01-08 22:37:34,035 mod_ldap/2.9.4[500]: connected to URL ldap://a.b.c.d/??sub 2020-01-08 22:37:34,038 mod_ldap/2.9.4[500]: successfully bound as DN 'CN=read-only user,CN=Users,DC=corp,DC=ad-domain-name,DC=xyz' with password (see config) 2020-01-08 22:37:34,038 mod_ldap/2.9.4[500]: set dereferencing to 0 2020-01-08 22:37:34,038 mod_ldap/2.9.4[500]: set query timeout to 5 secs 2020-01-08 22:37:34,039 mod_ldap/2.9.4[500]: searched under base DN OU=ad-domain-name-Users,DC=corp,DC=ad-domain-name,DC=xyz using filter (&(objectClass=user)(sAMAccountName=ftp-user)) 2020-01-08 22:37:34,039 mod_ldap/2.9.4[500]: fetching values for attribute sAMAccountName 2020-01-08 22:37:34,039 mod_ldap/2.9.4[500]: fetching values for attribute uidNumber 2020-01-08 22:37:34,039 mod_ldap/2.9.4[500]: fetching values for attribute gidNumber 2020-01-08 22:37:34,039 mod_ldap/2.9.4[500]: no values for attribute gidNumber, trying defaults 2020-01-08 22:37:34,039 mod_ldap/2.9.4[500]: using LDAPDefaultGID 100 2020-01-08 22:37:34,039 mod_ldap/2.9.4[500]: fetching values for attribute homeDirectory 2020-01-08 22:37:34,039 mod_ldap/2.9.4[500]: no values for attribute homeDirectory, trying defaults 2020-01-08 22:37:34,039 mod_ldap/2.9.4[500]: no homeDirectory attribute for DN CN=FTP USER,OU=ad-domain-name-Users,DC=corp,DC=ad-domain-name,DC=xyz, LDAPGenerateHomedir not enabled 2020-01-09 11:12:57,545 mod_ldap/2.9.4[682]: generated filter OU=ad-domain-name-Users,DC=corp,DC=ad-domain-name,DC=xyz from template OU=ad-domain-name-Users,DC=corp,DC=ad-domain-name,DC=xyz and value ftp-user 2020-01-09 11:12:57,545 mod_ldap/2.9.4[682]: generated filter (&(objectClass=user)(sAMAccountName=ftp-user)) from template (&(objectClass=user)(sAMAccountName=%u)) and value ftp-user 2020-01-09 11:12:57,545 mod_ldap/2.9.4[682]: parsed 'ldap://a.b.c.d/??sub' as 'ldap://a.b.c.d:389/??sub' 2020-01-09 11:12:57,545 mod_ldap/2.9.4[682]: attempting connection to URL ldap://a.b.c.d/??sub 2020-01-09 11:12:57,570 mod_ldap/2.9.4[682]: set LDAP protocol version to 3 2020-01-09 11:12:57,570 mod_ldap/2.9.4[682]: connected to URL ldap://a.b.c.d/??sub 2020-01-09 11:12:57,573 mod_ldap/2.9.4[682]: successfully bound as DN 'CN=read-only user,CN=Users,DC=corp,DC=ad-domain-name,DC=xyz' with password (see config) 2020-01-09 11:12:57,574 mod_ldap/2.9.4[682]: set dereferencing to 0 2020-01-09 11:12:57,574 mod_ldap/2.9.4[682]: set query timeout to 5 secs 2020-01-09 11:12:57,575 mod_ldap/2.9.4[682]: searched under base DN OU=ad-domain-name-Users,DC=corp,DC=ad-domain-name,DC=xyz using filter (&(objectClass=user)(sAMAccountName=ftp-user)) 2020-01-09 11:12:57,575 mod_ldap/2.9.4[682]: fetching values for attribute sAMAccountName 2020-01-09 11:12:57,575 mod_ldap/2.9.4[682]: fetching values for attribute uidNumber 2020-01-09 11:12:57,575 mod_ldap/2.9.4[682]: fetching values for attribute gidNumber 2020-01-09 11:12:57,575 mod_ldap/2.9.4[682]: no values for attribute gidNumber, trying defaults 2020-01-09 11:12:57,575 mod_ldap/2.9.4[682]: using LDAPDefaultGID 100 2020-01-09 11:12:57,575 mod_ldap/2.9.4[682]: fetching values for attribute homeDirectory 2020-01-09 11:12:57,575 mod_ldap/2.9.4[682]: no values for attribute homeDirectory, trying defaults 2020-01-09 11:12:57,575 mod_ldap/2.9.4[682]: no homeDirectory attribute for DN CN=FTP USER,OU=ad-domain-name-Users,DC=corp,DC=ad-domain-name,DC=xyz, LDAPGenerateHomedir not enabled 2020-01-09 11:12:57,577 mod_ldap/2.9.4[682]: generated filter OU=ad-domain-name-Users,DC=corp,DC=ad-domain-name,DC=xyz from template OU=ad-domain-name-Users,DC=corp,DC=ad-domain-name,DC=xyz and value ftp-user 2020-01-09 11:12:57,577 mod_ldap/2.9.4[682]: generated filter (&(objectClass=user)(sAMAccountName=ftp-user)) from template (&(objectClass=user)(sAMAccountName=%u)) and value ftp-user 2020-01-09 11:12:57,577 mod_ldap/2.9.4[682]: parsed 'ldap://a.b.c.d/??sub' as 'ldap://a.b.c.d:389/??sub' 2020-01-09 11:12:57,577 mod_ldap/2.9.4[682]: attempting connection to URL ldap://a.b.c.d/??sub 2020-01-09 11:12:57,577 mod_ldap/2.9.4[682]: set LDAP protocol version to 3 2020-01-09 11:12:57,577 mod_ldap/2.9.4[682]: connected to URL ldap://a.b.c.d/??sub 2020-01-09 11:12:57,580 mod_ldap/2.9.4[682]: successfully bound as DN 'CN=read-only user,CN=Users,DC=corp,DC=ad-domain-name,DC=xyz' with password (see config) 2020-01-09 11:12:57,580 mod_ldap/2.9.4[682]: set dereferencing to 0 2020-01-09 11:12:57,580 mod_ldap/2.9.4[682]: set query timeout to 5 secs 2020-01-09 11:12:57,581 mod_ldap/2.9.4[682]: searched under base DN OU=ad-domain-name-Users,DC=corp,DC=ad-domain-name,DC=xyz using filter (&(objectClass=user)(sAMAccountName=ftp-user)) 2020-01-09 11:12:57,581 mod_ldap/2.9.4[682]: fetching values for attribute sAMAccountName 2020-01-09 11:12:57,581 mod_ldap/2.9.4[682]: fetching values for attribute uidNumber 2020-01-09 11:12:57,581 mod_ldap/2.9.4[682]: fetching values for attribute gidNumber 2020-01-09 11:12:57,581 mod_ldap/2.9.4[682]: no values for attribute gidNumber, trying defaults 2020-01-09 11:12:57,581 mod_ldap/2.9.4[682]: using LDAPDefaultGID 100 2020-01-09 11:12:57,581 mod_ldap/2.9.4[682]: fetching values for attribute homeDirectory 2020-01-09 11:12:57,581 mod_ldap/2.9.4[682]: no values for attribute homeDirectory, trying defaults 2020-01-09 11:12:57,581 mod_ldap/2.9.4[682]: no homeDirectory attribute for DN CN=FTP USER,OU=ad-domain-name-Users,DC=corp,DC=ad-domain-name,DC=xyz, LDAPGenerateHomedir not enabled |
Idee is dat iedereen die lid is van "FTP-users" toegang tot de FTP heeft. (iedereen heeft een personal login, maar kan wel nagenoeg overal bij).
Settings aangepast naar diverse varianten.
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
| # # Proftpd sample configuration for LDAP authentication. # # (This is not to be used if you prefer a PAM-based LDAP authentication) # <IfModule mod_ldap.c> LDAPUseTLS off LDAPServer ldap://a.b.c.d/??sub LDAPBindDN "CN=read-only user,CN=Users,DC=corp,DC=Domain,DC=xyz" "Y*vjh%#ne2K#tmb45D3%AHSDx" #LDAPUsers "ou=FTP Users,dc=domain,dc=local" (&(objectClass=user)(sAMAccountName=%u)) (&(objectClass=user)(uid=%v)) #CN=Users,DC=corp,DC=Domain,DC=xyz #LDAPUsers "CN=Users,DC=corp,DC=Domain,DC=xyz" (&(objectClass=user)(sAMAccountName=%u)) (&(objectClass=user)(uid=%v)) LDAPUsers "OU=Domain-Users,DC=corp,DC=Domain,DC=xyz" (&(objectClass=user)(sAMAccountName=%u)) (&(objectClass=user)(uid=%v)) LDAPDoAuth on "OU=Domain-Users,DC=corp,DC=Domain,DC=xyz" (&(sAMAccountName=%v)(objectclass=User)) #OU=Domain-Users,DC=corp,DC=Domain,DC=xyz LDAPLog /var/log/mod_ldap.log LDAPDefaultGID 100 # users group LDAPForceDefaultGid on LDAPGenerateHomedir off LDAPAttr uid sAMAccountName #LDAPAttr homeDirectory unixHomeDirectory # # This is used for ordinary LDAP connections, with or without TLS # #LDAPServer ldap://ldap.example.com #LDAPBindDN "cn=admin,dc=example,dc=com" "admin_password" #LDAPUsers dc=users,dc=example,dc=com (uid=%u) (uidNumber=%u) # # To be set on only for LDAP/TLS on ordinary port, for LDAP+SSL see below #LDAPUseTLS on # # # This is used for encrypted LDAPS connections # #LDAPServer ldaps://ldap.example.com #LDAPBindDN "cn=admin,dc=example,dc=com" "admin_password" #LDAPUsers dc=users,dc=example,dc=com (uid=%u) (uidNumber=%u) # </IfModule> |
[ Voor 80% gewijzigd door Dutch2007 op 11-01-2020 00:10 ]