Restricting Telnet to a user

How do I restrict Telnet and rlogin to a particular user in solaris 7


johns_philipAsked:
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.

struyfsjCommented:
Not a very nice sollution but you could test  (/usr/xpg4/bin/id -g) for the uid in /etc/profile



JS
0
ArtimageCommented:
Since you could set their shell to /bin/false to prevent login, I guess you mean restricting users on the system. If you want only certian users to be able to use Telnet and Rlogin you could simply make the programs owned by a group that that those persons were in, and make it only executable for group.

For instance lets say you created a group called remote in /etc/groups, and you added everyone who is supposed to be able to telnet into it.

chgrp remote telnet;
chown 0-x telnet;

That should do it. Of course maybe I've totally misinterpreted your question.

0
johns_philipAuthor Commented:
My intention is to give only FTP access to one user. I donot want him to
use Anonymous ftp.

JS: Can you make little more clear your comment?

Thanks in advance

JP
0
struyfsjCommented:
When a user rlogins to your machine, the first thing that get sourced is /etc/profile.
So you could check in /etc/profile if that user tries to logs in.  If it is him, print a mesage to his screen and log him out.


JS
0
ArtimageCommented:
So set the user's shell to /bin/false, this will dis-allow login. You could also point his shell to script that prints a message and then logs him out. But anyway, this should do what you want. It will allow him access through ftp, since he has a username and password, but he won't be able to log in.

Does that do it for you?

Art.-
0

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
Unix OS

From novice to tech pro — start learning today.