歡迎您光臨本站 註冊首頁

proftpd的PAM認證錯誤

←手機掃碼閱讀     火星人 @ 2014-03-04 , reply:0

proftpd的PAM認證錯誤

proftpd認證錯誤

平台:centos4.6
proftpd採用rpm安裝
version:proftpd1.3.1
# proftpd --version
- ProFTPD Version 1.3.1

花了點時間看過1.2.9的文檔資料,也搜過許多資料,最後還是沒辦法,V1.3.1還是發現許多問題


C:\Documents and Settings\Administrator>ftp 192.168.123.72
Connected to 192.168.123.72.
220 FTP Server ready.
User (192.168.123.72:(none)): test
331 Password required for test
Password:
530 Login incorrect.
Login failed.
ftp>


查看
#tail /var/log/message
Oct  9 18:45:03 phpPgadmin proftpd: phpPgadmin - ProFTPD 1.3.1 (stable) (built Sat Oct 6 21:26:10 CEST 2007) standalone mode STARTUP
Oct  9 18:45:03 phpPgadmin proftpd: proftpd startup succeeded
Oct  9 18:45:10 phpPgadmin proftpd: phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - FTP session opened.
Oct  9 18:45:15 phpPgadmin proftpd: phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - no such user 'test'





# cat proftpd
#%PAM-1.0
auth       required     pam_listfile.so item=user sense=deny file=/etc/ftpusers onerr=succeed
auth       required     pam_stack.so service=system-auth
auth       required     pam_shells.so
account    required     pam_stack.so service=system-auth
session    required     pam_stack.so service=system-auth
# pwd
/etc/pam.d


[ 本帖最後由 linuxpf 於 2008-10-10 18:17 編輯 ]
《解決方案》

增加虛擬用戶:
參考:http://www.castaglia.org/proftpd/contrib/ftpasswd.html

#ftpasswd --passwd --file=/home/proftpd/ftpd.passwd --name=test --uid=1002 --home=/home/ftpdata/test --shell=/sbin/nologin
# ftpasswd --group --file=/home/proftpd/ftpd.group --name=admin --gid=1002
#ftpasswd --group --name=admin --gid=2001 --member=test

查看安裝模塊

# proftpd -l
Compiled-in modules:
  mod_core.c
  mod_xfer.c
  mod_auth_unix.c
  mod_auth_file.c
  mod_auth.c
  mod_ls.c
  mod_log.c
  mod_site.c
  mod_delay.c
  mod_dso.c
  mod_readme.c
  mod_auth_pam.c
  mod_tls.c
  mod_cap.c
  mod_ctrls.c
#


如要在proftpd.conf中加入
AuthPAMAuthoritative                on


# service proftpd restart
Shutting down proftpd:                                     [  OK  ]
Starting proftpd:  - Fatal: unknown configuration directive 'AuthPAMAuthoritative' on line 22 of '/etc/proftpd.conf'
                                                           



同樣加入:
AuthPAMConfig                proftpd
AuthOrder                       mod_auth_pam.c* mod_auth_unix.c

AuthPAM                          on
AuthPAMAuthoritative      on
AuthUserFile                    /home/proftpd/ftpd.passwd
AuthGroupFile                  /home/proftpd/ftpd.group

出現
# service proftpd restart
Shutting down proftpd:                                     [  OK  ]
Starting proftpd:  - Fatal: unknown configuration directive 'AuthPAMAuthoritative' on line 22 of '/etc/proftpd.conf'
                                                           

考慮1.3.1配置PAM論證改變了相應語法

[ 本帖最後由 linuxpf 於 2008-10-10 18:33 編輯 ]
《解決方案》

proftpd配置文件:

#vi /etc/proftpd.conf
# This is the ProFTPD configuration file
# $Id: proftpd.conf,v 1.1 2004/02/26 17:54:30 thias Exp $

ServerName                      "ProFTPD server"
ServerIdent                     on "FTP Server ready."
ServerAdmin                     root@localhost
ServerType                      standalone
#ServerType                     inetd
DefaultServer                   on
AccessGrantMsg                  "User %u logged in."
#DisplayConnect                 /etc/ftpissue
#DisplayLogin                   /etc/ftpmotd
#DisplayGoAway                  /etc/ftpgoaway
DeferWelcome                    off

