4

I have gotten access to a server which is configured by another person and I am now at the point where I am not able to access through ftp due to the fact that I do not have the ftp username and password and I cannot seem to be able to find or add a new username and password to the specific directory.

Please help me add username or change password in vsftpd.

Hypothesis
  • 153
  • 1
  • 1
  • 5

1 Answers1

4

By default vsftpd users are the ones of the system. So if you have admin access, root user or a sudoer, you can log in, view the users using getent passwd command and passwd SomeUser as root to change her/his password.
adduser SomeName to add a user.

Check also for virtual users for vsftpd. Inside vsftpd.conf file search for something like:
pam_service_name=
and then locate this file name inside /etc/pam.d/

In case PAM mechanism is confusing you, a good indication of virtual users is virtual_use_local_privs=
inside vsftpd.conf.

Krackout
  • 1,575
  • 7
  • 20
  • I have a vsftpd.userlist in my /etc which has one username user1 inside it however upon changing the password of this user ( which by the way exists ) I still cannot login to my ftp as I get 530 Login incorrect. – Hypothesis Nov 19 '20 at 19:21
  • Make a backup of `vsftpd.userlist` and then try `htpasswd /etc/vsftpd.userlist user1`. If that doesn't work restore the file and have a look at this: http://howto.gumph.org/content/setup-virtual-users-and-directories-in-vsftpd/ You need to check vsftpd.conf carefully to fully understand the setup. Virtual users' passwords are stored hashed in a file the admin makes, you need to locate it. Also it may be a case where an admin made both a system and a virtual user using the same name. – Krackout Nov 20 '20 at 07:58