Ftp login failed in linux

vsftpd: 530 Login incorrect

I can’t get vsfptd working on Ubuntu 12.04. my vsftpd.conf file looks like this, and I try to connect with a local user:

listen=YES anonymous_enable=NO local_enable=YES write_enable=YES dirmessage_enable=YES use_localtime=YES xferlog_enable=YES connect_from_port_20=YES secure_chroot_dir=/var/run/vsftpd/empty pam_service_name=vsftpd rsa_cert_file=/etc/ssl/private/vsftpd.pem 
Response: 331 Please specify the password. Command: PASS **** Response: 530 Login incorrect. 

try restarting the vsftpd. >sudo /etc/init.d/vsftpd restart I had the same issue, but this worked for me.

For me, there was just wrong format for the user in /etc/passwd — i needed to set the right home dir, shell, and the . part.

7 Answers 7

Back up the config file before making a change;

sudo cp /etc/vsftpd.conf /etc/vsftpd.conf.back 

and then edit vsftpd.conf (with vi or nano)

Then make the following change

Save your change and restart the ftp server (if you use nano hit CTRL + O & enter to save then CTRL + X to exit)

sudo service vsftpd restart 

You are disabling default access control via PAM, because default «ftp» has no rules. The default pam_service_name=vsftp uses the file /etc/pam.d/vsftpd . This file by default requires FTP users to have a shell listed in /etc/shells and requires them not to be listed in /etc/ftpusers .

@JeroenVermeulenBVBA +1 you are right. I fear some people just don’t know what’s actually happening underneath and why it appears to «work».

By default vsFTPd uses the file /etc/pam.d/vsftpd . This file by default requires FTP users to have a shell listed in /etc/shells and requires them not to be listed in /etc/ftpusers . If you check those 2 things your probably find what the problem is.

@Allen This is defined in the file /etc/passwd . Each line is the info about one user. The fields are separated by a colon (:). The 7th field contains the path to the shell binary of the user.

I did not need to change the vsftpd.conf . Only needed to make sure that a shell was set in my /etc/passwd file, that also was lited in /etc/shells .

So basically after useradd without a shell I needed to make sure the home directory was created and that the user had /bin/bash as it’s shell.

Thanks that’s what happened to me. The other solutions worked by removing all safety mechanisms, this one was actually solved the problem.

I met this problem when I tried to login in with root and I just solved it.

Check the following file (it contains list of users disallowed FTP access):

ftpusers

In my case, I commented out root from the file, then it worked.

Please make some changes in /etc/vsftpd.conf :

If you want to set access by default /var/www directory for local user you can do that with below line:

Restart vsftpd server using:

sudo service vsftpd restart 

The suggested resolution did not work for me. I gave up on the ftp user, and switched my attention to the ubuntu user. I made sure there was a password associated with the ubuntu user.

I made sure to enable passive mode, and set local_enable=YES in the vsftpd.conf file.

Читайте также:  Pppoe соединение linux mint

I was able to authenticate just fine using the ubuntu account. And I successfully uploaded a large file to my Amazon Ubuntu FTP server. Clearly there was something amiss with the ftp user.

I used Ubuntu 18.04 and LetsEncrypt certificates for TLS encryption. What worked was changing the name of the pam_service_name=ftp the error I was getting in Filezilla was:

"GnuTLS error -15": An unexpected TLS packet was received. 

You must log in to answer this question.

Highly active question. Earn 10 reputation (not counting the association bonus) in order to answer this question. The reputation requirement helps protect this question from spam and non-answer activity.

Источник

Не проходит авторизация vsftpd

Посмотрите, что у вас в /etc/pam.d/vsftd там может быть проверка имени пользователя по /etc/ftpusers, может быть проверка shell’а пользователя и пр.

Там нет конфига для vsftpd.