# Use this to excude users from the chroot
DefaultRoot                     ~ !adm

# Use pam to authenticate (default) and be authoritative


AuthPAM                         on
AuthPAMConfig                   proftpd
AuthOrder                       mod_auth_pam.c* mod_auth_unix.c


AuthUserFile                    /home/proftpd/ftpd.passwd
AuthGroupFile                   /home/proftpd/ftpd.group
RequireValidShell off
# Do not perform ident nor DNS lookups (hangs when the port is filtered)
IdentLookups                    off
UseReverseDNS                   off

# 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

# Default to show dot files in directory listings
ListOptions                     "-a"

# See Configuration.html for these (here are the default values)
#MultilineRFC2228               off
#RootLogin                      off
#LoginPasswordPrompt            on
MaxLoginAttempts                6
#MaxClientsPerHost              none
#AllowForeignAddress            off     # For FXP

# Allow to resume not only the downloads but the uploads too
AllowRetrieveRestart            on
AllowStoreRestart               on

# 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                    16

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

# Disable sendfile by default since it breaks displaying the download speeds in
# ftptop and ftpwho
UseSendfile                     no

# This is where we want to put the pid file
ScoreboardFile                  /var/run/proftpd.score

# Normally, we want users to do a few things.
<Global>
  AllowOverwrite                yes
  <Limit ALL SITE_CHMOD>
    AllowAll
  </Limit>
</Global>

# Define the log formats
LogFormat                       default "%h %l %u %t \"%r\" %s %b"
LogFormat                       auth    "%v [%P] %h %t \"%r\" %s"

# TLS
# Explained at http://www.castaglia.org/proftpd/modules/mod_tls.html
#TLSEngine                      on
#TLSRequired                    on
#TLSRSACertificateFile          /etc/pki/tls/certs/proftpd.pem
#TLSRSACertificateKeyFile       /etc/pki/tls/certs/proftpd.pem
#TLSCipherSuite                 ALL:!ADH:!DES
#TLSOptions                     NoCertRequest
#TLSVerifyClient                off
##TLSRenegotiate                ctrl 3600 data 512000 required off timeout 300
#TLSLog                         /var/log/proftpd/tls.log

# SQL authentication Dynamic Shared Object (DSO) loading
# See README.DSO and howto/DSO.html for more details.
#<IfModule mod_dso.c>
#   LoadModule mod_sql.c
#   LoadModule mod_sql_mysql.c
#   LoadModule mod_sql_postgres.c
#</IfModule>

# A basic anonymous configuration, with an upload directory.
#<Anonymous ~ftp>
#  User                         ftp
#  Group                                ftp
#  AccessGrantMsg               "Anonymous login ok, restrictions apply."
#
#  # We want clients to be able to login with "anonymous" as well as "ftp"
#  UserAlias                    anonymous ftp
#
#  # Limit the maximum number of anonymous logins
#  MaxClients                   10 "Sorry, max %m users -- try again later"
#
#  # Put the user into /pub right after login
#  #DefaultChdir                        /pub
#
#  # We want 'welcome.msg' displayed at login, '.message' displayed in
#  # each newly chdired directory and tell users to read README* files.
#  DisplayLogin                 /welcome.msg
#  DisplayFirstChdir            .message
#  DisplayReadme                        README*
#
#  # Some more cosmetic and not vital stuff
#  DirFakeUser                  on ftp
#  DirFakeGroup                 on ftp
#
#  # Limit WRITE everywhere in the anonymous chroot
#  <Limit WRITE SITE_CHMOD>
#    DenyAll
#  </Limit>
#
#  # An upload directory that allows storing files but not retrieving
#  # or creating directories.
#  <Directory uploads/*>
#    AllowOverwrite             no
#    <Limit READ>
#      DenyAll
#    </Limit>
#
#    <Limit STOR>
#      AllowAll
#    </Limit>
#  </Directory>
#
#  # Don't write anonymous accesses to the system wtmp file (good idea!)
#  WtmpLog                      off
#
#  # Logging for the anonymous transfers
#  ExtendedLog          /var/log/proftpd/access.log WRITE,READ default
#  ExtendedLog          /var/log/proftpd/auth.log AUTH auth
#
#</Anonymous>




