- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: restricted telnet access
Operating System - HP-UX
1748089
Members
5026
Online
108758
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- 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
02-06-2001 09:46 AM
02-06-2001 09:46 AM
Re: restricted telnet access
I know this is a late answer but I just came across your question. It sounds like you want to deny direct login access to an application-id and force users to login with their real user-id and then su to to application-id. If this is true, I've implemented it by creating a file called /etc/not_loginable. In this file you would list each id you do not want direct login access (e.g. oracle, apdms, ...) Do NOT include root in this list. Then add a script to /etc/profile to read this list and exit if the login matches. Here are examples of the input file and script:
# cat /etc/not_loginable
oracle
opc_op
applmgr
oradev
First part of /etc/profile - add custom code right after the "trap" command:
# @(#) $Revision: 74.2 $
# Default (example of) system-wide profile file (/usr/bin/sh initialization).
# This should be kept to the bare minimum every user needs.
# Ignore HUP, INT, QUIT now.
trap "" 1 2 3
#
# custom code for denying generic account login
if logname > /dev/null 2>&1
then
LGNM=`logname`
if egrep "^${LGNM}$" /etc/not_loginable > /dev/null 2>&1
then
echo "\nDirect login not allowed for $LGNM\n"
echo "\nNO remote login allowed for $LGNM(`date '+%D %T'`)\n" |
mailx -s "`hostname` login attempt for $LGNM" root
echo "\nNO remote login allowed for $LGNM (`date '+%D %T'`)\n" |
logger -p user.err -t NOT_LOGINABLE
exit 1
fi
fi
# end custom code
My apologies if the spacing did not come out right. I'v added an attachment that should look cleaner. I never added an attachment. If this one doesn't work - I'll try again on the next post.
Hope this is what you were looking for.
# cat /etc/not_loginable
oracle
opc_op
applmgr
oradev
First part of /etc/profile - add custom code right after the "trap" command:
# @(#) $Revision: 74.2 $
# Default (example of) system-wide profile file (/usr/bin/sh initialization).
# This should be kept to the bare minimum every user needs.
# Ignore HUP, INT, QUIT now.
trap "" 1 2 3
#
# custom code for denying generic account login
if logname > /dev/null 2>&1
then
LGNM=`logname`
if egrep "^${LGNM}$" /etc/not_loginable > /dev/null 2>&1
then
echo "\nDirect login not allowed for $LGNM\n"
echo "\nNO remote login allowed for $LGNM(`date '+%D %T'`)\n" |
mailx -s "`hostname` login attempt for $LGNM" root
echo "\nNO remote login allowed for $LGNM (`date '+%D %T'`)\n" |
logger -p user.err -t NOT_LOGINABLE
exit 1
fi
fi
# end custom code
My apologies if the spacing did not come out right. I'v added an attachment that should look cleaner. I never added an attachment. If this one doesn't work - I'll try again on the next post.
Hope this is what you were looking for.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2001 01:39 AM
03-08-2001 01:39 AM
Re: restricted telnet access
Hi,
Thanks to all for Your help and replies and apologies for the late points assignment.
I ended up with the solution of editing the /etc/profile file. After adding the appropriate lines users listed in a specific file are not able to log on via telnet anymore.
Regards,
Peter
Thanks to all for Your help and replies and apologies for the late points assignment.
I ended up with the solution of editing the /etc/profile file. After adding the appropriate lines users listed in a specific file are not able to log on via telnet anymore.
Regards,
Peter
- « Previous
-
- 1
- 2
- Next »
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP