Welcome to Tech Support Forum home to more then 136,000 problems solved. Issues have included: Spyware, Malware, Virus Issues, Windows, Microsoft, Linux, Networking, Security, Hardware, and Gaming Getting your problem solved is as easy as:
1. Registering for a free account
2. Asking your question
3. Receiving an answer

Registered members:
* Get free support
* Communicate privately with other members (PM).
* Removal of this message
* See fewer ads.
* And much more..

 



Want to know how to post a question? click here Having problems with spyware and pop-ups? First Steps
Go Back   Tech Support Forum > Alternative Computing > Linux Support
User Name
Password
Site Map Register Donate Rules Blogs Mark Forums Read


Linux Support Linux - Operating Systems and Applications Support

Reply
 
LinkBack Thread Tools
Old 12-29-2007, 05:28 AM   #1 (permalink)
Registered User
 
Join Date: Dec 2007
Posts: 19
OS: Debian 4.0


Pureftpd login problem

Hello.

First a warm thanks from Denmark. I really like the guides from this website.

First with a empty computer, I followed the http://www.howtoforge.com/perfect_setup_debian_etch guide, from chapter 1 to 7, 10 to 13 and 15 to 18.

It works, apache, mysql, phpmyadmin and so on. Works really good.

Then I followed the http://www.howtoforge.com/debian_etc...pd_mysql_quota, from chapter 3 (the system has mysql installed from above guide).

This works also pretty nice, but - when I adds a user via mysql and tries to login with the specified username/password - I get a login failure. It seems that the ftp server aproves my username but not the password.

I did a guide walk through several times, but all information seems to follow the guide.

Does any one have a solution.

(excuse my bad english)

Info on login try:
Connecting to 86.58.131.183:21
Connected to 86.58.131.183:21 in 0.015625 seconds, Waiting for Server Response
220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
220-You are user number 1 of 50 allowed.
220-Local time is now 13:14. Server port: 21.
220-This is a private system - No anonymous login
220-IPv6 connections are also welcome on this server.
220 You will be disconnected after 15 minutes of inactivity.
Host type (1): Automatic Detect
USER webhost
331 User webhost OK. Password required
PASS (hidden)
530 Login authentication failed

Mysql info:
webhost 1 test 2008 2008 /www/webhost4u 100 100 * 50 0
guldhammer is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Important Information
Join the #1 Tech Support Forum Today - It's Totally Free!

TechSupportForum.com is a leading support website for your computer needs. We offer free, friendly and personalized computer support. Why pay to have your computer fixed when you can do it for free.

Join TechSupportforum.com Today - Click Here

Old 12-29-2007, 08:12 AM   #2 (permalink)
Registered User
 
Join Date: Dec 2007
Posts: 18
OS: Fedora Core 8


Re: Pureftpd login problem

Open this file in vim or another text editor.
vi /etc/my.cnf

Add the following line after
[mysqld]
log=/var/lib/mysql/general.log

Restart the mysql service.

For consistency restart the pureftpd service.

Attempt a login to your ftp service. If it fails thats OK.

Go to the file /var/lib/mysql/general.log

Here you will see a list of all the queries that were sent to mysql - including the query (if it was sent at all) including the username and the password for the FTP client.

If it is there, manually run the query in SQL to see what happens. If you dont get anything back but the password is correct there is likely a structuring error in the way the database was built I.E a table not available or a column not added.

If you dont get a SQL query logged to that file then that suggests that Pureftpd isnt communicating at all with MySQL, so recheck your configuration files for pureftpd (and its log files) to make sure it connects to MySQL and if not why it does not connect.

Once your done, remove the line you added to /etc/my.cnf and restart MySQL/PureFTPD. You dont want to run that log contstantly both for security reasons (it contains passwords) and performance ones (youll fill you disk up in no time).

Good luck!
Deleriux is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 12-29-2007, 05:10 PM   #3 (permalink)
Registered User
 
Join Date: Dec 2007
Posts: 19
OS: Debian 4.0


Re: Pureftpd login problem

SELECT password FROM ftpd WHERE User="webhost" AND status="1" AND (ipaccess = "*" OR ipaccess LIKE "**IP**")

I did a manual query with the password line. I got the password back, just in md5 crypted text just like my settings are. I still can't login because the password is still wrong.
guldhammer is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 12-30-2007, 01:56 AM   #4 (permalink)
Registered User
 
Join Date: Dec 2007
Posts: 18
OS: Fedora Core 8


Re: Pureftpd login problem

The problem is not with your MySQL then. Check access for the user webhost, does it have a home directory it can access?

Check the logs for pureftpd (probably in /var/log) they will indicate the reason why that user cannot login.
Deleriux is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 12-30-2007, 03:28 AM   #5 (permalink)
Registered User
 
Join Date: Dec 2007
Posts: 19
OS: Debian 4.0


Re: Pureftpd login problem

Quote:
Originally Posted by Deleriux View Post
The problem is not with your MySQL then. Check access for the user webhost, does it have a home directory it can access?

