LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 05-29-2013, 06:19 AM   #1
mbnoimi
LQ Newbie
 
Registered: Nov 2012
Location: Syria
Distribution: Linux Mint XFCE
Posts: 28

Rep: Reputation: Disabled
pure-ftpd virtual user issue


All virtual users of pure-ftpd can't login although I configured them without any error message!

Login error message:
Code:
220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
220-You are user number 1 of 10 allowed.
220-Local time is now 13:01. 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 5 minutes of inactivity.
       USER test
331 User test OK. Password required
       PASS (password not shown)
530 Login authentication failed
Here's pure-ftpd configurations:
Code:
mbnoimi-pc conf # apt-get install pure-ftpd
mbnoimi-pc conf # cd /etc/pure-ftpd/conf/
mbnoimi-pc conf # echo yes > ChrootEveryone
mbnoimi-pc conf # echo yes > CreateHomeDir
mbnoimi-pc conf # echo 10 > MaxClientsNumber
mbnoimi-pc conf # echo 3 > MaxClientsPerIP
mbnoimi-pc conf # echo yes > NoAnonymous
mbnoimi-pc conf # echo no > DisplayDotFiles
mbnoimi-pc conf # echo yes > DontResolve
mbnoimi-pc conf # echo 5 > MaxIdleTime
mbnoimi-pc conf # echo yes > PAMAuthentication
mbnoimi-pc conf # echo no > AnonymousCanCreateDirs 
mbnoimi-pc conf # echo 007 007 > Umask
mbnoimi-pc conf # echo yes > ProhibitDotFilesWrite
mbnoimi-pc conf # echo yes > ProhibitDotFilesRead
mbnoimi-pc conf # echo no > AutoRename
mbnoimi-pc conf # echo yes > NoChmod
mbnoimi-pc conf # echo no > KeepAllFiles
mbnoimi-pc conf # echo 0 > TLS
mbnoimi-pc conf # /etc/init.d/pure-ftpd restart
Restarting ftp server: Running: /usr/sbin/pure-ftpd -l pam -j -x -X -C 3 -Y 0 -H -I 5 -R -E -u 1000 -U 007:007 -A -O clf:/var/log/pure-ftpd/transfer.log -8 UTF-8 -c 10 -B
mbnoimi-pc pure-ftpd # ls auth/
65unix  70pam
mbnoimi-pc pure-ftpd # cat auth/65unix 
no
mbnoimi-pc pure-ftpd # cat auth/70pam 
yes
mbnoimi-pc pure-ftpd # cat pureftpd.passwd 
test:$1$O1zF99b0$oH7S4lxScfwMoPpyvBywr.:119:130::/home/ftpusers/./::::::::::::
mbnoimi-pc pure-ftpd #
http://imageshack.us/a/img24/5412/pureadminusers001.png

Last edited by mbnoimi; 05-29-2013 at 06:23 AM.
 
Old 06-01-2013, 09:16 PM   #2
mbnoimi
LQ Newbie
 
Registered: Nov 2012
Location: Syria
Distribution: Linux Mint XFCE
Posts: 28

Original Poster
Rep: Reputation: Disabled
Bump
 
Old 06-02-2013, 01:34 AM   #3
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Hi,

There is no "-lpuredb:/etc/pureftpd.pdb" among the other runtime options.
As this looks like a debian box, have a look at this howto for details

Regards
 
Old 06-02-2013, 02:01 AM   #4
mbnoimi
LQ Newbie
 
Registered: Nov 2012
Location: Syria
Distribution: Linux Mint XFCE
Posts: 28

Original Poster
Rep: Reputation: Disabled
Quote:
There is no "-lpuredb:/etc/pureftpd.pdb" among the other runtime options.
How can I add it?
I tried to add it through but nothing changed!
Code:
mbnoimi@mbnoimi-pc ~ $ sudo pure-pw mkdb
mbnoimi@mbnoimi-pc ~ $ sudo pure-pw list
test                /home/ftpusers/./      
mbnoimi@mbnoimi-pc ~ $ ls -R /etc/pure-ftpd/
/etc/pure-ftpd/:
auth  conf  db  pureftpd-dir-aliases  pureftpd.passwd  pureftpd.pdb

/etc/pure-ftpd/auth:
65unix  70pam

/etc/pure-ftpd/conf:
AltLog                  AutoRename      CreateHomeDir    DontResolve  KeepAllFiles      MaxClientsPerIP  MinUID       NoChmod            ProhibitDotFilesRead   PureDB  Umask
AnonymousCanCreateDirs  ChrootEveryone  DisplayDotFiles  FSCharset    MaxClientsNumber  MaxIdleTime      NoAnonymous  PAMAuthentication  ProhibitDotFilesWrite  TLS     UnixAuthentication
 
Old 06-02-2013, 02:24 AM   #5
mbnoimi
LQ Newbie
 
