- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Allow a person to run a command with root privilag...
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
12-07-2005 05:49 AM
12-07-2005 05:49 AM
Allow a person to run a command with root privilage
They say a question is only easy if you know the answer!
I now the possibility exists just dont know how!!
How can I allow a 'normal' user to be able to run a command (lets say a command to start or stop and agent) which needs root permission to run without giving them roots password o doing it myself??
Thanks as always - you guys do a great job!
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2005 05:52 AM
12-07-2005 05:52 AM
Re: Allow a person to run a command with root privilage
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2005 05:59 AM
12-07-2005 05:59 AM
Re: Allow a person to run a command with root privilage
sudo lets you with a simiple configuration file decide which commands to grant to which user.
Its a standard in man shops.
The program itself requires set uid privledges and the depot posted by Pete has in the past done this right, causing an install error, which you fix by manually setting the suid on the binary.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2005 06:01 AM
12-07-2005 06:01 AM
Re: Allow a person to run a command with root privilage
You grant authorizations to specific ids in a configuration file, then the use user can issue a command
i.e. sudo lpshut
sudo will ask for the users password before allowing the program to execute
The site listed in the prior answer has several helpful utilities as well as sudo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2005 06:25 AM
12-07-2005 06:25 AM
Re: Allow a person to run a command with root privilage
I knew a little about the sudo and suid stuff but maybe I am at fault with no explaining well.
Isnt there some method whereby at the time of execution of a command, no matter who the current user is, when that command is issued, it in turn becomes issued by the owner of that file (not necesarily root)- like a switch id in the moment.
So I want user 'abc' to be able to run command / script whos owner is 'def'.... is this possible?
Thanks Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2005 06:28 AM
12-07-2005 06:28 AM
Re: Allow a person to run a command with root privilage
Sorry to I hijack Mark's thread. I'll open my own if y'all think I should.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2005 06:30 AM
12-07-2005 06:30 AM
Re: Allow a person to run a command with root privilage
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2005 06:35 AM
12-07-2005 06:35 AM
Re: Allow a person to run a command with root privilage
Thats what I am after...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2005 06:37 AM
12-07-2005 06:37 AM
Re: Allow a person to run a command with root privilage
You can use sudo , no security threat , and we are using it happily , and designed to allow a sysadmin to give limited root privileges
to users and log root activity ,and controlling users access , with sudo , there will be a sudoers file , where you need to mention the permissions , like which command needs to give access to, etc.
Here is the link:
http://www.courtesan.com/sudo/download.html
Also check the readme file for details:
http://www.courtesan.com/sudo/readme.html
Logs can be found in : /var/log/sudo.log and also keeps posted in syslog.log
cheers,
Raj.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2005 06:37 AM
12-07-2005 06:37 AM
Re: Allow a person to run a command with root privilage
It sounds like you need to look at using the setuid bit. Create a script that invokes the command you want the user to run, make the owner root and the group that of the user, then turn on the setuid bit. The user will gain permission to execute the command because of the group permissions and the command will run as root because of the setuid bit.
Take a look at the man page for chown.
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2005 06:41 AM
12-07-2005 06:41 AM
Re: Allow a person to run a command with root privilage
for example you can run command with root access as follows, :
$ sudo ioscan -fnC tape
$ sudo useradd -u 250 -s/bin/sh .....
Cheers,
Raj.