[ 本帖最後由 linuxpf 於 2008-10-13 10:47 編輯 ]
《解決方案》

增加向個認證用戶:


# cat ftpd.passwd
test:$1$fQ47Mgwl$a8VfRA6BG9BKl88FeL1aj/:1002:1002::/home/ftpdata/test:/sbin/nologin
# cat ftpd.group
admin:x:2001:test
# pwd
/home/proftpd
#


[ 本帖最後由 linuxpf 於 2008-10-10 18:19 編輯 ]
《解決方案》

:em11: :em11: 請看:



proftpd -n -d9
- mod_tls/2.1.2: using OpenSSL 0.9.7a Feb 19 2003
phpPgadmin -
phpPgadmin - Config for ProFTPD server:
phpPgadmin - ServerIdent
phpPgadmin - DefaultServer
phpPgadmin - AccessGrantMsg
phpPgadmin - DeferWelcome
phpPgadmin - DefaultRoot
phpPgadmin - AuthPAM
phpPgadmin - AuthPAMConfig
phpPgadmin - AuthOrder
phpPgadmin - AuthUserFile
phpPgadmin - AuthGroupFile
phpPgadmin - RequireValidShell
phpPgadmin - IdentLookups
phpPgadmin - Umask
phpPgadmin - ListOptions
phpPgadmin - AllowRetrieveRestart
phpPgadmin - AllowStoreRestart
phpPgadmin - UserID
phpPgadmin - UserName
phpPgadmin - GroupID
phpPgadmin - GroupName
phpPgadmin - UseSendfile
phpPgadmin - Limit
phpPgadmin -  AllowAll
phpPgadmin - AllowOverwrite
phpPgadmin - ROOT PRIVS at mod_delay.c:307
phpPgadmin - RELINQUISH PRIVS at mod_delay.c:309
phpPgadmin - ROOT PRIVS at mod_ctrls.c:1618
phpPgadmin - RELINQUISH PRIVS at mod_ctrls.c:1620
phpPgadmin - SETUP PRIVS at main.c:2849
phpPgadmin - ROOT PRIVS at main.c:1926
phpPgadmin - RELINQUISH PRIVS at main.c:1933
phpPgadmin - ROOT PRIVS at main.c:2257
phpPgadmin - opening scoreboard '/var/run/proftpd.score'
phpPgadmin - RELINQUISH PRIVS at main.c:2283
phpPgadmin - ROOT PRIVS at inet.c:343
phpPgadmin - RELINQUISH PRIVS at inet.c:406
phpPgadmin - ProFTPD 1.3.1 (stable) (built Sat Oct 6 21:26:10 CEST 2007) standalone mode STARTUP
phpPgadmin - ROOT PRIVS at pidfile.c:42
phpPgadmin - RELINQUISH PRIVS at pidfile.c:44
phpPgadmin - ROOT PRIVS at mod_ctrls.c:1180
phpPgadmin - RELINQUISH PRIVS at mod_ctrls.c:1184
phpPgadmin - scrubbing scoreboard
phpPgadmin - ROOT PRIVS at scoreboard.c:761
phpPgadmin - RELINQUISH PRIVS at scoreboard.c:763
phpPgadmin - ROOT PRIVS at scoreboard.c:791
phpPgadmin - RELINQUISH PRIVS at scoreboard.c:822
  phpPgadmin - scrubbing scoreboard
phpPgadmin - ROOT PRIVS at scoreboard.c:761
phpPgadmin - RELINQUISH PRIVS at scoreboard.c:763
phpPgadmin - ROOT PRIVS at scoreboard.c:791
phpPgadmin - RELINQUISH PRIVS at scoreboard.c:822
phpPgadmin - ROOT PRIVS at main.c:1054
phpPgadmin - RELINQUISH PRIVS at main.c:1058
phpPgadmin - no matching vhost found for ::ffff:192.168.123.72#21, using DefaultServer 'ProFTPD server'
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - ROOT PRIVS at main.c:903
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - SETUP PRIVS at main.c:908
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - FTP session requested from unknown class
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - performing module session initializations
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - ROOT PRIVS at mod_delay.c:1232
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - RELINQUISH PRIVS at mod_delay.c:1234
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - ROOT PRIVS at mod_auth.c:151
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - opening scoreboard '/var/run/proftpd.score'
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - RELINQUISH PRIVS at mod_auth.c:153
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - AuthOrder in effect, resetting auth module order
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - ident lookup disabled
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - connected - local  : ::ffff:192.168.123.72:21
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - connected - remote : ::ffff:192.168.123.99:1301
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - FTP session opened.
phpPgadmin - scrubbing scoreboard
phpPgadmin - ROOT PRIVS at scoreboard.c:761
phpPgadmin - RELINQUISH PRIVS at scoreboard.c:763
phpPgadmin - ROOT PRIVS at scoreboard.c:791
phpPgadmin - RELINQUISH PRIVS at scoreboard.c:822
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - dispatching PRE_CMD command 'USER test' to mod_tls
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - dispatching PRE_CMD command 'USER test' to mod_core
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - dispatching PRE_CMD command 'USER test' to mod_core
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - dispatching PRE_CMD command 'USER test' to mod_delay
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - dispatching PRE_CMD command 'USER test' to mod_auth
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - dispatching CMD command 'USER test' to mod_auth
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - no supplemental groups found for user 'test'
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - dispatching POST_CMD command 'USER test' to mod_delay
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - dispatching LOG_CMD command 'USER test' to mod_log
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - dispatching PRE_CMD command 'PASS (hidden)' to mod_tls
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - dispatching PRE_CMD command 'PASS (hidden)' to mod_core
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - dispatching PRE_CMD command 'PASS (hidden)' to mod_core
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - dispatching PRE_CMD command 'PASS (hidden)' to mod_delay
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - dispatching PRE_CMD command 'PASS (hidden)' to mod_auth
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - dispatching CMD command 'PASS (hidden)' to mod_auth
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - no supplemental groups found for user 'test'
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - no such user 'test'
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - USER test: no such user found from ::ffff:192.168.123.99 [::ffff:192.168.123.99] to ::ffff:192.168.123.72:21
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - dispatching POST_CMD_ERR command 'PASS (hidden)' to mod_delay
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - dispatching LOG_CMD_ERR command 'PASS (hidden)' to mod_log
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - dispatching LOG_CMD_ERR command 'PASS (hidden)' to mod_auth
phpPgadmin - scrubbing scoreboard
phpPgadmin - ROOT PRIVS at scoreboard.c:761
phpPgadmin - RELINQUISH PRIVS at scoreboard.c:763
phpPgadmin - ROOT PRIVS at scoreboard.c:791
phpPgadmin - RELINQUISH PRIVS at scoreboard.c:822
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - dispatching PRE_CMD command 'QUIT' to mod_tls
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - dispatching PRE_CMD command 'QUIT' to mod_core
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - dispatching PRE_CMD command 'QUIT' to mod_core
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - dispatching CMD command 'QUIT' to mod_core
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - dispatching LOG_CMD command 'QUIT' to mod_log
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - dispatching LOG_CMD command 'QUIT' to mod_core
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - FTP session closed.
phpPgadmin - ROOT PRIVS at main.c:1054
phpPgadmin - RELINQUISH PRIVS at main.c:1058
phpPgadmin - no matching vhost found for ::ffff:192.168.123.72#21, using DefaultServer 'ProFTPD server'
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - ROOT PRIVS at main.c:903
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - SETUP PRIVS at main.c:908
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - FTP session requested from unknown class
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - performing module session initializations
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - ROOT PRIVS at mod_delay.c:1232
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - RELINQUISH PRIVS at mod_delay.c:1234
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - ROOT PRIVS at mod_auth.c:151
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - opening scoreboard '/var/run/proftpd.score'
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - RELINQUISH PRIVS at mod_auth.c:153
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - AuthOrder in effect, resetting auth module order
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - ident lookup disabled
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - connected - local  : ::ffff:192.168.123.72:21
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - connected - remote : ::ffff:192.168.123.99:1309
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - FTP session opened.
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - dispatching PRE_CMD command 'USER test' to mod_tls
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - dispatching PRE_CMD command 'USER test' to mod_core
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - dispatching PRE_CMD command 'USER test' to mod_core
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - dispatching PRE_CMD command 'USER test' to mod_delay
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - dispatching PRE_CMD command 'USER test' to mod_auth
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - dispatching CMD command 'USER test' to mod_auth
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - no supplemental groups found for user 'test'
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - dispatching POST_CMD command 'USER test' to mod_delay
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - dispatching LOG_CMD command 'USER test' to mod_log
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - dispatching PRE_CMD command 'PASS (hidden)' to mod_tls
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - dispatching PRE_CMD command 'PASS (hidden)' to mod_core
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - dispatching PRE_CMD command 'PASS (hidden)' to mod_core
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - dispatching PRE_CMD command 'PASS (hidden)' to mod_delay
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - dispatching PRE_CMD command 'PASS (hidden)' to mod_auth
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - dispatching CMD command 'PASS (hidden)' to mod_auth
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - no supplemental groups found for user 'test'
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - no such user 'test'
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - USER test: no such user found from ::ffff:192.168.123.99 [::ffff:192.168.123.99] to ::ffff:192.168.123.72:21
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - dispatching POST_CMD_ERR command 'PASS (hidden)' to mod_delay
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - dispatching LOG_CMD_ERR command 'PASS (hidden)' to mod_log
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - dispatching LOG_CMD_ERR command 'PASS (hidden)' to mod_auth
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - dispatching PRE_CMD command 'QUIT' to mod_tls
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - dispatching PRE_CMD command 'QUIT' to mod_core
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - dispatching PRE_CMD command 'QUIT' to mod_core
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - dispatching CMD command 'QUIT' to mod_core
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - dispatching LOG_CMD command 'QUIT' to mod_log
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - dispatching LOG_CMD command 'QUIT' to mod_core
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - FTP session closed.
phpPgadmin - ROOT PRIVS at main.c:1054
phpPgadmin - RELINQUISH PRIVS at main.c:1058
phpPgadmin - no matching vhost found for ::ffff:192.168.123.72#21, using DefaultServer 'ProFTPD server'
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - ROOT PRIVS at main.c:903
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - SETUP PRIVS at main.c:908
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - FTP session requested from unknown class
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - performing module session initializations
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - ROOT PRIVS at mod_delay.c:1232
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - RELINQUISH PRIVS at mod_delay.c:1234
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - ROOT PRIVS at mod_auth.c:151
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - opening scoreboard '/var/run/proftpd.score'
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - RELINQUISH PRIVS at mod_auth.c:153
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - AuthOrder in effect, resetting auth module order
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - ident lookup disabled
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - connected - local  : ::ffff:192.168.123.72:21
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - connected - remote : ::ffff:192.168.123.99:1313
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - FTP session opened.
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - dispatching PRE_CMD command 'USER root' to mod_tls
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - dispatching PRE_CMD command 'USER root' to mod_core
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - dispatching PRE_CMD command 'USER root' to mod_core
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - dispatching PRE_CMD command 'USER root' to mod_delay
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - dispatching PRE_CMD command 'USER root' to mod_auth
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - dispatching CMD command 'USER root' to mod_auth
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - dispatching POST_CMD command 'USER root' to mod_delay
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - dispatching LOG_CMD command 'USER root' to mod_log
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - dispatching PRE_CMD command 'PASS (hidden)' to mod_tls
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - dispatching PRE_CMD command 'PASS (hidden)' to mod_core
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - dispatching PRE_CMD command 'PASS (hidden)' to mod_core
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - dispatching PRE_CMD command 'PASS (hidden)' to mod_delay
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - dispatching PRE_CMD command 'PASS (hidden)' to mod_auth
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - dispatching CMD command 'PASS (hidden)' to mod_auth
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - SECURITY VIOLATION: root login attempted.
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - dispatching POST_CMD_ERR command 'PASS (hidden)' to mod_delay
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - dispatching LOG_CMD_ERR command 'PASS (hidden)' to mod_log
phpPgadmin (::ffff:192.168.123.99[::ffff:192.168.123.99]) - dispatching LOG_CMD_ERR command 'PASS (hidden)' to mod_auth
phpPgadmin - scrubbing scoreboard
phpPgadmin - ROOT PRIVS at scoreboard.c:761
phpPgadmin - RELINQUISH PRIVS at scoreboard.c:763
phpPgadmin - ROOT PRIVS at scoreboard.c:791
phpPgadmin - RELINQUISH PRIVS at scoreboard.c:822