Registered: Nov 2012
Location: Syria
Distribution: Linux Mint XFCE
Posts: 28

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bathory View Post
have a look at this howto for details
I took a look and applied what it says but I got nothing!!!
Code:
mbnoimi-pc mbnoimi # pure-pw useradd test1 -u ftpuser -d /home/ftpusers/test1
Password: 
Enter it again: 
mbnoimi-pc mbnoimi # pure-pw show test1

Login              : test1
Password           : $1$EI7InKU0$XF83gt49Z9F4QLtfryxai0
UID                : 119 (ftpuser)
GID                : 130 (ftpgroup)
Directory          : /home/ftpusers/test1/./
Full name          : 
Download bandwidth : 0 Kb (unlimited)
Upload   bandwidth : 0 Kb (unlimited)
Max files          : 0 (unlimited)
Max size           : 0 Mb (unlimited)
Ratio              : 0:0 (unlimited:unlimited)
Allowed local  IPs : 
Denied  local  IPs : 
Allowed client IPs : 
Denied  client IPs : 
Time restrictions  : 0000-0000 (unlimited)
Max sim sessions   : 0 (unlimited)

mbnoimi-pc mbnoimi # ls -R /home/ftpusers/
/home/ftpusers/:
mbnoimi-pc mbnoimi #
PS
I want to use virtual users

Last edited by mbnoimi; 06-02-2013 at 02:25 AM. Reason: add PS
 
Old 06-02-2013, 02:52 AM   #6
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
I'm not running Debian, but according to the howto, you need to disable PAM and (maybe) Unix auth
Also you have to create a symlink
Code:
#cd /etc/pure-ftpd/auth
#ln -s ../conf/PureDB 50pure
 
Old 06-02-2013, 03:02 AM   #7
mbnoimi
LQ Newbie
 
Registered: Nov 2012
Location: Syria
Distribution: Linux Mint XFCE
Posts: 28

Original Poster
Rep: Reputation: Disabled
Unhappy

Quote:
Originally Posted by bathory View Post
I'm not running Debian, but according to the howto, you need to disable PAM and (maybe) Unix auth
Also you have to create a symlink
Code:
#cd /etc/pure-ftpd/auth
#ln -s ../conf/PureDB 50pure
Didn't fix the issue
 
Old 06-02-2013, 08:08 AM   #8
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
Originally Posted by mbnoimi View Post
Didn't fix the issue
Doh.
Try to run it directly from CLI:
Code:
/usr/sbin/pure-ftpd -l -j -x -X -C 3 -Y 0 -H -Ipuredb:/etc/pureftpd.pdb 5 -R -E -u 1000 -U 007:007 -A -O clf:/var/log/pure-ftpd/transfer.log -8 UTF-8 -c 10 -B
and see what you get
 
Old 06-02-2013, 03:42 PM   #9
mbnoimi
LQ Newbie
 
Registered: Nov 2012
Location: Syria
Distribution: Linux Mint XFCE
Posts: 28

Original Poster
Rep: Reputation: Disabled
Code:
mbnoimi-pc mbnoimi # /usr/sbin/pure-ftpd -l -j -x -X -C 3 -Y 0 -H -Ipuredb:/etc/pureftpd.pdb 5 -R -E -u 1000 -U 007:007 -A -O clf:/var/log/pure-ftpd/transfer.log -8 UTF-8 -c 10 -B
421 Unknown authentication method: -j
mbnoimi-pc mbnoimi # /usr/sbin/pure-ftpd -l -x -X -C 3 -Y 0 -H -Ipuredb:/etc/pureftpd.pdb 5 -R -E -u 1000 -U 007:007 -A -O clf:/var/log/pure-ftpd/transfer.log -8 UTF-8 -c 10 -B
421 Unknown authentication method: -x
mbnoimi-pc mbnoimi # /usr/sbin/pure-ftpd -l -X -C 3 -Y 0 -H -Ipuredb:/etc/pureftpd.pdb 5 -R -E -u 1000 -U 007:007 -A -O clf:/var/log/pure-ftpd/transfer.log -8 UTF-8 -c 10 -B
421 Unknown authentication method: -X
mbnoimi-pc mbnoimi # /usr/sbin/pure-ftpd -l -C 3 -Y 0 -H -Ipuredb:/etc/pureftpd.pdb 5 -R -E -u 1000 -U 007:007 -A -O clf:/var/log/pure-ftpd/transfer.log -8 UTF-8 -c 10 -B
421 Unknown authentication method: -C
mbnoimi-pc mbnoimi # /usr/sbin/pure-ftpd -l -Y 0 -H -Ipuredb:/etc/pureftpd.pdb 5 -R -E -u 1000 -U 007:007 -A -O clf:/var/log/pure-ftpd/transfer.log -8 UTF-8 -c 10 -B
421 Unknown authentication method: -Y
mbnoimi-pc mbnoimi #
 
