473,756 Members | 4,863 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

vsftpd and pam-mysql problem

7 New Member
Hi there!

I'm quite new to linux and recently bought my own server. I have installed vsftpd with SSL(FTPES) and it worked fine with local users.
Now I want to allow virtual users to login as well.

I tried following these guides:
http://www.digitalnerd s.net/featured...mysq l-backend/
http://www.howtoforge. com/vsftpd_mysql_de bian_etch_p2

From the two guides it shows that crypt=0 and crypt=2 in /etc/pam.d/vsftp is no encryption and PASSWORD encryption on passwords in the MySQL table.

Here is my /etc/pam.d/vsftp:
auth required pam_mysql.so user=ftp passwd=xxx host=localhost db=ftpusers table=users usercolumn=user name passwdcolumn=pa ss crypt=2
account required pam_mysql.so user=ftp passwd=xxx host=localhost db=ftpusers table=users usercolumn=user name passwdcolumn=pa ss crypt=2

where xxx is a password I have chosen.

I have made a user on the system called ftp(instead of ftpguest from the guides).

In MySQL i have made a database called ftpusers with a table called users:
mysql> use ftpusers
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> select * from users;
+----+----------+-------------------------------------------+
| id | username | pass |
+----+----------+-------------------------------------------+
| 1 | kalle | *XXXXXXXXXXXXXX XXXXXXXXXXXXX |
| 2 | torben | *XXXXXXXXXXXXXX XXXXXXXXXXXXX |
| 3 | tanita | *XXXXXXXXXXXXXX XXXXXXXXXXXXX |
+----+----------+-------------------------------------------+
3 rows in set (0.00 sec)

I have removed the encrypted passwords
I used the following sql-statement to create users:
insert into users(username, pass) values('kalle', PASSWORD('passw ord'));

I also created a grant for the user ftp:
GRANT ALL on ftpusers.users TO ftp@localhost IDENTIFIED BY 'xxx';

where xxx is the same password as the one in /etc/pam.d/vsftp above

My /etc/vsftpd.conf has the following:
listen=YES
anonymous_enabl e=NO
local_enable=YE S
write_enable=YE S
local_umask=022
dirmessage_enab le=YES
xferlog_enable= YES
connect_from_po rt_20=YES
nopriv_user=ftp
ftpd_banner=Wel come...
chroot_local_us er=YES
secure_chroot_d ir=/var/run/vsftpd
pam_service_nam e=vsftpd
rsa_cert_file=. ....(removed here)
rsa_private_key _file=...(remov ed here)
guest_enable=YE S
local_root=/home/vsftpd/$USER
user_sub_token= $USER
virtual_use_loc al_privs=YES
guest_username= ftp
ssl_enable=YES
ssl_ciphers=AES 256-SHA
pasv_min_port=4 2563
pasv_max_port=4 2563
pasv_address_re solve=YES
pasv_address=.. .(removed here)

When I try to login, my client(fileZill a on windows) proceeds to sending the password, then when waiting for at reply it says "fatal error, cannot login"

I assume it has something todo with the check for the password :/

Can anyone help me pls?
Oct 26 '09 #1
1 3499
KalleMOD
7 New Member
I managed to solve it myself. The login was okay but something in the conf file screwed it up :)
Oct 30 '09 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
980
by: Diez B. Roggisch | last post by:
Hi, I want to authenticate users against the shadow mechanism. So I installed the python2.3-pam package and tried to run the example. It works in terms of beeing sucessully executed. But I don't get authenticated. The service name is set to "passwd". I have to admit that I'm no PAM expert, I've only a rough understanding of what happens there. Fiddling around with the service name didn't do anything. Not even turn up an error.
1
2350
by: Gary Wilson Jr | last post by:
I would like my application to be able to authenticate through PAM. Is there any code out there that implements this? All I could find was PyPAM (http://www.pangalactic.org/PyPAM/), which doesn't look like it has been touched in almost 6 years and requires python1.5.
0
1127
by: Jason Tesser | last post by:
I am trying to authenticate POstgres using Pam. How do I do this. I tried using webmin on RH9 and telling it to use Pam for authentication but it doesn't seem to work. Jason Tesser Web/Multimedia Programmer Northland Ministries Inc. (715)324-6900 x3050 ---------------------------(end of broadcast)---------------------------
0
1003
by: Kona | last post by:
Hello, Is it possibible to link Unix DB2 on Solaris with a PAM module ? The goal is to use LDAP authentication again DB2 Regards
1
1870
by: Hervé Piedvache | last post by:
Dear all, I have a trouble with the pam authentification for PostgreSQL. I have add in the pg_hba.conf the good line ... and I have create a /etc/pam.d/postresql file which contains : auth required pam_unix.so nullok_secure account required pam_unix.so
1
1639
by: vishalsaibaba | last post by:
Hi All.. I have just build up the new db2 server and after building up i come to knew that i have to configure the db2 to authenticate over the PAM. I am not able to connect remotely to the db2 server because of the authentication issues over the PAM. I have contacted the IBM SUPPORT for this and the advise from the IBM SUPPORT is that you have to write a security plugins to authenticate over the PAM. Can Please someone has experiance...
4
4976
by: rpri122 | last post by:
As far as I know db2 uses the OS for authentication of users. We are using the pam_ldap modul for OS authentication but it seems db2 is not working correctly with this config: I've done a db2 trace of a "connect to database" and found a interesting line: 320114 | | | | | | | | | | | | | sqlexSlsSystemAuthenticate entry 320115 | | | | | | | | | | | | | | sqlexValidatePassword entry
0
1177
by: chris.atlee | last post by:
Hello, I've been trying to write a PAM module using ctypes. In the conversation function (my_conv in the script below), you're passed in a pam_response** pointer. You're supposed to allocate an array of pam_response's and set the pointer's value to the new array. Then you fill in the array with appropriate data.
3
2691
by: Chris AtLee | last post by:
Sorry for the repeat post...I'm not sure if my first post (on May 30th) went through or not. I've been trying to write a PAM module using ctypes. In the conversation function (my_conv in the script below), you're passed in a pam_response** pointer. You're supposed to allocate an array of pam_response's and set
0
2206
by: tvnaidu | last post by:
installed vsftpd on SUSE, allows only anonymous login - I can't transfer files at all from windows machine. any idea?. It accepts only anonymous. C:\>ftp 192.168.1.11 Connected to 192.168.1.11. 220 (vsFTPd 2.0.7) User (192.168.1.11:(none)): root 530 This FTP server is anonymous only. Login failed. ftp> quit 221 Goodbye.
0
9152
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9930
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9716
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7116
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6410
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5180
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3676
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3185
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2542
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.