Selectively disable SSH and FTP

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
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

brainarm38802Author Commented:
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.

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).

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux Security

From novice to tech pro — start learning today.

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.