OK. I know this is one of the most asked questions here. But most answers are either telling me to add nologin to allowed shells (nope... not doing that) or disabling SELinux (which i don't have - Ubuntu Server 16.04 RPi3).
Another option is saw was setting my pam_service_name
to ftp
. Well this worked! But then I further read that this allows anyone to login as it is just bypassing PAM service. So I thought well lets make a file named ftp
in the /etc/pam.d/
directory and work with that.
I filled the file with the following:
auth required /lib/arm-linux-gnueabihf/security/pam_nologin.so
account required /lib/arm-linux-gnueabihf/security/pam_unix.so
password required /lib/arm-linux-gnueabihf/security/pam_unix.so
I am missing something, i don't know what. This is the first time I'm messing with PAM so honestly I have no idea what I am doing.
The setup I want is to only allow unix users with nologin
shell to be authenticated by vsftpd
.
Regards