Fri May 24 14:29:09 2019 [pid 1] [kaya613] FAIL LOGIN: Client "192.168.0.108" Fri May 24 14:29:10 2019 [pid 1] [kaya613] FAIL LOGIN: Client "192.168.0.108" Fri May 24 14:36:17 2019 [pid 2] CONNECT: Client "192.168.0.108" Fri May 24 14:36:17 2019 [pid 1] [ftpt] FAIL LOGIN: Client "192.168.0.108" Fri May 24 14:39:08 2019 [pid 2] CONNECT: Client "192.168.0.108" Fri May 24 14:39:09 2019 [pid 1] [ftpt] FAIL LOGIN: Client "192.168.0.108" Fri May 24 14:45:26 2019 [pid 2] CONNECT: Client "192.168.0.108" Fri May 24 14:45:26 2019 [pid 1] [ftpt] FAIL LOGIN: Client "192.168.0.108" Fri May 24 14:46:10 2019 [pid 1] [ftpt] FAIL LOGIN: Client "192.168.0.108" Fri May 24 14:46:12 2019 [pid 1] [ftpt] FAIL LOGIN: Client "192.168.0.108" Fri May 24 15:00:34 2019 [pid 2] CONNECT: Client "192.168.0.108" Fri May 24 15:00:35 2019 [pid 1] [ftpt] FAIL LOGIN: Client "192.168.0.108" Fri May 24 15:01:46 2019 [pid 2] CONNECT: Client "192.168.0.108" Fri May 24 15:01:46 2019 [pid 1] [ftpt] FAIL LOGIN: Client "192.168.0.108" Fri May 24 15:01:48 2019 [pid 1] [ftpt] FAIL LOGIN: Client "192.168.0.108" Fri May 24 15:03:31 2019 [pid 1] [ftpt] FAIL LOGIN: Client "192.168.0.108" Fri May 24 15:11:29 2019 [pid 2] CONNECT: Client "192.168.0.108" Fri May 24 15:11:31 2019 [pid 1] [sayakuja] FAIL LOGIN: Client "192.168.0.108" Fri May 24 15:13:30 2019 [pid 1] [sayakuja] FAIL LOGIN: Client "192.168.0.108" Fri May 24 15:13:32 2019 [pid 1] [sayakuja] FAIL LOGIN: Client "192.168.0.108" Fri May 24 15:14:47 2019 [pid 2] CONNECT: Client "192.168.0.108" Fri May 24 15:14:48 2019 [pid 1] [sayakuja] FAIL LOGIN: Client "192.168.0.108" Fri May 24 15:14:50 2019 [pid 1] [sayakuja] FAIL LOGIN: Client "192.168.0.108" Fri May 24 15:16:37 2019 [pid 2] CONNECT: Client "192.168.0.108" Fri May 24 15:16:38 2019 [pid 1] [sayakuja] FAIL LOGIN: Client "192.168.0.108" Fri May 24 15:20:35 2019 [pid 2] CONNECT: Client "192.168.0.108" Fri May 24 15:20:35 2019 [pid 1] [sayakuja] FAIL LOGIN: Client "192.168.0.108" Fri May 24 21:38:42 2019 [pid 2] CONNECT: Client "192.168.0.108" Fri May 24 21:38:42 2019 [pid 1] [anonymous] FAIL LOGIN: Client "192.168.0.108" Sat May 25 20:08:49 2019 [pid 2] CONNECT: Client "192.168.0.108" Sat May 25 20:08:49 2019 [pid 1] [kaya613] OK LOGIN: Client "192.168.0.108" Sat May 25 20:08:51 2019 [pid 2] CONNECT: Client "192.168.0.108" Sat May 25 20:08:53 2019 [pid 1] [kaya613] OK LOGIN: Client "192.168.0.108" Sat May 25 20:08:54 2019 [pid 2] CONNECT: Client "192.168.0.108" Sat May 25 20:08:55 2019 [pid 1] [kaya613] OK LOGIN: Client "192.168.0.108" Sat May 25 20:08:56 2019 [pid 2] CONNECT: Client "192.168.0.108" Sat May 25 20:18:52 2019 [pid 2] CONNECT: Client "192.168.0.108" Sat May 25 20:18:52 2019 [pid 1] [sayakuja] FAIL LOGIN: Client "192.168.0.108" Sat May 25 20:19:03 2019 [pid 1] [sayakuja] FAIL LOGIN: Client "192.168.0.108" Sat May 25 20:19:46 2019 [pid 1] [sayakuja] FAIL LOGIN: Client "192.168.0.108" Sat May 25 20:19:58 2019 [pid 2] CONNECT: Client "192.168.0.108" Sat May 25 20:20:12 2019 [pid 1] [sayakuja] FAIL LOGIN: Client "192.168.0.108" Sat May 25 20:23:26 2019 [pid 2] CONNECT: Client "192.168.0.108" Sat May 25 20:23:26 2019 [pid 1] [sayakuja] OK LOGIN: Client "192.168.0.108" Sat May 25 20:23:28 2019 [pid 2] CONNECT: Client "192.168.0.108" Sat May 25 20:23:29 2019 [pid 1] [sayakuja] OK LOGIN: Client "192.168.0.108" Sat May 25 20:23:29 2019 [pid 2] CONNECT: Client "192.168.0.108" Sat May 25 20:23:53 2019 [pid 1] [sayakuja] FAIL LOGIN: Client "192.168.0.108" Sat May 25 20:23:57 2019 [pid 1] [sayakuja] FAIL LOGIN: Client "192.168.0.108" 

journalctl:
vsftpd[1555]: pam_unix(vsftpd:auth): authentication failure; logname= uid=0 euid=0 tty=ftp ruser=sayakuja rhost=192.168.0.108 user=sayakuja

Читайте также:  Linux перенести файл через терминал

Если в /etc/pam.d/vsftpd такое содержимое, то при попытке подключения ошибка «В соединении отказано»:

