Selectively disable SSH and FTP

Posted on 2003-03-04
Medium Priority
Last Modified: 2010-04-22
I am running Mandrake 9 with SSH, FTP and Apache.  I want to allow all of my users to access the server via FTP, but I only want administrators to access it via SSH.  

I tried to edit the /etc/security/access.conf file, but it didn't work for me, maybe I used incorrect syntax.

I also tried changing the shell in /etc/passwd from /bin/bash to /sbin/nologin, but that eliminated FTP access too.  

Any suggestions would be helpful! Thanks

Matthew Brainard
Question by:brainarm38802
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Author Comment

ID: 8069037
Ok... nevermind... I figured it out! In the sshd_config file I just needed the line:

DenyGroups <group>

Now that I feel stupid for asking the question, and then answering it myself; I will be nice and award the first person to leave a response the 50 points.

Accepted Solution

jimbb earned 200 total points
ID: 8069963

Don't feel stupid though, there are several ways to handle it.  You found what is probably the simplest one.

You could alternatively -- or in addition to what you've already done (recommended) -- use the nologin shell, and then add that shell to /etc/shells in order to open ftp access back up (many ftp servers, apparently including yours, check this file before allowing access).

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Hello EE, Today we will learn how to send all your network traffic through Tor which is useful to get around censorship and being tracked all together to a certain degree. This article assumes you will be using Linux, have a minimal knowledge of …
Fine Tune your automatic Updates for Ubuntu / Debian
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

764 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