Proftpd authentication via pam ??

Pagina: 1
Acties:
  • 116 views sinds 30-01-2008
  • Reageer

  • active2
  • Registratie: Juni 2001
  • Laatst online: 17-07 21:56

active2

Google is your friend

Topicstarter
Met de volgende directives in /etc/proftpd.conf zou de authenticatie van users via pam moet verlopen:
code:
1
2
3
AuthPAM on
AuthPAMAuthoritative on
AuthPAMConfig ftp


Maar naar mijn idee verloopt de authenticatie nog steeds niet via pam en dat doe ik na de volgende constatering:
code:
1
2
3
Sep  7 18:01:11 mdtwebserv proftpd[19970]: mdtwebserv (mdtwebserv[127.0.0.1]) - FTP session opened.
Sep  7 18:01:19 mdtwebserv proftpd[19970]: mdtwebserv (mdtwebserv[127.0.0.1]) - no such user 'mohlm000'
Sep  7 18:01:23 mdtwebserv proftpd[19970]: mdtwebserv (mdtwebserv[127.0.0.1]) - FTP session closed.


Wie kan mij helpen? Ik ben bijna ten einde raad! :(

Google, Het mirakel van de 21e eeuw!!!!


  • active2
  • Registratie: Juni 2001
  • Laatst online: 17-07 21:56

active2

Google is your friend

Topicstarter
Aangezien ik niet kan mijn post boven kan editen doe ik het maar in een reply:

Ik heb nu gevonden dat bij die PAM authenticatie ook LDAP moet in de proftpd.conf anders wil die niet met PAM aan de slag zie website: http://www.castaglia.org/...-guide/internals/PAM.html

Dus nu heb ik dit er in staan:
# 'proftpd.conf' for actual use. It establishes a single server
# and a single anonymous login. It assumes that you have a user/group
# "nobody" and "ftp" for normal operation and anon.

ServerName "ProFTPD FTP-server of www.mdt.nhl.nl"
ServerType standalone
DeferWelcome on
DefaultRoot ~
DefaultServer on
MultilineRFC2228 on
ShowSymlinks off
AllowOverwrite on
LDAPDoAuth on o=Noordelijke Hogeschool Leeuwarden "(&(uid=%u)(objectclass=posixAccount))"
LDAPServer ****.****.****:380
RootLogin off
RequireValidShell off
AllowForeignAddress on
AuthPAM on
AuthPAMAuthoritative off
AuthPAMConfig ftp
TimeoutNoTransfer 300
TimeoutStalled 300
TimeoutIdle 300

LsDefaultOptions "-alF"

# Port 21 is the standard FTP port.
Port 21
# Umask 022 is a good standard umask to prevent new dirs and files
# from being group and world writable.
Umask 022

# To prevent DoS attacks, set the maximum number of child processes
# to 30. If you need to allow more than 30 concurrent connections
# at once, simply increase this value. Note that this ONLY works
# in standalone mode, in inetd mode you should use an inetd server
# that allows you to limit maximum number of processes per service
# (such as xinetd)
MaxInstances 30
MaxClients 30

# Set the user and group that the server normally runs at.
User nobody
Group nogroup

# Normally, we want files to be overwriteable.
<Directory ~>
AllowOverwrite on
</Directory>
En nu krijg ik de volgende foutmelding:
code:
1
2
3
4
Sep  7 18:23:04 mdtwebserv proftpd[24317]: mdtwebserv (mdtwebserv[127.0.0.1]) - FTP session opened.
Sep  7 18:23:10 mdtwebserv proftpd[24317]: mdtwebserv (mdtwebserv[127.0.0.1]) - mod_ldap: pr_ldap_user_lookup(): ldap_search_st() failed: Bad search filter
Sep  7 18:23:10 mdtwebserv proftpd[24317]: mdtwebserv (mdtwebserv[127.0.0.1]) - no such user 'mohlm000'
Sep  7 18:23:11 mdtwebserv proftpd[24317]: mdtwebserv (mdtwebserv[127.0.0.1]) - FTP session closed.

Maar hoe moet dat search filter dan?

Google, Het mirakel van de 21e eeuw!!!!


Verwijderd

draait jouw ldap server op 380?
Je hebt LDAPDNInfo niet defined.

  • active2
  • Registratie: Juni 2001
  • Laatst online: 17-07 21:56

active2

Google is your friend

Topicstarter
yep die draait op poort 380 (ik heb hem overigens niet zelf opgezet hoor maar ik moet mijn proftpd er wel mee laten communiceren.

Wat moet er dan bij die LDAPNInfo staan?

Dat weet ik dus echt niet (ook niet na het lezen van de handleiding van deze directive)

Google, Het mirakel van de 21e eeuw!!!!


Verwijderd

LDAPDNInfo?
De LDAP DN Info; dus de login en passwd
cn=sysop,dc=aap,dc=nl wachtwoord
:) en de DN moet read access op de DB hebben voor de searches :)

  • MikeN
  • Registratie: April 2001
  • Laatst online: 22:25
Uh, mijn proftpd werkt via PAM. Dit is de config die ik gebruik:
# This is a basic ProFTPD configuration file (rename it to
# 'proftpd.conf' for actual use. It establishes a single server
# and a single anonymous login. It assumes that you have a user/group
# "nobody" and "ftp" for normal operation and anon.

ServerName "zeus.normi.net ProFTPD"
ServerType standalone
DefaultServer on

# Port 21 is the standard FTP port.
Port 21
# Umask 022 is a good standard umask to prevent new dirs and files
# from being group and world writable.
Umask 022

# Paths setten
ScoreboardPath /var/run
PidFile /var/run/proftpd.pid

#Timeouts instellen
TimeoutIdle 1200
TimeoutNoTransfer 600

# PAM aanzetten
AuthPAMAuthoritative yes

# To prevent DoS attacks, set the maximum number of child processes
# to 30. If you need to allow more than 30 concurrent connections
# at once, simply increase this value. Note that this ONLY works
# in standalone mode, in inetd mode you should use an inetd server
# that allows you to limit maximum number of processes per service
# (such as xinetd)
MaxInstances 30

# Set the user and group that the server normally runs at.
User nobody
Group nogroup

#Defaultroot instellen
Defaultroot ~

# Normally, we want files to be overwriteable.
<Directory /*>
AllowOverwrite on
</Directory>
De configure regel was gewoon:
./configure '--prefix=/usr' '--sysconfdir=/etc' '--localstatedir=/var'
LDAP heb ik al helemaal niets mee gedaan.

  • active2
  • Registratie: Juni 2001
  • Laatst online: 17-07 21:56

active2

Google is your friend

Topicstarter
Probleem is dat proftpd eerst gaat kijken of die username bestaat alvorens de authenticatie uit handen te geven aan pam.

Google, Het mirakel van de 21e eeuw!!!!


Verwijderd

Mike, hij heeft wel LDAP nodig. Dat zegt hij toch hierboven. Anders was het ook niet relevant dat hij een LDAP server heeft draaien waarmee hij communiceert.

Gebruik nou maar gewoon ProFTPd met LDAP. Dat is het makkelijkst. Dat is beter te configureren en efficienter dan PAM-LDAP en dan ProFTPd met PAM support.

Dus. LDAP support erin. Check /etc/ldap/slapd.conf voor de rootdn en rootpw en gebruik die 2 achter elkaar als LDAPDNInfo. Meer info @ http://www.horde.net/~jwm/software/mod_ldap check ook de voorbeelden etcetera. Debian heeft een package voor ProFTPd LDAP.
Pagina: 1