#%PAM-1.0 session optional pam_keyinit.so force revoke auth required pam_listfile.so item=user sense=deny file=/etc/vsftpd/ftpusers onerr=succeed #auth required pam_shells.so auth include password-auth account include password-auth session required pam_loginuid.so session include password-auth 

Источник

vsftpd login incorrect issue

Just a note, please consider using SFTP instead of FTP if you have the choice. It’s also a lot easier setting up, usually, in addition to being more secure: en.wikipedia.org/wiki/SSH_File_Transfer_Protocol

The principle reason for using vsftpd is eash chroot jail and using sftp is harder to do on different UNIX dialects. In fact, the best way is through a thirdparty SFTP daemon made in the UK.

3 Answers 3

  1. Look at your /etc/passwd file
  2. Find your user and look shell (example ttr:x:501:501::/home/ukraine/ttr:/sbin/nologin)
  3. Add this shell (/bin/false or /sbin/nologin) to your /etc/shell or /etc/shells

After that, check your connection

Status: Retrieving directory listing. Command: PWD Response: 257 «/home/ukraine/ttr» Status: Directory listing successful

Thanks for this info, I added a user which uses both /sbin/nologin and /bin/bash , I had to userdel then sudo useradd -m -s /bin/bash user so it can use only bash. It succeed to connect then

Don’t worry, well’ solve in a blink! 🙂
Follow my steps:

  1. Edit your config file with the nano console text editor (or your preferred text editor) and add those lines:
    userlist_enable=YES local_enable=YES
  2. If you receive errors about PAM insert or edit: pam_service_name=vsftpd
  3. Edit /etc/vsftpd/ftpusers and remove your user.
  4. Edit /etc/vsftpd/user_list and remove your user.

Important note: protect your ftp account very well and disable the anonymous login explicitly; I also suggest to use the chroot cage to prevent a user from wandering.
Suggestions: anonymous_enable=NO , chroot_local_user=YES ; doing so a remote intruder cannot escape from the home directory and an anoymous will not be able to access your server.

Have a nice experience,
please ask by commenting down here if you need more help and click the up arrow if I helped you.

Читайте также:  Linux глобальный поиск файла

Источник

Authentication failed of pure-ftpd

What’s the step to add users? I’m new to pure-ftpd and PAM authentication, but I followed pure-ftpd documentation to do pure-pw useradd then restarted pure-ftpd but no dice. It still says «authentication failed» when trying to connect with ftp client. I verified that there is a /etc/pure-ftpd/pure-ftpd.passwd entry for the user that was added. So what’s the missing piece of the puzzle?

7 Answers 7

I’ve just had a similar problem. I’ve added user using pure-pw useradd and get 530 Login authentication failed .

The solution was a symlink added to /etc/pure-ftpd/auth directory pointing to /etc/pure-ftpd/conf/PureDB (there is a path to file that keeps ftp users) that shows in alphabetical order before other files in auth , e.g.

cd /etc/pure-ftpd/auth/ ln -s ../conf/PureDB 50PureDB 

Then, ls within the same directory returns:

50PureDB -> ../conf/PureDB 65unix -> ../conf/UnixAuthentication 70pam -> ../conf/PAMAuthentication 

Did you run «pure-pw mkdb» after adding users?

No, but I just tried it. Same thing when I try to ftp localhost. The entry is still in the pureftp.passwd file. Is there any way to just make it user the linux /etc/passwd for authentication? I am the only user of the cloud instance so I don’t need ftp after this update, I will disable it. It’s irksome to get stuck on such a simple issue as ftping a file.

I recently had an issue which was solved here:

http://download.pureftpd.org/pure-ftpd/doc/FAQ 

Not enough questions link to the answers in the FAQ.

To log in, the shell assigned to your users must be listed in the /etc/shells file

Why you don’t user sfpt (ssh-ftp)? With SFPT you login by nuormal user credential.

A simple SFTP client is FileZilla.

Nevermind, ftp isn’t necessary. Just remembered ssh can be used to transfer files via scp. That is working. There’s more than one way to skin a cat.

EDIT: This is the best way to solve the situation of installing or setting up a cloud computer instance because they always give you ssh access. Since scp runs on stop of ssh to transfer files, it means there’s nothing to install or configure to transfer files.

Now if you need to do regular file updates then a different tool like maybe rsync or such would be better.

Wayne — if this is how you resolved the problem, then please mark your answer as «Accepted» so that people will now that the question is closed.

Pure FTPd is set by default in Ubuntu to authenticate using PAM. This means that you’d need to add users to the system’s user database using the command useradd .

Guys I discovered something,

The problem is not with pure-ftpd

Kindly check the ftp login password, if it has special characters in it.

Just escape the special characters in it

You must log in to answer this question.

Hot Network Questions

Subscribe to RSS

To subscribe to this RSS feed, copy and paste this URL into your RSS reader.

Site design / logo © 2023 Stack Exchange Inc; user contributions licensed under CC BY-SA . rev 2023.7.13.43531

By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy.

Источник

Оцените статью
Adblock
detector