- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- shutdown script
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
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-01-2002 11:38 AM
10-01-2002 11:38 AM
shutdown -h -y 0
But when I login using this account to execute the shutdown process, it prompts me with some error msg for a mounting file system. Any suggestions please?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2002 11:41 AM
10-01-2002 11:41 AM
Re: shutdown script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2002 11:42 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2002 11:56 AM
10-01-2002 11:56 AM
Re: shutdown script
Thanks man because actually that's what I did but since then I didn't try it. I can only do it once a week.
Will let you know for any further information..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2002 11:58 AM
10-01-2002 11:58 AM
Re: shutdown script
Perhaps a better method creating a user for shutting down a system is to configure this in the passwd file
shdwn:uqlOLFsj.DwkQ:0:3::/:/sbin/shutdown -h -y 0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2002 12:08 PM
10-01-2002 12:08 PM
Re: shutdown script
That seems interesting, could you please tell me more how waht would be the case with passwd when I login!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2002 12:17 PM
10-01-2002 12:17 PM
Re: shutdown script
Whichever method you choose -- placing the 'shutdown' command in the $HOME/.profile, or more directly, declaring the 'shutdown' command as the user's program to use as a shell in the '/etc/passwd' file, be sure to declare the user as one who is allowed to utilize the command in the first place!
That is, be sure to update '/etc/shutdown.allow' with the user name you desire.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2002 07:05 PM
10-01-2002 07:05 PM
Re: shutdown script
Thanks man. The shutdown.allow is empty and I'm not sure about it's permission. I would appreciate if let me know.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2002 07:19 PM
10-01-2002 07:19 PM
Re: shutdown script
The permission shuld be
-rw-r--r-- 1 bin bin 0 Nov 16 2000 shutdown.allow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2002 07:48 PM
10-01-2002 07:48 PM
Re: shutdown script
this is a quote from "man 1m shutdown" (has an example will help you proceed):
============================================================
The user is checked for authorization to execute the shutdown command. Only authorized users can execute the shutdown command. See FILES for more information on the /etc/shutdown.allow authorization file.
...
FILES
/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)).
For example:
# user1 can shut down systemA and systemB
systemA user1
systemB user1
# root can shut down any system
+ root
# Any user can shut down systemC
systemC +
WARNINGS
The user name compared with the entry in the shutdown.allow file is obtained using getlogin() or, if that fails, using getpwuid() (see getlogin(3C) and getpwent(3C)).
The hostname in /etc/shutdown.allow is compared with the hostname obtained using gethostbyname() (see gethostent(3N)).
shutdown must be executed from a directory on the root volume, such as the / directory.
The maximum broadcast message that can be sent is approximately 970 characters.
When executing shutdown on an NFS diskless cluster server and the ???o option is not entered, clients of the server will be rebooted. No clients should be individually rebooted or shutdown while the cluster is being shutdown.
============================================================
hope this helps!
Best regards
Yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2002 09:27 PM
10-01-2002 09:27 PM
Re: shutdown script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2002 11:39 PM
10-01-2002 11:39 PM
Re: shutdown script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2005 05:03 AM
02-24-2005 05:03 AM