Score:0

How to improve login speed in Pure-FTPd

br flag

I'm using Pure-FTPd on Ubuntu 20.04.3 LTS machine (focal). Packages are the following:

pure-ftpd-common/focal,now 1.0.49-4 all [installed,automatic]
pure-ftpd/focal,now 1.0.49-4 amd64 [installed]

I configured virtual users in PureDB and I disabled PAM and Unix authentications. These are the configuration keys:

AnonymousOnly: no
BrokenClientsCompatibility: yes
ChrootEveryone: yes
Daemonize: yes
DisplayDotFiles: yes
DontResolve: yes
FSCharset: UTF-8
IPV4Only: yes
MaxClientsNumber: 50
MaxClientsPerIP: 5
MaxIdleTime: 60
MinUID: 30
NoAnonymous: yes
PAMAuthentication: no
PassivePortRange: 35000 36000
ProhibitDotFilesWrite: no
PureDB: /etc/pure-ftpd/pureftpd.pdb
TLS: 0
UnixAuthentication: no
UserBandwidth: 1000
VerboseLog: yes

Login is extremely slow (5-7 seconds) connecting from localhost. How can I improve its speed?

vidarlo avatar
ar flag
What does your log shows? Is some login step failing?
Niccolò Venturoli avatar
br flag
Nothing is failing, it's just slow on `pass` command
Score:0
sg flag

How do you change the encryption method from argon1 to md5 after generating the password with mkpasswd ?

I tried to change the string "argon2" to "md5" in pureftpd.passwd but it didn't work.

Score:0
mg flag

I had the same problem and then I found out that it's just argon2 hashing of the password. So if you create a virtual user, you have to give a password when creating, but after that generate password hash with another algorithm and change the encrypted password in the pureftpd.passwd before running pure-pw mkdb. Also don't use pure-pw passwd or you will get a user with slow login.

Use for example mkpasswd and md5: echo wantedpass | mkpasswd -s5

With md5 hashed passwords the login is very fast.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.