- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Single login / Console shutdown
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
10-03-2005 08:41 PM
10-03-2005 08:41 PM
Have two queries (HPUX):
1) Can we restrict single login to each user, and a second simultanious login from another network address should be refused, till the earler connection has been closed
2) Can we restrict the access to reboot the server only to console? If yes , how?
Thanks,
Srini
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2005 08:45 PM
10-03-2005 08:45 PM
SolutionIP=$(who -mu | awk '{ print $NF }')
who -u | grep -q "$IP"
if [ ${?} -eq 0 ]
then
echo "You are having another sessions. Plz use that.
sleep 1
exit 1
fi
hth.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2005 08:46 PM
10-03-2005 08:46 PM
Re: Single login / Console shutdown
Using /etc/shutdown.allow file, you can do it.
hth.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2005 08:49 PM
10-03-2005 08:49 PM
Re: Single login / Console shutdown
see man 1m shutdown
hth.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2005 08:49 PM
10-03-2005 08:49 PM
Re: Single login / Console shutdown
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=674919
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=227186
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=188082
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2005 08:56 PM
10-03-2005 08:56 PM
Re: Single login / Console shutdown
/etc/shutdown.allow Authorization file.
The file contains lines that consist of a system host name
and the login name of a user who is authorized to reboot or
halt the system. A superuser's login name must be included
in this file in order to execute shutdown. However, if the
file is missing or of zero length, the root user can run the
shutdown program to bring the system down.
This file does not affect authorization to bring the system
down to single-user state for maintenance purposes; that
operation is permitted only when invoked by a superuser.
A comment character, #, at the beginning of a line causes
the rest of the line to be ignored (comments cannot span
multiple lines without additional comment characters).
Blank lines are also ignored.
The wildcard character + can be used in place of a host name
or a user name to specify all hosts or all users,
respectively (see hosts.equiv(4)).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2005 09:16 PM
10-03-2005 09:16 PM
Re: Single login / Console shutdown
But system also has in-built file to control this. man 4 security. you will have to prepare file /etc/default/security for it and it will have following
NUMBER_OF_LOGINS_ALLOWED=1
2. Use /etc/shutdown.allow file.