- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Restrict login to a user
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
11-25-2002 09:14 AM
11-25-2002 09:14 AM
how can I do to restrict a user login ???
I put nologin in /etc/passwd, but I can't do a su to this user ....
thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-25-2002 09:20 AM
11-25-2002 09:20 AM
Solutionname=`logname`
if [ $name = username ]
then
echo $name must use su. no login allowed.
exit
fi
#end
where you replace username with the user you are trying to restrict.
Cheryl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-25-2002 09:31 AM
11-25-2002 09:31 AM
Re: Restrict login to a user
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
11-25-2002 09:31 AM
11-25-2002 09:31 AM
Re: Restrict login to a user
Are you thinking of the '/etc/nologin' file and the 'nologin' token in 'etc/default/security'? If so, see 'man (4) security'.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-25-2002 11:08 AM
11-25-2002 11:08 AM
Re: Restrict login to a user
James: I don't know the "/etc/nologin" I no find it in man.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-25-2002 11:38 AM
11-25-2002 11:38 AM
Re: Restrict login to a user
The man pages I referenced are the 11.11 ones. See 'man 4 security' here:
http://docs.hp.com/hpux/onlinedocs/B2355-90696/B2355-90696.html
For 11.0 you need patches PHCO_25590 & PHCO_26089.
For 11.11 PHCO_24839 and PHCO_25526 provide current patches.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-25-2002 11:40 AM
11-25-2002 11:40 AM