I created an user with:

useradd -m -s /bin/false testuser

Also I added in the vsftpd.user_list 'testuser' and changed the password with passwd. After a restart of the vsftpd service I wanted to log on on the server but I got the Error 530 (Login incorrect). Why can 't I log on on the server? With the default user, who was created on the installation of the server, it works. Why?


3 Answers 3


I had a similar situation in the past, in my case the problem was that /bin/false is not a shell. (Sorry, can't explain better, forgot the background. I think it had something to do with PAM.)

Many older tutorials recommend settings /bin/false as shell for no-login users, but the better choice is /usr/sbin/nologin.

Try setting /usr/sbin/nologin as login shell for FTP users:

usermod -s /usr/sbin/nologin USERNAME

Then try logging in again.

  • I tried this solution, but it didn't work. Also as I set the user on /bin/true, it didn't work.
    – ssd_rider
    Commented May 23, 2015 at 11:43

I solved this with an reinstall of vsftpd. Now the user works.


@lxg You were really close to did this.

I agree that /usr/sbin/nologin is not a shell because you didnt add it to /etc/shells. So if you append this line to shells file to looks like for example this:

# /etc/shells: valid login shells

That solves the problem.

Of course command to login as user you have to use

 usermod -s /usr/sbin/nologin USERNAME

and match permissions of shared directory.

To roll back login possibility just use:

usermod -s /bin/bash USERNAME 

BTW. Only this way works for me on Ubuntu 16.04.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .