Linux adds new FTP user interpreter as /sbin/nologin, unable to log in to FTP service (solved)

I want to add a new test user to the FTP service this afternoon, but after adding it, I found that I could not log in to the FTP service. It always reported 530. The
Insert picture description here
reason for user authentication failure : vsftpd will check the user's shell by default. If the user's shell is in /etc/ No record of shells, you cannot log in to ftp

Solution: Add the user's shell (interpreter) in the /etc/shells file.
vim /etc/shells
Insert picture description here
Supplement: The role of the /etc/shells file
    1. When some services of the system are running, go back and check the shells used by the user. And these shell queries rely on the file /etc/shells.
    2. Modifying the file will not affect the user's permission to log in to the server host. The file is provided to the interpreter for certain services of the system to determine whether a user is a valid user. For example, the ftp user interpreter I created is /sbin/nologin. /Sbin/nologin is not added to the system's /etc/shells file, so the ftp user I created cannot log in to the ftp service. After adding /sbin/nologin to the /etc/shells file, the problem is solved.

Guess you like

Origin blog.csdn.net/weixin_44901564/article/details/108059263