Discussion Locked

deny a user from telnet in linux

0 helpful
1 reply
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

1) denying telnet for all can be done. But i need to restrict telnet for one particular user. How can i?

2) After telnet by the particular user, i want to disable the user viewing the other files and directories. i want to give privilege to the directory, he is logging in. Other than applying chmod to all the directories, is there any solution?

Thanks,
p.sampath kumaran

1 reply

by paulo.sedrez

1) actually, login(8) can restrict the connection. Two ways for doing this:

1a) using /etc/usertty (see login man pages) you can restrict users, groups, origins and even timeframes;

or

1b) using PAM, comfigure login to use pam_access (see README.pam_access) and make it required. The access.conf file allows you to restric logins from network.

2) SunOS has (I thing Solaris also) something called Restricted Shell, at /usr/lib/rsh (is is NOT remote shell!). Basically, it does not allow execution of commands outside the path, cd to .. or similar, and changes to environment. Very nice, invoquing "bash" by the name "rbash" has much the same efect - see the section "RESTRICTED SHELL" in the bash man page. There is smrsh - far, far more restrictive. You can try a ncurses menu based shell, flash (http://www.netsoc.ucd.ie/flash/), but I don't thing it is what you are looking for.

--Sedrez

This discussion is closed to new replies.