Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
HOWTO: PureFTPD with MySQL Auth + MyPhpAdmin
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
cpu
Tux's lil' helper
Tux's lil' helper


Joined: 09 Nov 2003
Posts: 122
Location: POLAND/ZG

PostPosted: Tue Oct 19, 2004 7:50 pm    Post subject: Reply with quote

ikaro wrote:
it looks like you didnt change the default values for the user ID and Group ID.

-1 its there, but you need to change that to the FTPGroup's ID
In my setup I have a FTPGroup and FTPUsers, and i add the accounts using that id /guid which home is /home/ftp/

change that, then it will work, if not post again.


But how can I co this ? :/ I already have ftpuser and ftpgroup but how can I setup an account using this UID/GID ??
Thanks in advance
_________________
[img]http://imagegen.last.fm/top5-green/artists/cpu.gif[/img]
Back to top
View user's profile Send private message
ikaro
Advocate
Advocate


Joined: 14 Jul 2003
Posts: 2526
Location: Denmark

PostPosted: Tue Oct 19, 2004 10:17 pm    Post subject: Reply with quote

just make the accounts, and then use its UID/GID
doesnt have to be those I wrote, it can be whatever.
_________________
linux: #232767
Back to top
View user's profile Send private message
cpu
Tux's lil' helper
Tux's lil' helper


Joined: 09 Nov 2003
Posts: 122
Location: POLAND/ZG

PostPosted: Wed Oct 20, 2004 6:36 am    Post subject: Reply with quote

ikaro wrote:
just make the accounts, and then use its UID/GID
doesnt have to be those I wrote, it can be whatever.


So I have an user:
uid=1003(test) gid=409(test) grupy=409(test)
Then I make his record:
test 1 test 1003 409 /home/ftp/test 0 0 * 0 0
Start pure-ftpd and while loging I get:
530 Authentication failed
_________________
[img]http://imagegen.last.fm/top5-green/artists/cpu.gif[/img]
Back to top
View user's profile Send private message
ikaro
Advocate
Advocate


Joined: 14 Jul 2003
Posts: 2526
Location: Denmark

PostPosted: Wed Oct 20, 2004 3:44 pm    Post subject: Reply with quote

go startover, this time read everything carefully and slow.
_________________
linux: #232767
Back to top
View user's profile Send private message
JeffBlair
Apprentice
Apprentice


Joined: 23 May 2003
Posts: 175
Location: USA, Lone star state

PostPosted: Wed Jun 29, 2005 5:35 pm    Post subject: Reply with quote

I know that this is going to be an easy question, but I want to make sure I am thinking right. In the database, where you put in the value for DIR, that is the directory that the FTP points to right?
i.e.

DIR

/var/www/jeffhome.us/jeff/ftp/

Would this send all files to that dir? Thanks.

Also, I know webmin has a way of editing the users. I don't know if this would work for MYSQL users?
Back to top
View user's profile Send private message
ikaro
Advocate
Advocate


Joined: 14 Jul 2003
Posts: 2526
Location: Denmark

PostPosted: Wed Jun 29, 2005 6:37 pm    Post subject: Reply with quote

yes.
_________________
linux: #232767
Back to top
View user's profile Send private message
COiN3D
Guru
Guru


Joined: 02 Aug 2004
Posts: 543
Location: Munich, Germany

PostPosted: Mon Aug 29, 2005 2:50 pm    Post subject: Reply with quote

Do I need Quota-Support in the Kernel to make use of the FTP-Quota-Feature?
_________________
e17 documentation | Be free and use Jabber as your IM! | Combine IRC and IM
Back to top
View user's profile Send private message
ikaro
Advocate
Advocate


Joined: 14 Jul 2003
Posts: 2526
Location: Denmark

PostPosted: Mon Aug 29, 2005 6:47 pm    Post subject: Reply with quote

nope.
_________________
linux: #232767
Back to top
View user's profile Send private message
T|TaN
n00b
n00b


Joined: 07 Apr 2004
Posts: 22

PostPosted: Sat Dec 03, 2005 2:50 pm    Post subject: Reply with quote

