Due to the project requirements: you need to build an FTP. After setting up the folder, create a new user and grant corresponding permissions. The following error message appears when I log in to the FTP site.
My running environment: centos8.2 64bit
II. Solutions (Four Methods)
There are four ways to collect online information. Please choose different solutions according to your own problems
(1) the host to log in does not create an account and its corresponding permissions.
cat /etc/passwd
If you find that you don’t have the account you created, create another one.
(2) after entering the correct password, it still reports an error. Users’ passwords can be modified;
Command: passwd username
Try signing in again. If you still report an error, look again (3)
(3) comment out pam_shells.so
FTP allows local users to log in. As a result, this error is always reported when logging in. I found a lot of information on the Internet, and finally solved it:
backup:
cp /etc/pam.d/vsftpd /etc/pam.d/vsftpd.bak
Modification:
vim /etc/pam.d/vsftpd
Comment out the following line:
#auth required pam_shells.so
Then log in again, it’s OK.
(4) check whether cat /etc/shells has your users
Check what the home directory of your login account corresponds to the login shell. Mine is /sbin/nologin user name: Password: user ID: group ID: annotative Description: Home Directory: login shell
cat /etc/passwd,
Check whether cat /etc/shells has your user’s home directory and login shell, without adding, saving and exiting.
cat /etc/shells