- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Scripting question from a beginner
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
Discussions
Discussions
Discussions
Forums
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
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
тАО08-23-2000 07:40 AM
тАО08-23-2000 07:40 AM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-23-2000 07:43 AM
тАО08-23-2000 07:43 AM
Re: Scripting question from a beginner
That's pretty dangerous, as the script will allow you to automatically kill pids without authentication....assuming anyone can run the script.
However, if you must do this, try using sudo and making sure you have assigned the correct priviledges and permissions. ie. make sure that the script is only executable by those who need to use it and they have the appropriate permissions in sudoers.
HTH.
--Scott
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-23-2000 07:44 AM
тАО08-23-2000 07:44 AM
Re: Scripting question from a beginner
That's pretty dangerous, as the script will allow you to automatically kill pids without authentication....assuming anyone can run the script.
However, if you must do this, try using sudo and making sure you have assigned the correct priviledges and permissions. ie. make sure that the script is only executable by those who need to use it and they have the appropriate permissions in sudoers.
HTH.
--Scott
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-23-2000 07:46 AM
тАО08-23-2000 07:46 AM
SolutionYou can use sudo for a specific user.
Do a search in forum for sudo. You'll get the web site where to download it from, instruction how to configurew it.
As a remark, for using the kill command for your own processes you do not need to be root. I mean user1, can kill the processes under user1 ownership. But user1 need root (or sudo) to kill the processes that belongs with user2.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-23-2000 07:47 AM
тАО08-23-2000 07:47 AM
Re: Scripting question from a beginner
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-23-2000 07:48 AM
тАО08-23-2000 07:48 AM
Re: Scripting question from a beginner
Software Porting And Archive Centre For HP-UX
And download a copy
Good luck
Victor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-23-2000 07:50 AM
тАО08-23-2000 07:50 AM
Re: Scripting question from a beginner
ps -ef | grep 'x' | awk '{ system( "kill " $2) }'
The 'x' is the placeholder for whatever you would want to grep for.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-23-2000 08:00 AM
тАО08-23-2000 08:00 AM
Re: Scripting question from a beginner
ee=`ps -e|grep (user process)|grep "?"|cut -c2-6`
kill -9 $ee
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-24-2000 04:51 AM
тАО08-24-2000 04:51 AM
Re: Scripting question from a beginner
It did not take long for a user to figure out how to abuse the current path setting and the current field seperator variable (SunOS), to get a root shell out of the program.
It is dangerous, and it's hard to think of every situation that puts you at risk.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-24-2000 07:56 AM
тАО08-24-2000 07:56 AM