wow this is a great idea I have been looking for something like this.

My question is, has anyone implemented this into a website? I already have a Postnuke website which stores information in mysql including username and passwords. I run an ftp site as well, and ideally I would like to synchronize the web users and ftp users. Currently this is done manually, and well it gets to be a pain or I just don't do it. Through the postnuke website the users can reset their passwords and/or if they forget their password they can have it emailed to a registered address. This would be a seamless system and would help prevent password inconsistency.

If someone has setup such a concept I would really like to hear the details.
If someone has ideas on the constructs of how I could apply the solution outlined in this original post to my application, I would love to hear them as well.

Take Care!
Back to top
View user's profile Send private message
nuss
n00b
n00b


Joined: 04 Dec 2005
Posts: 1

PostPosted: Sun Dec 04, 2005 6:40 am    Post subject: Reply with quote

i need your help, i try conect to my ftp with my User and pass...but i can't becouse say me "Login failed error 530"

y followed this guide..

I use this command to Startup My PureFTPD server:
Quote:
/usr/local/sbin/pure-ftpd - l mysql:/etc/pureftpd-mysql.conf &



pureftpd-mysql.conf --> is Correctly formed

My SQL server is Online, ANd All DB was Created

pliss help me, y search in all manual, but can't solve this..

PS: sorry my english is very bad :3
Back to top
View user's profile Send private message
Aikidoka69
n00b
n00b


Joined: 03 Jun 2004
Posts: 42
Location: Baltimore, MD

PostPosted: Thu Jun 15, 2006 2:03 pm    Post subject: Reply with quote

I also am getting the
[09:59:56] PASS (hidden)
[09:59:56] 530 Login authentication failed
messages.

Yes mysql is running. Pure-ftp is connecting to the db. If I change the password in the pureftpd-mysql.conf it will spit an error in the logs so it appears to connect when the password is right. The individual queries work when copied to the mysql command line. But no go on the log in. Linux ftp uid and gid are both 21. User's status is set to 1 with a Uid and Gid of 21. User's home dir is set to the ftp user home dir.

MySQL is version 5.0.22.
Pure-ftpd is version 1.0.12.

The problem turns out to be a difference between the Wiki version and forum version. The Wiki uses MYSQLCrypt md5 while the top of the forum lists cleartext. Being that the Wiki does not mention putting the password in as an md5 hash, most people will end up with a non working setup after following the wiki step by step. If you are getting authentication errors try setting your MYSQLCrypt setting to cleartext and restarting pureftpd.

Of course, you can also just MD5 encrypt your password. If you are doing manual inserts, just put MD5(<password>) into your statement for your password. If you are using phpmyadmin, select md5 from the function list for that field.
Back to top
View user's profile Send private message
vladoportos
n00b
n00b


Joined: 02 May 2006
Posts: 22

PostPosted: Thu Jul 20, 2006 8:11 am    Post subject: Reply with quote

Hmm for my its working only with cleartext which is apsolutely insecure... when i use any ecryption e.g. md5 it cant log in... it will not recognize password... any idea ?

And yes i put md5 hashed pass in mysql...
Back to top
View user's profile Send private message
Aikidoka69
n00b
n00b


Joined: 03 Jun 2004
Posts: 42
Location: Baltimore, MD

PostPosted: Thu Jul 20, 2006 11:51 am    Post subject: Reply with quote

vladoportos wrote:
Hmm for my its working only with cleartext which is apsolutely insecure... when i use any ecryption e.g. md5 it cant log in... it will not recognize password... any idea ?

And yes i put md5 hashed pass in mysql...


Have you checked both your pure-ftpd and mysql logs for clues?
Back to top
View user's profile Send private message
vladoportos
n00b
n00b


Joined: 02 May 2006
Posts: 22

PostPosted: Thu Jul 20, 2006 1:40 pm    Post subject: Reply with quote

I found out that it vas permission problem in mysql its working fine now... :)
Back to top
View user's profile Send private message
lotherk
n00b
n00b


Joined: 03 Aug 2006
Posts: 1

