- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- restricting 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
03-25-2002 07:27 PM
03-25-2002 07:27 PM
restricting telnet
I want to be able to stop an individual user id (say dba) being able to telnet to my server as I have multiple people who have the password but need access to that id so they can make program changes. I want them to have to use their individual id and then su so I can track the user making changes.
hope that make sense
Any suggestions?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2002 07:48 PM
03-25-2002 07:48 PM
Re: restricting telnet
I think the thread located at:
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xeccacf38d6bdd5118ff10090279cd0f9,00.html
will have your answer at the bottom.
Hope it helps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2002 07:48 PM
03-25-2002 07:48 PM
Re: restricting telnet
Have a look at
#man inetd.sec
This file allows you to restrict certain types of access to your server
You then have your
/var/adm/sulog
Regards
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2002 08:02 PM
03-25-2002 08:02 PM
Re: restricting telnet
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2002 08:07 PM
03-25-2002 08:07 PM
Re: restricting telnet
Regards,
Jason V.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2002 08:17 PM
03-25-2002 08:17 PM
Re: restricting telnet
name=`logname`
if [ $name = wumi ]
then
echo $name Piss off not allowed to login...only su
sleep 5
exit
fi
Wont be that unkind with the message though
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2002 08:17 PM
03-25-2002 08:17 PM
Re: restricting telnet
How about a script? You could call this from /etc/profile, and it will decide if the user can or can't.
HTH
-Michael
#---------------------------------------------------------------------------
#
# This script verifies at login time, if the account is "su only"
# The account to become "su only" must be configured (listed) in the
# config.file SU_CONFIG_FILE - one per line
#
# Script is started from /etc/profile with PID of a original process
#
#---------------------------------------------------------------------------
trap "" 1 2 3
SU_CONFIG_FILE=/usr/local/etc/su_only.cfg
export SU_CONFIG_FILE
current_user=`whoami`
orig_process=$1
orig_process_name=`ps -p $1|awk '{print $4}'|grep -v COMMAND`
# kill login process if su only
exit_login ()
{
echo "\n \"$current_user\" is Privileged Account. Access only via \"su\". n"
kill -9 $PPID
}
# Check if "su account" access enabled
check_login ()
{
if [ $current_user != "root" ]
then
if [ $orig_process_name = "rlogind" -o $orig_process_name = telnetd ]
then
if [ -s $SU_CONFIG_FILE ]
then
if [ `grep -v "^#" $SU_CONFIG_FILE|grep -c "^$current_user"` -gt 0 ]
then
exit_login
fi
fi
fi
fi
}
check_login
trap 1 2 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2002 08:18 PM
03-25-2002 08:18 PM
Re: restricting telnet
name=`logname`
if [ $name = wumi ]
then
echo $name Piss off not allowed to login...only su
sleep 5
exit
fi
Wont be that unkind with the message though
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2002 08:21 PM
03-25-2002 08:21 PM
Re: restricting telnet
to restrict the user logging in
vi /etc/passwd
change his shell to /usr/sbin/false
in /etc/shells have the entru /usr/sbin/false
when he logs in, he won't have a shell so will get logged out
He should still be able to use ftp
Is this what you are after?
Regards
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2002 08:49 PM
03-25-2002 08:49 PM
Re: restricting telnet
In HPUX there is no readymade provissions to enable / disable (remote logins)telnet at user level.
AIX do have a file called "/etc/security/user" where we can add "rlogin=false" under each user's name.
For HPUX , as i know the best solution is to use some kind of authentication scripts at /etc/profile.
See this link which provides one kind of script
See the note posted by Peggy Fong in that.
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xbdb879bffde7d4118fef0090279cd0f9,00.html
-Vijay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2002 11:36 PM
03-25-2002 11:36 PM
Re: restricting telnet
name=`logname`
if [ $name = wumi ]
then
echo $name Piss off not allowed to login...only su
sleep 5
exit
fi
That you just pass all security checks?
use 'trap "" 1 2 3' as first line to catch that
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2002 09:19 AM
03-27-2002 09:19 AM
Re: restricting telnet
You did just fine by restricting access by modifying /etc/profile!
I'd make it scarry for the user though...
if [ $USER = "johndoe" ] ; then
echo "Piss off...."
sleep 2
echo "press ^C to stop deleting your local files..."
sleep 10
#let him wonder for 10 seconds...
fi