www.ProFTPD.de
13. März 2007, 19:22:11 *
Willkommen Gast. Bitte einloggen oder registrieren.
Haben Sie Ihre Aktivierungs E-Mail übersehen?

Einloggen mit Benutzername, Passwort und Sitzungslänge
News: SMF - Neu installiert!
 
   Übersicht   Hilfe Suche Login Registrieren  
Seiten: [1] 2   Nach unten
  Drucken  
Autor Thema: mod_mysql und Authentifizierung  (Gelesen 749 mal)
0 Mitglieder und 1 Gast betrachten dieses Thema.
BigMichi1
ProFTPD
*
Offline Offline

Beiträge: 10


Profil anzeigen WWW
« am: 23. August 2004, 13:56:10 »

Hallo,

habe folgendes  Problem: Ich habe meine ganzen FTP-User in der MySQL-Db angelgt mit den entsprechenden Berechtigungen und Quotas. Doch nun könne sich immer noch die Benutzer vom lokalem System am FTP anmelden. Wie kann ich das verhindern?
Mein MySQL-Abschnitt in der conf:
Code:

SQLAuthTypes Plaintext
SQLAuthenticate users*
SQLConnectInfo SQLDB@SQLSERVER SQLUSER SQLPASS
SQLDefaultGID 65534
SQLDefaultUID 65534
SQLMinUserGID 80
SQLMinUserUID 5000
SQLUserInfo users username password uid gid homedir shell


laut der Beschreibung müsste der * hinter users ja sagen das nur die von der DB genutzt werden oder irre ich mich da?
Gespeichert
stonki
Administrator
ProFTPD
*****
Offline Offline

Beiträge: 1853


15318939
Profil anzeigen WWW E-Mail
« Antwort #1 am: 23. August 2004, 14:09:34 »

Du hast recht. Laeuft denn ProFTPD ?  ProFTPD neu gestartet ? (Anmerkung: proftpd restart etc. GIBT ES NICHT).

cu
stonki
Gespeichert

www.stonki.de:    the more I see, the more I know.......
www.proftpd.de:   Deutsche ProFTPD Dokumentation
www.krename.net:  Der Batch Renamer für KDE
www.kbarcode.net: Die Barcode Solution für KDE
Anonymous
Gast
« Antwort #2 am: 23. August 2004, 14:34:25 »

hab auch schon zwischendurch rebooted auch nix gebracht.
Gespeichert
BigMichi1
ProFTPD
*
Offline Offline

Beiträge: 10


Profil anzeigen WWW
« Antwort #3 am: 23. August 2004, 14:35:09 »

mist vergessen einzuloggen
Gespeichert
stonki
Administrator
ProFTPD
*****
Offline Offline

Beiträge: 1853


15318939
Profil anzeigen WWW E-Mail
« Antwort #4 am: 23. August 2004, 15:26:05 »

complete config bitte posten, debug log waere nett. Ausserdem: Bist Du sicher, das Du DIE RICHTIGE config bearbeitest ?
Gespeichert

www.stonki.de:    the more I see, the more I know.......
www.proftpd.de:   Deutsche ProFTPD Dokumentation
www.krename.net:  Der Batch Renamer für KDE
www.kbarcode.net: Die Barcode Solution für KDE
BigMichi1
ProFTPD
*
Offline Offline

Beiträge: 10


Profil anzeigen WWW
« Antwort #5 am: 23. August 2004, 15:50:21 »

conf:
Code:

# (C) www.proftpd.de
# updated 2003-05-12
# by Stonki
 
ServerName "bigmichi1.dyndns.org"
ServerType standalone
ServerAdmin webmaster@bigmichi1.dyndns.org
 
 
ServerIdent on "FTP is running"
DeferWelcome on
DefaultServer on
Port 21
Umask 026
MaxInstances 30

DisplayLogin .login_message
 
# Normally, we want files to be overwriteable.
<Directory />
AllowOverwrite on
</Directory>
 
#
# FXP Unterstuetzung
#
AllowForeignAddress on
 
# Maximal Werte setzen
MaxClientsPerHost 2 "Nicht mehr als %m Verbindungen"
MaxClients 3 "Leider sind schon %m Clients verbunden"
MaxLoginAttempts 3
 
 
#
# Restart erlauben
#
AllowStoreRestart on
AllowRetrieveRestart on
 
#
# Jail all users into their virtual home dir
#
DefaultRoot ~
 
RequireValidShell off

PathDenyFilter "(\\.login_message)"
 
#
# Logging options
#
TransferLog /var/log/proftpd.xferlog
 
# Some logging formats
#
LogFormat default "%h %l %u %t \"%r\" %s %b"
LogFormat auth "%v [%P] %h %t \"%r\" %s"
LogFormat write "%h %l %u %t \"%r\" %s %b"
 
# Log file/dir access
ExtendedLog /var/log/proftpd.access_log WRITE,READ write
 
# Record all logins
ExtendedLog /var/log/proftpd.auth_log AUTH auth
 
# Paranoia logging level....
ExtendedLog /var/log/proftpd.paranoid_log ALL default
 
 
 
#------------------------mysql Modul: 4.x
#
# Zugangskontrolle
#
SQLAuthTypes Plaintext
SQLAuthenticate users*
SQLConnectInfo SQLDB@SQLSERVER SQLUSER SQLPASS
SQLDefaultGID 65534
SQLDefaultUID 65534
SQLMinUserGID 80
SQLMinUserUID 5000
SQLUserInfo users username password uid gid homedir shell
 
#
# aktive SQL Kommandos, ab hier passiert etwas :-)
#
SQLLog PASS                 counter
SQLNamedQuery               counter UPDATE "letzter_zugriff=now(), count=count+1 WHERE username='%u'" users

#
# verschiedene Counter für die users-Tabelle
#
SQLLog RETR                 dlbytescount
SQLNamedQuery               dlbytescount UPDATE "dl_bytes=dl_bytes+%b WHERE username='%u'" users
SQLLog RETR                 dlcount
SQLNamedQuery               dlcount UPDATE "dl_count=dl_count+1 WHERE username='%u'" users
SQLLog STOR                 ulbytescount
SQLNamedQuery               ulbytescount UPDATE "ul_bytes=ul_bytes+%b WHERE username='%u'" users
SQLLog STOR                 ulcount
SQLNamedQuery               ulcount UPDATE "ul_count=ul_count+1 WHERE username='%u'" users

 
# xfer Log in mysql
SQLLog RETR,STOR    transfer1
SQLNamedQuery               transfer1 INSERT "'%u', '%f', '%b', '%h', '%a', '%m', '%T',now(), 'c', NULL" xfer_stat
SQLLOG ERR_RETR,ERR_STOR    transfer2
SQLNamedQuery               transfer2 INSERT "'%u', '%f', '%b', '%h', '%a', '%m', '%T',now(), 'i', NULL" xfer_stat

#
# mod_quota tab
#
QuotaEngine on
QuotaShowQuotas on
QuotaDisplayUnits "Mb"

QuotaLimitTable sql:/get-quota-limit
QuotaTallyTable sql:/get-quota-tally/update-quota-tally/insert-quota-tally
 
SQLNamedQuery get-quota-limit SELECT "name, quota_type, per_session,limit_type, bytes_in_avail, bytes_out_avail, bytes_xfer_avail, files_in_avail, files_out_avail, files_xfer_avail FROM quotalimits WHERE name = '%{0}' AND quota_type = '%{1}'"
SQLNamedQuery get-quota-tally SELECT "name, quota_type, bytes_in_used, bytes_out_used, bytes_xfer_used, files_in_used, files_out_used, files_xfer_used FROM quotatallies WHERE name = '%{0}' AND quota_type = '%{1}'"
SQLNamedQuery update-quota-tally UPDATE "bytes_in_used = bytes_in_used + %{0}, bytes_out_used = bytes_out_used + %{1}, bytes_xfer_used = bytes_xfer_used + %{2}, files_in_used = files_in_used + %{3}, files_out_used = files_out_used + %{4}, files_xfer_used = files_xfer_used + %{5} WHERE name = '%{6}' AND quota_type = '%{7}'" quotatallies
SQLNamedQuery insert-quota-tally INSERT "%{0}, %{1}, %{2}, %{3}, %{4}, %{5}, %{6}, %{7}" quotatallies

