Solved

User login settings in /etc/passwd

Posted on 2004-08-07
3
1,373 Views
Last Modified: 2012-08-13
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
Comment
Question by:psimation
  • 2
3 Comments
 
LVL 40

Accepted Solution

by:
jlevie earned 50 total points
ID: 11743841
Does /etc/shells include /bin/nologin? If not it will prevent the user from being able to log in via FTP.
0
 
LVL 17

Author Comment

by:psimation
ID: 11743856
Hi Jim
Yes, it does contain /sbin/nologin ( sorry, was /sbin/nologin and not /bin/nologin)
0
 
LVL 17

Author Comment

by:psimation
ID: 11743873
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
number in printf 13 42
Trying to install php56 on CentOS 7 get GPG error 5 39
IMAP copying tool 14 43
SSSD - Automatic kerberos ticket initialization 1 12
How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

713 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question