- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: User cant shutdown the server
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
01-10-2005 09:12 PM
01-10-2005 09:12 PM
Currently successfull migration from D350 to rp2470 for customer. All the applications are test ok on rp2470. Just have 2 problems need some helps.
1. On the old D350, customer have write a script which allow non-unix skill people shutdown the server during administrator not around. Of course there was user call shutdown in /home. I did copy /etc/hosts and /etc/profile and /home from D350 to rp2470. But when customer test the script and it seem cant shutdown the server and the error mesg show:
shutdown cannot be run from a mounted file system --existing shutdown--
change directory to the root volume ("/" will work) and try again.
I guess something do with the profile. here is the profile for user - shutdown
# script for PBS operators by phuah @ 30.8.93
# modified for KDU @ 29.7.95
# modified for Carrier @ 10.4.96
# modified for In-house use @ 07.08.96
# modified for Lonpac Singapore use @ 3.1.97
# disable interrupt, quit & termination
set -u
trap "echo 'Bye......'" 0
trap 'echo Hey! That is not allowed!!!!' 2 3 15
# enable std keyboarding
# stty line 1 erase '^H' kill '^U' intr '^C' echoe
stty erase "^H" kill "^U" intr "^C" eof "^D"
PATH=/usr/sbin:$PATH:/sbin:/home/shutdown
# default editor variable
EDITOR=vi
export EDITOR
# evaluate and set term type for proper screen clearing
# echo 'TERM=(vt100) \c'
# read TERM
# TERM=vt100
# export TERM
if [ "$TERM" = "" ]
then
eval ` tset -s -Q -m ':?hp' `
else
eval `tset -s -Q `
fi
clear
# the actual menu driven operation
while true
do clear
echo " "
echo " "
echo " -------------------------------------------------------------------"
echo " "
echo " # #### # # ##### ## ####"
echo " # # # ## # # # # # # #"
echo " # # # # # # # # # # #"
echo " # # # # # # ##### ###### #"
echo " # # # # ## # # # # #"
echo " ###### #### # # # # # #### S'PORE SHUTDOWN MENU"
echo " "
echo " -------------------------------------------------------------------"
echo " "
echo " [ 1 ] SHUTDOWN SERVER"
echo " "
echo " [ 2 ] ACTIVE USERS"
echo " "
echo " [ lo ] LOGOUT"
echo " "
echo " -------------------------------------------------------------------"
echo " "
echo " Please enter your choice"
read responce
case "$responce" in
"chan") sh
;;
"") continue
;;
"1") echo "Option 1 was selected"
/usr/sbin/sync;sync
/sbin/shutdown -h -y 0
echo "."
echo "Press ENTER to continue"
read dummy
;;
"2") echo "Option 2 was selected"
who
echo "."
echo "Press ENTER to continue"
read dummy
;;
"lo") echo "Option to logout was selected"
break
;;
*) echo "Huh???? That option doesn't exist!"
echo "."
echo "Press ENTER to continue"
read dummy
;;
esac
done
exit 0
#
# that's all there is to it!
#
2) If the superuser(root) change the normal user become root user, on which log can capacture all the details from, such as record the all the command he key in.
Best regards
Leon
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2005 09:17 PM
01-10-2005 09:17 PM
Re: User cant shutdown the server
Quick question, did you have a /etc/shutdown.allow file on your old server ?
Regards,
Robert-Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2005 09:25 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2005 09:32 PM
01-10-2005 09:32 PM
Re: User cant shutdown the server
Yes the old server have the /etc/shutdown.allow this file and I do remember i copy also.
regards
Leon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2005 09:50 PM
01-10-2005 09:50 PM
Re: User cant shutdown the server
the disk the user is trying to run the shutdown from is not root.
For a correct shutdown best go to the root partition (/) and then issue the shutdown command.
Q2. Can you please clarify?
You want to know how to log the commands after a normal users uses the su command?
The .history file would track the commands.
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2005 09:56 PM
01-10-2005 09:56 PM
Re: User cant shutdown the server
1) I understood and i will add cd / in the .profile.
2) I mean the normal user's access become root access and does all the command he type will capture in /home/user/.history ?
regards
Leon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2005 10:01 PM
01-10-2005 10:01 PM
Re: User cant shutdown the server
No - not in the .profile! That would cause the user to be placed in the root directory every time they log in. Put the "cd /" into option 1 of the script as TG suggested.
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2005 10:11 PM
01-10-2005 10:11 PM
Re: User cant shutdown the server
I mean put the "cd /" into option 1 of the .profile which i post out early under /home/shutdown/.profile. Hope I can got this time right.
regards
Leon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2005 10:27 PM
01-10-2005 10:27 PM
Re: User cant shutdown the server
Q2: When the user switches with su the last command in the users history file would be the su command. All commands executed as root would be logged in roots history file (if set up!). When the user exits su the logging switches back to his user file.
Regards