PostPosted: Thu Aug 03, 2006 12:27 pm    Post subject: I had to... Reply with quote

... modify the /etc/init.d/pure-ftpd script, since it seems that the values in the /etc/conf.d/pure-ftpd are not taken from this script. Don't know why.

So i wrote a little C programm:

Code:
#include <stdio.h>

int main(void) {

        system("/usr/sbin/pure-ftpd -l mysql:/etc/pureftpd-mysql.conf -j -A &");

        return 0;
}


And i changed the start() section from /etc/init.d/pure-ftpd:
Code:

start() {
        checkconfig || return 1
        ebegin "Starting Pure-FTPd"
        #start-stop-daemon --start --quiet --exec /usr/sbin/pure-ftpd -- $SERVER $MAX_CONN $MAX_CONN_IP $DAEMON $DISK_FULL $USE_NAT $AUTH $LOG $.....
        start-stop-daemon --start --quiet --exec  "/usr/sbin/pftpd"
        eend $?
}


Then i've compiled my little C program 'gcc -o pftpd pftpd.c' and moved it to /usr/sbin.

/etc/init.d/pure-ftpd start/stop works just fine.

There might be a different solution for this problem, but this works just fine for me.

Greets, Konrad.
Back to top
View user's profile Send private message
ikaro
Advocate
Advocate


Joined: 14 Jul 2003
Posts: 2526
Location: Denmark

PostPosted: Fri Aug 04, 2006 1:38 pm    Post subject: user manager Reply with quote

ive since droped this method of using phpmyadmin and moved over some other web user administration,
the latest being this one:
http://linux.softpedia.com/progScreenshots/User-manager-for-PureFTPd-Screenshot-5446.html

works pretty well.
easy to install.
_________________
linux: #232767
Back to top
View user's profile Send private message
Jumento
n00b
n00b


Joined: 08 Apr 2006
Posts: 27

PostPosted: Wed Dec 20, 2006 12:56 pm    Post subject: Reply with quote

Hello,

I got a question. I was also following this guide to setup my ftpserver.

And am also using the following user manager as front-end: http://machiel.generaal.net/index.php?subject=user_manager_pureftpd

Only a question.

Is it possible to set a maximum of logins per userid?

Don't know of this is the right spot to ask this.
Back to top
View user's profile Send private message
ikaro
Advocate
Advocate


Joined: 14 Jul 2003
Posts: 2526
Location: Denmark

PostPosted: Wed Dec 20, 2006 5:50 pm    Post subject: Reply with quote

hi,
you set that in /etc/conf.d/pure-ftpd
_________________
linux: #232767
Back to top
View user's profile Send private message
Jumento
n00b
n00b


Joined: 08 Apr 2006
Posts: 27

PostPosted: Thu Dec 21, 2006 10:36 am    Post subject: Reply with quote

ikaro wrote:
hi,
you set that in /etc/conf.d/pure-ftpd


How?

In this file i can find the option for:
"Max_Conn" ==> total connections
"Max_Conn_IP"==> total connections from IP

But can't find the option to set it per userid
So that ftpuser1 is allowed to login twice, but ftpuser2 is allowed to login only once.
Back to top
View user's profile Send private message
ikaro
Advocate
Advocate


Joined: 14 Jul 2003
Posts: 2526
Location: Denmark

PostPosted: Thu Dec 21, 2006 7:38 pm    Post subject: Reply with quote

oh im sorry,

I read it as userip not user ID. :roll:


You can do that using the text mode "pure-pw" and use the "-y" switch.

You can code that feature in php and send a patch to the author of the puremanager.

example for 1 login only:
Code:

pure-pw useradd TestUser -f 2121 -g 2121 -d /home/ftp/TestUser -r 192.168.0.4 -y 1


for more info use "pure-pw" with no switch.
:wink:
_________________
linux: #232767
Back to top
View user's profile Send private message
Jumento
n00b
n00b


Joined: 08 Apr 2006
Posts: 27

PostPosted: Fri Dec 22, 2006 12:51 pm    Post subject: Reply with quote

thnx.. that was the option i was looking for.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum