From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on sa.int.altlinux.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,SPF_PASS autolearn=ham version=3.2.5 Message-ID: <4B21FD27.7030106@opencom.ru> Date: Fri, 11 Dec 2009 11:04:55 +0300 From: Novikov Yuriy User-Agent: Thunderbird 2.0.0.17 (X11/20080929) MIME-Version: 1.0 To: Sysadmins@lists.altlinux.org Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Subject: [Sysadmins] vsftpd pam-mysql problem X-BeenThere: sysadmins@lists.altlinux.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: ALT Linux sysadmin discuss List-Id: ALT Linux sysadmin discuss List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2009 08:04:58 -0000 Archived-At: List-Archive: Добрый день, поиск и гугление не к чему не привели, Столкнулся с проблемой авторизации vsftpd через mysql создал базу, дал права пользователю vsftpd написал конфиг: Код: anonymous_enable=NO local_enable=YES check_shell=NO write_enable=YES local_umask=022 dirmessage_enable=YES xferlog_enable=YES xferlog_file=/var/log/vsftpd.log log_ftp_protocol=YES connect_from_port_20=YES nopriv_user=vsftpd chroot_local_user=YES #secure_chroot_dir=/var/run/vsftpd pam_service_name=vsftpd rsa_cert_file=/etc/ssl/certs/vsftpd.pem guest_enable=YES guest_username=vsftpd local_root=/var/vsftpd/$USER user_sub_token=$USER virtual_use_local_privs=YES user_config_dir=/etc/vsftpd/vsftpd_user_conf в /etc/pam.d/vsftpd Код: auth required pam_mysql.so user=vsftpd passwd=xxx host=localhost db=vsftpd table=accounts usercolumn=username passwdcolumn=pass crypt=2 verbose=1 debug=1 account required pam_mysql.so user=vsftpd passwd=xxx host=localhost db=vsftpd table=accounts usercolumn=username passwdcolumn=pass crypt=2 verbose=1 debug=1 проверял от разных пользователей в том числе от рута и с разными типами шифрования и без... результат один. 530 Login incorrect привожу логи Код: Dec 11 09:52:16 alta xinetd[23494]: START: ftp pid=24927 from=xx.xx.xx.xx Dec 11 09:52:16 alta vsftpd: pam_mysql - option verbose is set to "1" Dec 11 09:52:16 alta vsftpd: pam_mysql - option debug is set to "1" Dec 11 09:52:17 alta vsftpd: pam_mysql - pam_mysql_close_db() called. Dec 11 09:52:17 alta vsftpd: pam_mysql - pam_sm_authenticate() called. Dec 11 09:52:17 alta vsftpd: pam_mysql - pam_mysql_open_db() called. Dec 11 09:52:17 alta vsftpd: pam_mysql - pam_mysql_open_db() returning 0. Dec 11 09:52:17 alta vsftpd: pam_mysql - pam_mysql_check_passwd() called. Dec 11 09:52:17 alta vsftpd: pam_mysql - pam_mysql_format_string() called Dec 11 09:52:17 alta vsftpd: pam_mysql - pam_mysql_quick_escape() called. Dec 11 09:52:17 alta vsftpd: pam_mysql - SELECT pass FROM accounts WHERE username = 'testuser' Dec 11 09:52:17 alta vsftpd: pam_mysql - pam_mysql_check_passwd() returning 6. Dec 11 09:52:17 alta vsftpd: pam_mysql - pam_mysql_sql_log() called. Dec 11 09:52:17 alta vsftpd: pam_mysql - pam_mysql_sql_log() returning 0. Dec 11 09:52:17 alta vsftpd: pam_mysql - pam_mysql_converse() called. Dec 11 09:52:17 alta vsftpd: pam_mysql - pam_sm_authenticate() returning 3. Dec 11 09:52:17 alta vsftpd: pam_mysql - pam_mysql_release_ctx() called. Dec 11 09:52:17 alta vsftpd: pam_mysql - pam_mysql_destroy_ctx() called. Dec 11 09:52:17 alta vsftpd: pam_mysql - pam_mysql_close_db() called. и /var/log/vsftpd.log Код: Fri Dec 11 09:54:37 2009 [pid 25008] CONNECT: Client "xxx" Fri Dec 11 09:54:37 2009 [pid 25008] FTP response: Client "xxx", "220 (vsFTPd 2.0.6)" Fri Dec 11 09:54:37 2009 [pid 25008] FTP command: Client "xxx", "FEAT" Fri Dec 11 09:54:37 2009 [pid 25008] FTP response: Client "xxx", "211-Features:" Fri Dec 11 09:54:37 2009 [pid 25008] FTP response: Client "xxx", " EPRT??" Fri Dec 11 09:54:37 2009 [pid 25008] FTP response: Client "xxx", " EPSV??" Fri Dec 11 09:54:37 2009 [pid 25008] FTP response: Client "xxx", " MDTM??" Fri Dec 11 09:54:37 2009 [pid 25008] FTP response: Client "xxx", " PASV??" Fri Dec 11 09:54:37 2009 [pid 25008] FTP response: Client "xxx", " REST STREAM??" Fri Dec 11 09:54:37 2009 [pid 25008] FTP response: Client "xxx", " SIZE??" Fri Dec 11 09:54:37 2009 [pid 25008] FTP response: Client "xxx", " TVFS??" Fri Dec 11 09:54:37 2009 [pid 25008] FTP response: Client "xxx", " UTF8??" Fri Dec 11 09:54:37 2009 [pid 25008] FTP response: Client "xxx", "211 End" Fri Dec 11 09:54:37 2009 [pid 25008] FTP command: Client "xxx", "OPTS UTF8 ON" Fri Dec 11 09:54:37 2009 [pid 25008] FTP response: Client "xxx", "200 Always in UTF8 mode." Fri Dec 11 09:54:37 2009 [pid 25008] FTP command: Client "xxx", "USER testuser" Fri Dec 11 09:54:37 2009 [pid 25008] [testuser] FTP response: Client "xxx", "331 Please specify the password." Fri Dec 11 09:54:37 2009 [pid 25008] [testuser] FTP command: Client "xxx", "PASS " Fri Dec 11 09:54:38 2009 [pid 25007] [testuser] FAIL LOGIN: Client "xxx" Fri Dec 11 09:54:39 2009 [pid 25008] [testuser] FTP response: Client "xxx", "530 Login incorrect." Fri Dec 11 09:54:39 2009 [pid 25008] FTP command: Client "xxx", "PWD" Fri Dec 11 09:54:39 2009 [pid 25008] FTP response: Client "xxx", "530 Please login with USER and PASS." Хотелось бы услышать Ваши мнения на сей счёт.