Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Telnet Session for common user!

Status
Not open for further replies.

alimalik

Technical User
Aug 15, 2005
20
0
0
QA
I wanna know how one can block the telnet session for any specific user in Solaris 9.
 
You could modify /etc/profile with something like:

[tt]if [ "$LOGNAME" = badperson ]
then
echo "Sorry, but you are not wanted here."
sleep 2
exit
fi[/tt]

Make sure you add it before the trap 2 3 at the end of the script or else they will be able to Ctrl-C out of it.

Annihilannic.
 
Hello Alimallik,

Does your user require ftp access, or are you trying to stop them accessing the system completely? Also do they have their own user account or do they share one, if so you could change the passwd or delete their account. The question is what do you want the user to be able do?

Marrow
 
If you want them to only be able to [tt]ftp[/tt] in, change their shell (the last field in [tt]/etc/passwd[/tt]) to [tt]/usr/bin/false[/tt]. Then, if the file [tt]/etc/shells[/tt] exists, add [tt]/usr/bin/false[/tt] to it.

This will keep them from [tt]telnet[/tt]ing, but they can still [tt]ftp[/tt].
 
Hello Marrow,
Thanx for inquring, actually i just wanna block access of specific user for telnet, which is already told by Annihilannic. Thanx to him. Further i wanna block access of that specific user for ftp also. How we can do so. Deleting the account is not appicable here.
 
You can lock the account.
[tt]
passwd -l username
[/tt]
 
To block him from FTP add his/her username to /etc/ftpusers.
 
u can use a third party software from CA called etrust.. does the job pretty well.. very powerful product
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top