SQLLOGFILE /var/log/proftpd.sql.log



welche log genau? habe hier zur auswahl:
Code:
proftpd.access_log  proftpd.auth_log  proftpd.paranoid_log  proftpd.sql.log  proftpd.xferlog
Gespeichert
stonki
Administrator
ProFTPD
*****
Offline Offline

Beiträge: 1853


15318939
Profil anzeigen WWW E-Mail
« Antwort #6 am: 23. August 2004, 17:24:42 »

Bist Du sicher, das Du DIE RICHTIGE config bearbeitest ?
Gespeichert

www.stonki.de:    the more I see, the more I know.......
www.proftpd.de:   Deutsche ProFTPD Dokumentation
www.krename.net:  Der Batch Renamer für KDE
www.kbarcode.net: Die Barcode Solution für KDE
Anonymous
Gast
« Antwort #7 am: 23. August 2004, 18:48:10 »

ich habe nur diese config und die datenbank wird ja auch geändert und aktualisiert. hab ja zum bsp. den abschnitt in die bsp.-konfiguration eingefügt
Code:
#
# verschiedene Counter für die users-Tabelle
#
SQLLog RETR                 dlbytescount
SQLNamedQuery               dlbytescount UPDATE "dl_bytes=dl_bytes+%b WHERE username='%u'" users
SQLLog RETR                 dlcount
SQLNamedQuery               dlcount UPDATE "dl_count=dl_count+1 WHERE username='%u'" users
SQLLog STOR                 ulbytescount
SQLNamedQuery               ulbytescount UPDATE "ul_bytes=ul_bytes+%b WHERE username='%u'" users
SQLLog STOR                 ulcount
SQLNamedQuery               ulcount UPDATE "ul_count=ul_count+1 WHERE username='%u'" users

weil vorher nix geändert wurde in den spalten

ausserdem wenn ich in dieser konfig.datei meine db-zugangsdaten ändere klappt der db zugriff ja nicht mehr (nur um sicher zu gehen das es die richtige konfig ist)
Gespeichert
BigMichi1
ProFTPD
*
Offline Offline

Beiträge: 10


Profil anzeigen WWW
« Antwort #8 am: 24. August 2004, 11:21:42 »

hat jemand eine idee???
Gespeichert
Anonymous
Gast
« Antwort #9 am: 24. August 2004, 22:43:00 »

muss man vielleicht irgendwo noch die pam authentifizierung abschalten???
Gespeichert
stonki
Administrator
ProFTPD
*****
Offline Offline

Beiträge: 1853


15318939
Profil anzeigen WWW E-Mail
« Antwort #10 am: 25. August 2004, 07:35:30 »

Zitat von: "Anonymous"
muss man vielleicht irgendwo noch die pam authentifizierung abschalten???

ne, ich wollte das gestern abend bei mir mal testen, aber leider keine zeit gehabt. Ist teste nachher das heute Abend mal..
Gespeichert

www.stonki.de:    the more I see, the more I know.......
www.proftpd.de:   Deutsche ProFTPD Dokumentation
www.krename.net:  Der Batch Renamer für KDE
www.kbarcode.net: Die Barcode Solution für KDE
Remsgost
Gast
« Antwort #11 am: 25. August 2004, 08:25:58 »

Zitat von: "Anonymous"
muss man vielleicht irgendwo noch die pam authentifizierung abschalten???


Code:

AuthPAM                         on
AuthPAMAuthoritative            off
AuthOrder                     mod_auth_sql.c mod_auth_file.c mod_auth_unix.c mod_auth.c mod_auth_pam.c
AuthUserFile                    /etc/ftppasswd
AuthGroupFile                   /etc/ftpgroup



MfG
Gespeichert
BigMichi1
ProFTPD
*
Offline Offline

Beiträge: 10


Profil anzeigen WWW
« Antwort #12 am: 25. August 2004, 15:44:22 »

hab mal die zeilen aus dem vorherigen post eingefügt nur geht nun keine sql-authentifizierung mehr sondern nur die mit meinen lokalen benutzern. leider ist das nur halt verkehrt herum.  :cry:

nur zur info, vielleicht liegt es ja auch an der version:
Code:
bigmichi1 ~ # proftpd -vv
 - ProFTPD Version: 1.2.10rc3 (devel)
 -   Scoreboard Version: 01040002
 -   Built: So Aug 22 18:43:56 CEST 2004
 -     Module: mod_core.c
 -     Module: mod_xfer.c
 -     Module: mod_auth_unix.c
 -     Module: mod_auth_file.c
 -     Module: mod_auth.c
 -     Module: mod_ls.c
 -     Module: mod_log.c
 -     Module: mod_site.c
 -     Module: mod_ctrls.c
 -     Module: mod_ratio.c
 -     Module: mod_readme.c
 -     Module: mod_auth_pam.c
 -     Module: mod_wrap.c
 -     Module: mod_tls.c
 -     Module: mod_sql.c
 -     Module: mod_sql_mysql.c
 -     Module: mod_quotatab.c
 -     Module: mod_quotatab_sql.c
 -     Module: mod_cap/1.0
Gespeichert
stonki
Administrator
ProFTPD
*****
Offline Offline

Beiträge: 1853


15318939
Profil anzeigen WWW E-Mail
« Antwort #13 am: 25. August 2004, 21:34:09 »

Ok, Loesung: Vorneweg "its not a bug, its a feature"  :lol:

In den 1.2.10 Versionen ist die Syntax geaendert worden, siehe http://www.proftpd.org/docs/NEWS-1.2.10rc3

"
- Bug 2105 - Remove Authoritative directives.  The AuthPAMAuthoritative
  directive, and the "*" syntax of SQLAuthenticate, have been deprecated.
"

nun kann man durch
Code:
Authorder mod_sql.c

das gleiche herstellen...
Gespeichert

www.stonki.de:    the more I see, the more I know.......
www.proftpd.de:   Deutsche ProFTPD Dokumentation
www.krename.net:  Der Batch Renamer für KDE
www.kbarcode.net: Die Barcode Solution für KDE
Wörsty
Moderator
ProFTPD
*****
Offline Offline

Beiträge: 1602


50772603
Profil anzeigen WWW E-Mail
« Antwort #14 am: 25. August 2004, 21:41:30 »

Zitat von: "stonki"
Ok, Loesung: Vorneweg "its not a bug, its a feature"  :lol:

In den 1.2.10 Versionen ist die Syntax geaendert worden, siehe http://www.proftpd.org/docs/NEWS-1.2.10rc3

"
- Bug 2105 - Remove Authoritative directives.  The AuthPAMAuthoritative
  directive, and the "*" syntax of SQLAuthenticate, have been deprecated.
"

nun kann man durch
Code:
Authorder mod_sql.c

das gleiche herstellen...

 :shock: Ahja
Gespeichert

RedHat 8.0 (2.4er Kernel)
proftpd 1.2.10
-mod_sql_mysql
-mow_wrap
-mod_exec
-mod_ifsession[/size]
Seiten: [1] 2   Nach oben
  Drucken  
 
Gehe zu:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC Prüfe XHTML 1.0 Prüfe CSS
Seite erstellt in 0.087 Sekunden mit 18 Zugriffen.