- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Can you help me with this 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
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-05-2001 04:25 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2001 04:28 AM
09-05-2001 04:28 AM
Re: Can you help me with this script?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2001 05:36 AM
09-05-2001 05:36 AM
Re: Can you help me with this script?
I am trying to make a script to allow other users (ie. Branch Mgrs.) to shut and kill -9 users. The problem is, it doesnt allow users to shut or kill other users, just allows root to do so. Is there any way that I can make this work? Of course I dont want to give users root access. Thanks for your help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2001 05:45 AM
09-05-2001 05:45 AM
SolutionYou can use: SUDO that is an application for allow to other users to run commands with superuser permissions.
You can download it from:
http://hpux.connect.org.uk/
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2001 05:46 AM
09-05-2001 05:46 AM
Re: Can you help me with this script?
I cant read your script (not found error??), but since its a script why not configure sudo (download it from your Archive Center..) for your users to execute your script as root...
All the best
Victor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2001 05:52 AM
09-05-2001 05:52 AM
Re: Can you help me with this script?
Only root is allowed to kill another users process. If you are not root while running this script, you can't kill this process.
So make sure you are root while running this script or use something like sudo. You can find sudo at the porting center (e.g. http://hpux.asknet.de)
Hope this helps
Regards Stefan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2001 06:35 AM
09-05-2001 06:35 AM
Re: Can you help me with this script?
sudo is the best option anyway to work as root as it provides good logging facility as well controlling mechanism.
If your needs are immediate, then you can write a small script called kill_it and call it from your script.
Now your kill_it will be something like this
#!/usr/bin/ksh
#Only uid xxx can run this script
if [ `uid` -ne xxxxx ]
then
echo "You need to be with uid xxxx"
exit 1
else
kill -9 $1
fi
Now, create a group called and place this user in it. Let's call the group as sugroup.
Now as root change the permissions as below
#chown root:sugroup kill_it
#chmod 4510 kill_it
This script will run as root taking an argument.
Now you can pass on the pids as the arguments to this and kill the users.
Do you think this helps you for the timebeing?.
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2001 06:52 AM
09-05-2001 06:52 AM
Re: Can you help me with this script?
Besides using SUDO you can also try using restriced SAM option.
Create a custom application in sam with your script and allow only required users to run only this application. While creating the application you can specify that the script need to run as root.
Thanks
Prashant Deshpande.