Solved

User login settings in /etc/passwd

Posted on 2004-08-07
3
1,368 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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Join & Write a Comment

Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

743 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now