我現在都糊了........

[ 本帖最後由 linuxpf 於 2008-10-13 10:57 編輯 ]
《解決方案》

防火牆也開了,不知道為什麼沒有用戶?
大家有沒遇到這樣的問題,非常謝謝!:em11:
《解決方案》

大家幫助分析下,非常謝謝!
《解決方案》

more README.PAM
PAM: Pluggable Authentication Modules
-------------------------------------

Author: The ProFTPD Project team
Copyright(C) 1999, 2000-2. All Rights Reserved.

PAM stands for Pluggable Authentication Modules, a modular system
designed to eliminate the ages old problem of disparate authentication
mechanisms on Unix (ie: shadow, pwdb, MD5, etc).  Many operating
systems, including FreeBSD, Linux, and Solaris already support and use
PAM.

ProFTPD attempts to check for the necessary PAM support automatically,
and unless specifically overridden, will use PAM on those platforms
whenever possible.  In order to use PAM, you must configure a
configuration file.  On some systems, such as FreeBSD, this will be a
file called /etc/pam.conf.  On others, such as Linux, configuration is
taken from the directory /etc/pam.d, in a file called ftp.


FreeBSD
-------

To use PAM with ProFTPD, you must edit /etc/pam.conf and add the
following lines (if they are not already present):

  ftpd auth    required    pam_unix.so         try_first_pass
  ftpd account required    pam_unix.so         try_first_pass
  ftpd session required    pam_permit.so

