Get the App
SLTechnology News&Howtos  ›  Servers  › 

User name verification of CentOS7 vsftpd login

Shulou Source: shulou.com Published: 2022-06-02 08:44:42 11月13日 Update

CentOS6 has no problems, but CentOS 7 local users can't log in.

Solution 1:

Modify/etc/pam.d/vsftpd

vim /etc/pam.d/vsftpd

#auth required pam_shells.so

The above comments will do.

and restart the service.

systemctl retstart vsftpd

Solution 2:

Centos 7.6 vsftpd is configured, the username and password are also set, selinux is closed, the firewall is also closed, but the user name and password are not logged in.

How to solve it?

All you have to do is change the user directory owner and all groups to the users you added! It's that simple!

You can log in. I checked the difference between/bin/false and/sbin/nologin on the Internet and found that if you want to use false to prohibit login and allow ftp, you must add a line/bin/false to/etc/shells.

[root@nginx conf]# cat /etc/shells

/bin/sh

/bin/bash

/bin/tcsh

/bin/csh

/bin/ksh

/sbin/nologin

/bin/false

Tags: User login user name password method question one line at the same time difference owner comment directory firewall facet service input fire protection authentication Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Xiaomi NVidia macOS Microsoft MySQL