Check the logs for pureftpd (probably in /var/log) they will indicate the reason why that user cannot login.
Mmm, the only log for pureftpd there is, are a transfer.log but it's empty.
guldhammer is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 12-30-2007, 03:35 AM   #6 (permalink)
Registered User
 
Join Date: Dec 2007
Posts: 18
OS: Fedora Core 8


Re: Pureftpd login problem

Check your syslog.

Depending on distro that is /var/log/messages or /var/log/syslog.
Deleriux is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 12-30-2007, 03:45 AM   #7 (permalink)
Registered User
 
Join Date: Dec 2007
Posts: 19
OS: Debian 4.0


Re: Pureftpd login problem

Quote:
Originally Posted by Deleriux View Post
Check your syslog.

Depending on distro that is /var/log/messages or /var/log/syslog.
There is something here
i can see a failure here:
[WARNING] Wrong SQL parameters : [SELECT Dir FROM ftpd WHERE User="webhost" AND status="1" AND (ipaccess = "*" AND (ipaccess = "*" OR ipaccess LIKE "87.49.60.102")]

Dec 30 00:46:42 guldsrv pure-ftpd: (?@0x57313c66.hrnxx13.adsl-dhcp.tele.dk) [INFO] New connection from 0x57313c66.hrnxx13.adsl-dhcp.tele.dk
Dec 30 00:46:42 guldsrv pure-ftpd: (?@0x57313c66.hrnxx13.adsl-dhcp.tele.dk) [WARNING] Wrong SQL parameters : [SELECT Dir FROM ftpd WHERE User="webhost" AND status="1" AND (ipaccess = "*" AND (ipaccess = "*" OR ipaccess LIKE "87.49.60.102")]
Dec 30 00:46:42 guldsrv pure-ftpd: (?@0x57313c66.hrnxx13.adsl-dhcp.tele.dk) [INFO] PAM_RHOST enabled. Getting the peer address
Dec 30 00:46:44 guldsrv pure-ftpd: (?@0x57313c66.hrnxx13.adsl-dhcp.tele.dk) [WARNING] Authentication failed for user [webhost]
Dec 30 00:46:49 guldsrv pure-ftpd: (?@0x57313c66.hrnxx13.adsl-dhcp.tele.dk) [WARNING] Wrong SQL parameters : [SELECT Dir FROM ftpd WHERE User="webhost" AND status="1" AND (ipaccess = "*" AND (ipaccess = "*" OR ipaccess LIKE "87.49.60.102")]
Dec 30 00:46:49 guldsrv pure-ftpd: (?@0x57313c66.hrnxx13.adsl-dhcp.tele.dk) [INFO] PAM_RHOST enabled. Getting the peer address
Dec 30 00:46:51 guldsrv pure-ftpd: (?@0x57313c66.hrnxx13.adsl-dhcp.tele.dk) [WARNING] Authentication failed for user [webhost]
Dec 30 00:47:01 guldsrv pure-ftpd: (?@0x57313c66.hrnxx13.adsl-dhcp.tele.dk) [INFO] Logout.

Dec 30 00:53:30 guldsrv pure-ftpd: (?@0x57313c66.hrnxx13.adsl-dhcp.tele.dk) [INFO] New connection from 0x57313c66.hrnxx13.adsl-dhcp.tele.dk
Dec 30 00:53:30 guldsrv pure-ftpd: (?@0x57313c66.hrnxx13.adsl-dhcp.tele.dk) [WARNING] Wrong SQL parameters : [SELECT Dir FROM ftpd WHERE User="webhost" AND status="1" AND (ipaccess = "*" AND (ipaccess = "*" OR ipaccess LIKE "87.49.60.102")]
Dec 30 00:53:30 guldsrv pure-ftpd: (?@0x57313c66.hrnxx13.adsl-dhcp.tele.dk) [INFO] PAM_RHOST enabled. Getting the peer address
Dec 30 00:53:32 guldsrv pure-ftpd: (?@0x57313c66.hrnxx13.adsl-dhcp.tele.dk) [WARNING] Authentication failed for user [webhost]
Dec 30 00:53:36 guldsrv pure-ftpd: (?@0x57313c66.hrnxx13.adsl-dhcp.tele.dk) [WARNING] Wrong SQL parameters : [SELECT Dir FROM ftpd WHERE User="webhost" AND status="1" AND (ipaccess = "*" AND (ipaccess = "*" OR ipaccess LIKE "87.49.60.102")]
Dec 30 00:53:36 guldsrv pure-ftpd: (?@0x57313c66.hrnxx13.adsl-dhcp.tele.dk) [INFO] PAM_RHOST enabled. Getting the peer address
Dec 30 00:53:37 guldsrv pure-ftpd: (?@0x57313c66.hrnxx13.adsl-dhcp.tele.dk) [WARNING] Authentication failed for user [webhost]
Dec 30 00:53:45 guldsrv pure-ftpd: (?@0x57313c66.hrnxx13.adsl-dhcp.tele.dk) [INFO] Logout.
guldhammer is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 12-30-2007, 04:25 AM   #8 (permalink)
Registered User
 
Join Date: Dec 2007
Posts: 18
OS: Fedora Core 8


Re: Pureftpd login problem

Run the query manually then. I suspect thats meant to return something.
Deleriux is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 12-30-2007, 04:32 AM   #9 (permalink)
Registered User
 
Join Date: Dec 2007
Posts: 19
OS: Debian 4.0


Re: Pureftpd login problem

Quote:
Originally Posted by Deleriux View Post
Run the query manually then. I suspect thats meant to return something.
Mmm, can you give me the right sql code, because i get a fail in this
SELECT Dir FROM ftpd WHERE User="webhost" AND status="1" AND (ipaccess = "*" AND (ipaccess = "*" OR ipaccess LIKE "87.49.60.102")
guldhammer is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 12-30-2007, 06:18 AM   #10 (permalink)
Registered User
 
Join Date: Dec 2007
Posts: 18
OS: Fedora Core 8


Re: Pureftpd login problem

What does it say it fails doing?
Deleriux is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 12-30-2007, 06:22 AM   #11 (permalink)
Registered User
 
Join Date: Dec 2007
Posts: 19
OS: Debian 4.0


Re: Pureftpd login problem

Quote:
Originally Posted by Deleriux View Post
What does it say it fails doing?
With this in phpmyadmin:
Code:
SELECT Dir FROM ftpd WHERE User="webhost" AND status="1" AND (ipaccess = "*" AND (ipaccess = "*" OR ipaccess LIKE "87.49.60.102")


Fail:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIMIT 0, 30' at line 2

i think the string is not correct ended, but i just cant figure it.
guldhammer is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 12-30-2007, 07:24 AM   #12 (permalink)
Registered User
 
Join Date: Dec 2007
Posts: 18
OS: Fedora Core 8


Re: Pureftpd login problem

Dont use phpmyadmin, it plays with your statements to get it to work the way it wants. Use the mysql command line client.
Deleriux is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 12-30-2007, 10:03 AM   #13 (permalink)
Registered User
 
Join Date: Dec 2007
Posts: 19
OS: Debian 4.0


Re: Pureftpd login problem

Quote:
Originally Posted by Deleriux View Post
Dont use phpmyadmin, it plays with your statements to get it to work the way it wants. Use the mysql command line client.
Well now i tried from my shell (the same thing as CMD in Winblows), and it says:
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
krazymail:~# SELECT Dir FROM ftpd WHERE User="webhost" AND status="1" AND (ipaccess = "*" AND (ipaccess = "*" OR ipaccess LIKE "87.49.60.102")
-bash: syntax error near unexpected token `('
guldhammer is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 12-30-2007, 10:05 AM   #14 (permalink)
Registered User
 
Join Date: Dec 2007
Posts: 18
OS: Fedora Core 8


Re: Pureftpd login problem

you need to use the mysql command line client.

SQL doesnt work in bash :).
Deleriux is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 12-30-2007, 10:31 AM   #15 (permalink)
Registered User
 
Join Date: Dec 2007
Posts: 19
OS: Debian 4.0


Re: Pureftpd login problem

Quote:
Originally Posted by Deleriux View Post
you need to use the mysql command line client.

SQL doesnt work in bash :).
Where do i find this??
guldhammer is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 12-30-2007, 11:25 AM   #16 (permalink)
Registered User
 
Join Date: Dec 2007
Posts: 18
OS: Fedora Core 8


Re: Pureftpd login problem

type mysql into bash ;).

You might need a username and password too. For that you can of course type

man mysql
to find all the switches.
Deleriux is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 01-06-2008, 12:51 PM   #17 (permalink)
Registered User
 
Join Date: Dec 2007
Posts: 19
OS: Debian 4.0


Re: Pureftpd login problem

Hi there.

I found the fail, it was a missing ) in the end, the correct code is
->
mysql> SELECT Dir FROM ftpd WHERE User="goldie" AND status="1" AND (ipaccess = "*" AND (ipaccess = "*" OR ipaccess LIKE "*"));
<-
guldhammer is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 03-31-2008, 05:42 PM   #18 (permalink)
Registered User
 
Join Date: Dec 2007
Posts: 19
OS: Debian 4.0


Re: Pureftpd login problem

Quote:
Originally Posted by guldhammer View Post
Hi there.

I found the fail, it was a missing ) in the end, the correct code is
->
mysql> SELECT Dir FROM ftpd WHERE User="goldie" AND status="1" AND (ipaccess = "*" AND (ipaccess = "*" OR ipaccess LIKE "*"));
<-
But in which file should i change this?
guldhammer is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT -7. The time now is 11:22 PM.



Copyright 2001 - 2009, Tech Support Forum
Home Tips Plus | Outdoor Basecamp | Automotive Support Forum

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85