In your proftpd.conf, you'll need to set AuthPAMConfig to 'ftpd'.  PAM
authentication should now work properly.


Linux
-----

To use PAM with ProFTPD, you must edit /etc/pam.d/ftp and add the
following lines for RedHat installations:

  #%PAM-1.0
  auth       required     /lib/security/pam_pwdb.so shadow nullok
  account    required     /lib/security/pam_pwdb.so
  session    required     /lib/security/pam_pwdb.so

For SuSE:

  #%PAM-1.0
  auth       required     /lib/security/pam_unix.so shadow nullok
  account    required     /lib/security/pam_unix.so
  session    required     /lib/security/pam_unix.so

These settings are valid for RedHat and SuSE Linux systems.  Other Linux
distributions may differ.

NOTE: If you are using a 64-bit system, you may need to change the above
paths from "/lib/security/..." to "/lib64/security/...".  Without this
correction, on 64-bit systems, your proftpd logs may contain errors
like:

  PAM unable to dlopen(/lib/security/pam_pwdb.so)
  PAM [dlerror: /lib/security/pam_pwdb.so: cannot open shared object file:
  No such file or directory]

After updating the paths in your /etc/pam.d/ftp file, be sure to restart
proftpd, so that the new PAM configuration takes effect.


Mac OS X
--------

To use PAM with ProFTPD, you must edit /etc/pam.d/ftp and add the
following lines:

  auth       required    pam_unix.so try_first_pass
  account    required    pam_unix.so try_first_pass
  session    required    pam_permit.so

Or, if you are running Mac OSX 10.3 or later, you should have an
/etc/pam.d/ftpd file that contains the following:

  auth       sufficient     pam_securityserver.so
  auth       required       pam_deny.so
  account    required       pam_permit.so
  password   required       pam_deny.so
  session    required       pam_permit.so

Then, in your proftpd.conf, use:

  <IfModule mod_auth_pam.c>
    AuthPAMConfig ftpd
  </IfModule>


PAM Configuration Options
-------------------------

1. AuthPAM
You may selectively enable or disable PAM authentication.  This is
especially useful in environments where you are receiving ProFTPD in a
distribution, and you want to disable the builtin PAM authentication
module.  The default is to enable PAM authentication.  You may disable
it as follows:

  # This enables or disables the PAM authentication module.
  # The default is 'on'.
  AuthPAM                                   on