Old 06-03-2013, 12:15 AM   #10
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
My bad. I left an extra -l, sorry
Code:
/usr/sbin/pure-ftpd -j -x -X -C 3 -Y 0 -H -Ipuredb:/etc/pureftpd.pdb 5 -R -E -u 1000 -U 007:007 -A -O clf:/var/log/pure-ftpd/transfer.log -8 UTF-8 -c 10 -B

Last edited by bathory; 06-03-2013 at 12:16 AM.
 
Old 06-03-2013, 12:33 AM   #11
mbnoimi
LQ Newbie
 
Registered: Nov 2012
Location: Syria
Distribution: Linux Mint XFCE
Posts: 28

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bathory View Post
My bad. I left an extra -l, sorry
Code:
/usr/sbin/pure-ftpd -j -x -X -C 3 -Y 0 -H -Ipuredb:/etc/pureftpd.pdb 5 -R -E -u 1000 -U 007:007 -A -O clf:/var/log/pure-ftpd/transfer.log -8 UTF-8 -c 10 -B
Didn't fix the issue!
Code:
220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
220-You are user number 1 of 10 allowed.
220-Local time is now 07:32. 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.
       USER test
331 User test OK. Password required
       PASS (password not shown)
530 Login authentication failed
 
Old 06-03-2013, 01:32 AM   #12
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Where is pureftpd.pdb located? Note that you need to use that location in /etc/pure-ftpd/conf/PureDB
Also, are you sure about the user/password? Change it with:
Code:
pure-pw passwd test
pure-pw mkdb
and try to login again

You can also run the server with less options and in debug mode to check virtual users. Use the correct location of pureftpd.pdb below:
Code:
/usr/sbin/pure-ftpd -I puredb:/etc/pure-ftpd/pureftpd.pdb -x -E -j -R -d
 
Old 06-03-2013, 01:48 AM   #13
mbnoimi
LQ Newbie
 
Registered: Nov 2012
Location: Syria
Distribution: Linux Mint XFCE
Posts: 28

Original Poster
Rep: Reputation: Disabled
Quote:
Where is pureftpd.pdb located? Note that you need to use that location in /etc/pure-ftpd/conf/PureDB
I post it above https://www.linuxquestions.org/quest...8/#post4963881

Quote:
Also, are you sure about the user/password? Change it with:
Yes I'm sure, Any way I change it as you suggested
Code:
mbnoimi-pc mbnoimi # pure-pw passwd test
Password: 
Enter it again: 
mbnoimi-pc mbnoimi # pure-pw mkdb
Quote:
You can also run the server with less options and in debug mode to check virtual users. Use the correct location of pureftpd.pdb below:
Code:
/usr/sbin/pure-ftpd -I puredb:/etc/pure-ftpd/pureftpd.pdb -x -E -j -R -d
This didn't work!
Code:
mbnoimi-pc mbnoimi # /usr/sbin/pure-ftpd -I puredb:/etc/pure-ftpd/pureftpd.pdb -x -E -j -R -d
Unable to start a standalone server: Address already in use
mbnoimi-pc mbnoimi # /etc/init.d/pure-ftpd stop
Stopping ftp server: pure-ftpd.
mbnoimi-pc mbnoimi # /usr/sbin/pure-ftpd -I puredb:/etc/pure-ftpd/pureftpd.pdb -x -E -j -R -d
Unable to start a standalone server: Address already in use
mbnoimi-pc mbnoimi #
 
Old 06-03-2013, 02:29 AM   #14
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
That's what I saw and understood that we're using the wrong file

Quote:
Unable to start a standalone server: Address already in use
If you can't stop it, you can kill it
 
Old 06-03-2013, 02:38 AM   #15
mbnoimi
LQ Newbie
 
Registered: Nov 2012
Location: Syria
Distribution: Linux Mint XFCE
Posts: 28

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bathory View Post
If you can't stop it, you can kill it
OK I succefully killed it and run it (as shown below) then tried to login once again but nothing changes.
Code:
mbnoimi-pc mbnoimi # /usr/sbin/pure-ftpd -I puredb:/etc/pure-ftpd/pureftpd.pdb -x -E -j -R -d
^Cmbnoimi-pc mbnoimi #
 
  


Reply

Tags
ftp



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help setting up virtual users with pure-ftpd GavB Linux - Software 4 08-07-2009 05:52 AM
I cannot use virtual users in pure-ftpd. kutlu Debian 0 01-05-2009 01:38 AM
Add pure-ftpd virtual user with PHP GavB Linux - Software 1 12-27-2007 01:05 PM
pure-ftpd and virtual servers mozilla Linux - Networking 1 05-03-2005 06:35 AM
pure-ftpd mysql virtual groups augustmacbizzle Linux - Software 0 04-27-2005 01:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:56 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration