User login settings in /etc/passwd

Hi
When adding a user to my system using the default adduser xxx command, the suer can (by default) log in via ssh as long as I set a password.

What I want is for some users to NOT be able to log in via SSH, yet, they must still be able to use vsftp.

If I change the /etc/passwd entry for the specific user to /bin/nologin, then the user cannot login via SSH , but the user cannot use ftp either...

Is there a way?
LVL 17
psimationAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
jlevieConnect With a Mentor Commented:
Does /etc/shells include /bin/nologin? If not it will prevent the user from being able to log in via FTP.
0
 
psimationAuthor Commented:
Hi Jim
Yes, it does contain /sbin/nologin ( sorry, was /sbin/nologin and not /bin/nologin)
0
 
psimationAuthor Commented:
DOH
I answered my own question!, I made a typo, I went and said /bin/nologin in the /etc/passwd file, all works fine now, thanks for pointing out the problem
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.