- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: How to remove login capability ?
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-26-2005 08:01 AM
09-26-2005 08:01 AM
I do a remove login capability (using telnet or rlogin) for a user but I can su do that user.
For example, I created generic user speedwre but I don't want people to login directly as speedwre. They must first logon as there user then do a su to speedwre.
I am using a hpux 11.23. I hope its clear.
Thanks.
Thanks.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2005 08:07 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2005 08:13 AM
09-26-2005 08:13 AM
Re: How to remove login capability ?
You could try this in /etc/profile:
##
Restricted="sybase oracle dba"
for User in $Restricted
do
if [ $User = $LOGNAME ] ; then
if [ "`who -a | grep $$ | awk '{print $8}'`" ]; then
echo Sorry, you must first login with YOUR userid, then type \"su - $LOGNAME\"
sleep 8
exit
fi
fi
done
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2005 08:15 AM
09-26-2005 08:15 AM
Re: How to remove login capability ?
What we do is to restrict diorect logins of SA's and DBA's , we add the following in /etc/profile
loginid=`who am i | awk '{print $1}'`
echo $loginid
if [ $loginid = oracle ]
then
exit
fi
echo $loginid
if [ $loginid = root ]
then
exit
fi
and that way the user don directly log in , and su collects the log.
Manoj Srivastava
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2005 08:21 AM
09-26-2005 08:21 AM
Re: How to remove login capability ?
if [ -f /etc/no_login_allowed.sh ] ; then
. /etc/no_login_allowed.sh
fi
script from /etc/profile .We add all the users for which direct log in is not allowed in /etc/no_login.allowed .
the /etc/no_login_allowed.sh executes logname command and greps the logname from /etc/no_login.allowed .If it finds then exit .
By this method you can reduce your hassle to set for each user .
Thanks,
BL.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2005 08:22 AM
09-26-2005 08:22 AM
Re: How to remove login capability ?
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-26-2005 08:30 AM
09-26-2005 08:30 AM
Re: How to remove login capability ?
Add the following traps to the logic
if [ $LOGNAME == "speedware" ]
then
trap 1 2 3 15
echo "Please login as yourself and the su to the speedware account"
sleep 3
exit 1
fi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2005 08:33 AM
09-26-2005 08:33 AM
Re: How to remove login capability ?
Thanks for the quick response.
I like the solutions. But I was hoping something built-in into HP-UX like a extra parameter into the /etc/passwd file.
I am going to implement it.
I don't really mind if they can break the shell as long as I know who they are on system.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2005 08:41 AM
09-26-2005 08:41 AM
Re: How to remove login capability ?
I seem to recall that sudo can be configured to run processes as users other than just root and if its a specific process that needs to run as that user then more investigation into the configuration of sudo may be worthwhile.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2005 08:45 AM
09-26-2005 08:45 AM
Re: How to remove login capability ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2005 08:57 AM
09-26-2005 08:57 AM
Re: How to remove login capability ?
I have done something similar in the past for a generic informix user as you can wrap scripts around the routine to report on which user is using the id and sudo will maintain its own logs.
Do you have sudo installed - Its available from here if you don't have it.
http://hpux.connect.org.uk/hppd/hpux/Sysadmin/sudo-1.6.8p9/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2005 09:00 AM
09-26-2005 09:00 AM
Re: How to remove login capability ?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2005 03:47 PM
09-26-2005 03:47 PM
Re: How to remove login capability ?
http://h20293.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=HPUXIEXP1123
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2005 12:22 AM
09-27-2005 12:22 AM
Re: How to remove login capability ?
Also due to this it will never read /etc/profile, /etc/login, .profile or .login. Solutions saying to update those risk people being able to break out if they hit ctrl-C quickly enough.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2005 02:50 AM
09-27-2005 02:50 AM
Re: How to remove login capability ?
DenyUsers user1 user2 whoever