How to change the password of a (vsftpd) FTP account when 'passwd' isnt working

57,167

If your FTP server is using virtual users (check local_enable in the /etc/vsftpd.conf file, see man vsftpd.conf), you may have a login.txt file under /etc/vsftpd/, which is of the following form :

login1
password1
login2
password2
etc.

In this case you have to edit it, then use the following command to update the DB :

db4.7_load -T -t hash -f /etc/vsftpd/login.txt /etc/vsftpd/login.db

(you may have to replace db4.7_load by your version of dbXX_load).

Share:
57,167

Related videos on Youtube

Flion
Author by

Flion

Updated on September 18, 2022

Comments

  • Flion
    Flion over 1 year

    Kinda newbie here,

    I have a server which uses vsftpd. I changed the password of user 'aa' from the root account with 'passwd aa', which changed the SSH password for user 'aa', but not for his FTP account.

    I can't seem to find much other info on changing a vsftpd password.

    Any tips?

    • Admin
      Admin almost 11 years
      Look at what authentication method vsftpd is using, DB, or config files maybe?
    • Admin
      Admin almost 11 years
      Are you using a management panel like Webmin, cPanel or Plesk? Many of these do not create system users but have users specific to FTP.
  • Ziyuan
    Ziyuan over 7 years
    I don't see these login.txt and login.db in man vsftpd.conf.
  • Skippy le Grand Gourou
    Skippy le Grand Gourou over 7 years
    @ziyuang The reference to man vsftpd.conf is only to give more details about local_enable.