2. AuthPAMConfig
You may configure multiple authentication configurations using PAM
that optionally validate users against various things, such as an LDAP
directory, a MySQL database, or even a Windows NT domain.  Discussion
of alternate authentication modules for PAM is beyond the scope of
this document.  However, what is relevant is that ProFTPD allows you
to use different PAM authentication schemes for different virtual
servers.  You can do this by using the AuthPAMConfig directive:

  # This is the PAM configuration file that will be referenced when
  # authenticating.  It can be set globally and/or per VirtualHost.
  # The default is 'ftp'.
  AuthPAMConfig                       ftp

The default setting is 'ftp'.  However, if you set AuthPAMConfig to be
'ftp.myhost', for example, ProFTPD will try to use the PAM
authentication settings for ftp.myhost, assuming you've set up your
PAM configuration file(s) properly.  To use the above example with
FreeBSD, you would need to add lines such as the following:

  ftp.myhost auth    required    pam_unix.so         try_first_pass
  ftp.myhost account required    pam_unix.so         try_first_pass

to your /etc/pam.conf file.  Under Linux, or if you're using a
directory like /etc/pam.d, you could simply copy the Linux
configuration above to a new file called /etc/pam.d/ftp.myhost.

The pattern here is that AuthPAMConfig sets what's called the service name
in PAM lingo.  If you use /etc/pam.conf, the first field on any
configuration directive is the service name.  If you're using
/etc/pam.d, the service name is the name of the file, for example
/etc/pam.d/login happens to be the PAM configuration for the login
program.

3. Authoritative PAM module

This refers to whether you wish PAM to be the final arbitrator of what is and
is not a valid ProFTPD user.  It defaults to 'off'.  With this directive on,
things like AuthUserFile directives will *NOT* work properly, since PAM will
detect these as invalid users and inform ProFTPD not to attempt to process
users through any other authentication mechanisms.

  # The following makes PAM the final authority on what gets
  # authenticated.
  AuthOrder mod_auth_pam.c* mod_auth_unix.c

Note the "*" suffix on the mod_auth_pam.c name, which indicates that that
module is to be treated authoritatively.


Issues
------

Some PAM libraries on various platforms impose restrictions on the login
name length.  Login names that exceed these lengths can cause the PAM
libraries to fail or crash.  If you know the length restriction for your
platform, you can compile proftpd such that it will not handle logins of
that length:

  CFLAGS='-DPR_TUNABLE_LOGIN_MAX=16' ./configure ...

would set a maximum length of 16 characters to proftpd login names.  Note,
though, that by using backends such as SQL tables or LDAP directories,
longer logins may actually be used, leading to possible interoperability
problems between those auth modules and mod_auth_pam.


References
----------
More information and a much more complete primer about PAM can be
found at http://www.kernel.org/pub/linux/libs/pam/Linux-PAM-html/
#
《解決方案》

同里我試著改變shell

# ftpasswd --passwd --file=/home/proftpd/ftpd.passwd --name=test --uid=1002 --home=/home/ftpdata/test --shell=/sbin/bash
ftpasswd: using alternate file: /home/proftpd/ftpd.passwd
ftpasswd: --passwd: missing --gid argument: default gid set to uid
ftpasswd: updating passwd entry for user test

ftpasswd: /sbin/bash is not among the valid system shells.  Use of
ftpasswd: "RequireValidShell off" may be required, and the PAM
ftpasswd: module configuration may need to be adjusted.


Password:

《解決方案》

# pwd
/etc/pam.d
# ls |grep proftpd
proftpd
# cat proftpd
#%PAM-1.0
auth       required     pam_listfile.so item=user sense=deny file=/etc/ftpusers onerr=succeed
auth       required     pam_stack.so service=system-auth
auth       required     pam_shells.so
account    required     pam_stack.so service=system-auth
session    required     pam_stack.so service=system-auth
#

[火星人 ] proftpd的PAM認證錯誤已經有1664次圍觀

http://coctec.com/docs/service/show-post-25381.html