- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- restrict a particular user from telnet
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2004 11:38 PM
08-10-2004 11:38 PM
is there anyway to do it.
Thx
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2004 11:51 PM
08-10-2004 11:51 PM
Re: restrict a particular user from telnet
If he comes from a certain system then with
inetd.sec see man inetd.sec
Otherwise on his machine of origin get rid of telnet for this user with an alias or such thing
What is the connection
pc-ux ux-ux
Steve Steel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2004 11:51 PM
08-10-2004 11:51 PM
Re: restrict a particular user from telnet
telnet deny xxx.xxx.xxx.xxx
sks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2004 11:54 PM
08-10-2004 11:54 PM
Re: restrict a particular user from telnet
But using inetd.sec i can retrict telenet from a particular system , but my case is that this user may come from any system and i do not want to restrict other user of that system to telnet.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2004 12:04 AM
08-11-2004 12:04 AM
Re: restrict a particular user from telnet
it's not possible to restrict any perticular user to telnet to system.
You can put restriction on the basic of IP address of client. it can be done using inetd.sec file.
but if user will use some other IP address he will be allowed.
Sunil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2004 12:10 AM
08-11-2004 12:10 AM
Re: restrict a particular user from telnet
sks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2004 12:29 AM
08-11-2004 12:29 AM
Re: restrict a particular user from telnet
user_id=${LOGNAME}
if [ $user_id = unix_user_id ]
then
echo "Telnet not allowed for you"
exit 0
else
echo "Welcome to the system"
fi
You may also want to have a look at tcp wrappers. If you latest SSH installed(HP ssh), tcp wrappers is built in. You can put appropriate entried in /etc/hosts.allow and /etc/hosts.deny. tcp wrappers can go upto user level. for your case the entry will go in /etc/hosts.deny. The exact syntax you will have to check. IT should be something like
telnetd:user_id
The code part is easy.
Anil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2004 12:36 AM
08-11-2004 12:36 AM
Re: restrict a particular user from telnet
MYPPID=$( ps -fp $$ | tail -1 | awk '{print $3}' )
MYPPROCESS=$( ps -fp $MYPPID | tail -1 | awk '{print $NF}' )
[ "$MYPPROCESS" = "telnetd" ] && echo "Telnet not allowed" && exit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2004 12:44 AM
08-11-2004 12:44 AM
Re: restrict a particular user from telnet
it is not possible to restrict any perticular user to telnet to system - maby ssh will solve you problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2004 12:46 AM
08-11-2004 12:46 AM
Re: restrict a particular user from telnet
Configuring /var/adm/inetd.sec file is a good way to control a specific node into a LAN environment. The trouble is that user could connect into other LAN node. In my opinion the best way is by /etc/profile control. By this way doesn't matter where user is connected from and if the environment is LAN or not.
Rgds.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2004 12:47 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2004 01:19 AM
08-11-2004 01:19 AM
Re: restrict a particular user from telnet
(/usr/bin/false) - Not sure about the path
TT
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2004 01:33 AM
08-11-2004 01:33 AM
Re: restrict a particular user from telnet
on uid basis you can't disable telnet. where as on IP basis you can
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2004 02:03 AM
08-11-2004 02:03 AM
Re: restrict a particular user from telnet
1. Lock the user account as,
passwd -l
It can be done only by super user
2. Add an entry in /etc/profile as,
if [[ $LOGNAME = "username" ]]
then
echo "You are blocked to login. contact @"
# Sleep time to show to user
sleep 5
exit 0
fi
To block only telnet service then,
if [[ $LOGNAME = "testusr" ]]
then
if [[ `ps | grep -q telnet` -eq 0 ]]
then
echo "Your account login using telnet is blocked"
sleep 5
exit 0
fi
fi
So you can block using user accounts too.
Regards
Muthu