Categories

Tuesday, 16 April 2013

How to fix PROFTPD login failed error

Hello,


If you got incorrect password  on proftpd after installing the package succesfully  and created a user correctly.


First check /var/log/messages


The error for me is as follows.


Apr 16 15:04:15 backup1 proftpd[14860]: ) - FTP session opened.
Apr 16 15:04:14 backup1 proftpd[14837]: - FTP session closed.


Then check the /var/log/secure


If you see error as
USER ftpuser (Login failed): Incorrect password.
Apr 16 14:56:45 backup1 proftpd: PAM unable to dlopen(/lib64/security/pam_stack.so): /lib64/security/pam_stack.so: cannot open shared object file: No such file or directory


PAM adding faulty module: /lib64/security/pam_stack.so


Then it is due to some incorrect settings on the default pam security settings of proftpd in


/etc/pam.d/proftpd


take a backup of it and then replace all the codes with below settings


#%PAM-1.0M-1.0
auth required pam_listfile.so item=user sense=deny file=/etc/ftpusers onerr=succeed
auth required pam_shells.so
auth include system-auth
account include system-auth
#session include system-auth
session required pam_loginuid.so
Then save the file and restart proftpd service


Then try to login with the created user. You should be able to login.

Reference-http://blog.redbranch.net/2012/04/17/proftpd-centos-6-pam-unable-to-dlopen-lib64securitypam_stack-so/


Regards
Syamkumar.M

17 comments:

  1. Thanks a lot.

    My ftp was blocked and your solution works !

    You save me a lot of time.

    ReplyDelete
    Replies
    1. Great .. Glad that your issue has been fixed. You are always welcome.

      Regards
      Syamkumar.M

      Delete
    2. agreed, thanks for the help, worked great for vsftpd 1.2.1

      Delete
  2. Brilliant! I had updated ProFTP by Webmin on CentOS 6. After this I could not login anymore with the FTP Users. I don't know what you did but it is working.

    ReplyDelete
    Replies
    1. Thank you for your feedback, glad that your issue has been fixed....

      Delete
  3. thanks a lot! I've fucked my mind many times before, but now it fixed! Fuck yeah!

    ReplyDelete
    Replies
    1. Thank you for the feedback....., glad that your issue has been fixed....

      Delete
  4. It worked for me too :)
    Thank You Syamkumar,

    regards

    ReplyDelete
    Replies
    1. Thank you for the feedback....., glad that your issue has been fixed....

      Delete
  5. Yup...this was it. Two hours of hair pulling is over!

    ReplyDelete
  6. Hacia dias que mi ftp se colgaba, gracias a tu post se soluciono el problema. Gracias!!

    ReplyDelete
  7. I keep getting the same problem no luck for me :(

    ReplyDelete
  8. Thank you so much for this - works perfectly! :-)

    ReplyDelete
  9. One point to note that burned me is ... pam_shells.so

    pam_shells.so - this requires that all the allowable shells be in /etc/shells.

    With NIS, because we have many different distro's of Linux and Solaris, our NIS shells are all /usr/local/bin/

    On the machines themselves, in /usr/local/bin/ we create soft links to the shells. i.e. /usr/local/bin/bash --> /bin/bash

    Where I got burned is... even though /bin/bash is in /etc/shells, /usr/local/bin/bash also needs to be in there.

    It's a 10 second fix, but it took me a long time to figure out.

    ReplyDelete

Ad