Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1380
  • Last Modified:

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?
0
psimation
Asked:
psimation
  • 2
1 Solution
 
jlevieCommented:
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

Featured Post

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now