- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: disable telnet to all users except for one.
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
09-29-2005 02:53 AM
09-29-2005 02:53 AM
disable telnet to all users except for one.
I can disable telnet for ALL users except for one.
What is the best way to go about this.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2005 02:56 AM
09-29-2005 02:56 AM
Re: disable telnet to all users except for one.
/var/adm/inetd.sec
This file lets you specify by protocol what hosts are allowed and not allowed. You would allow one host to telnet and deny all other hosts on the next line of the configuration file.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2005 04:18 AM
09-29-2005 04:18 AM
Re: disable telnet to all users except for one.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2005 04:55 AM
09-29-2005 04:55 AM
Re: disable telnet to all users except for one.
In the same mode as Bill's response, you could also use TCP-wrappers & use the /etc/allow/disallow files to control telnet access. The advantage to it is that you can get granularity down to the username level. /var/adm/inetd.sec cannot do that. So that covers scenarios where the user comes in from diff workstations.
My 2 cents,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-30-2005 01:07 AM
09-30-2005 01:07 AM
Re: disable telnet to all users except for one.
There's a good example in an article at www.samag.com - "PAM - Pluggable Authentication Modules" by Kurt Seifried.
The pam file entry would be:
auth required /lib/security/pam_listfile.so item=user sense=allow file=/etc/telnet-allow onerr=fail
Other than the base pam_kerberos, authz, ldap,unix files, does anyone know of any others that are pre-compiled for HP-UX?
-----------
Another sneakier way would be to edit the /etc/profile:
if `ps -ef | grep $PPID | grep telnet > /dev/null`
then
if `cat /etc/telnet-ok | grep $LOGNAME > /dev/null`
then
:
else
echo "Telnet is not allowed"
exit
fi
fi
This would check to see if the parent ID of the login is a telnet session, if it is, check the contents of /etc/telnet-ok and see if the LOGNAME is in there, and if not, exit.