- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Become root without asking password
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
11-06-2001 12:58 AM
11-06-2001 12:58 AM
Is it possible to change user becoming "root" without asking the password ?
In a user script, I have to launch a command as root and the user can't know the password for root.
can somebody help me ?
thank's in advance.
Claudio.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2001 01:08 AM
11-06-2001 01:08 AM
Re: Become root without asking password
source
www.courtesan.com/sudo
Already compiled version from
http://hpux.connect.org.uk/hppd/hpux/Sysadmin/sudo-1.6.2b1/
HTH
-Michael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2001 01:08 AM
11-06-2001 01:08 AM
Re: Become root without asking password
"sudo" might be the perfect solution, it allows you to grant permission to specific users for specific commands.
If it's an executable, you can set the "Set user ID on file execution" (chmod u+s) and make root the owner of the file: this will execute the file as root.
good luck,
Thierry.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2001 01:14 AM
11-06-2001 01:14 AM
Re: Become root without asking password
Better use SETUID root on the file
chown root
chmod u+s
Now starting file
Regards
Rainer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2001 01:14 AM
11-06-2001 01:14 AM
Re: Become root without asking password
Consider doing this:
#chown root:sys
This should solve your problem.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2001 01:20 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2001 01:22 AM
11-06-2001 01:22 AM
Re: Become root without asking password
Solution you suggest is very dangerous from the point of view of system security. I would recommend to prepare the script as root and give it a s permission (script is executed as invoked by root):
chmod u+s >script_name>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2001 01:35 AM
11-06-2001 01:35 AM
Re: Become root without asking password
remember to revoke write permission,
so nobody can change what is in the script !
Volker
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2001 05:45 AM
11-06-2001 05:45 AM
Re: Become root without asking password
Darrell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2001 06:01 AM
11-06-2001 06:01 AM
Re: Become root without asking password
But if you really trust this user :-)
make the required entries in the /etc/hosts.equiv and .rhosts files, and let the user do a
$rlogin
Any user that knows your "trusted" users passwd can BECOME ROOT on your host. That's a violation of all security procedures and guidlines.
If you give that user access form another machine, then anyone can SPOOF your host into thinking they are the trusted host and the trusted user.
You really need to follow Rainer's advice:
chmod 555 <scriptname> #make sure no one can write to it
chown root <scriptname>
chmod u+s <scriptname>
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2001 06:44 AM
11-06-2001 06:44 AM
Re: Become root without asking password
Setting up the rlogin has the end result of making the user superuser. So the user doesn't know the root password. Big deal. He no longer needs it.
If you use a suid script at least chgrp it to a private group (no one in that group in /etc/group except the ones you want to be able to run the script), chown root (required), and chmod 4550 (no world access, no write for anyone).
Darrell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2001 11:23 AM
11-06-2001 11:23 AM
Re: Become root without asking password
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2001 01:02 PM
11-06-2001 01:02 PM
Re: Become root without asking password
C
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2001 06:14 PM
11-06-2001 06:14 PM
Re: Become root without asking password
I did give Claudio the chown/chmod solution.
And, as an afterthought, added the information he asked for, all the while pointing out the security hazard.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2001 11:49 PM
11-06-2001 11:49 PM
Re: Become root without asking password
I thank's all for your help.
I choose the ".rhosts / host.equiv" solution.
In my implementation, it is not so dangerous I think (I hope !!).
My implementation:
- The script is a menu of some O.S. command that user can perform on the system.
- I launch my script from .profile of user.
- I have disabled "^C" for user
- Inside of script, I use "rsh" to launch the O.S. command that need to be launched as root.
- The script is write protected; only root can modify it.
- The script perform a "logout" when user choose "end-work" from his menu.
Thank's again.
Sorry, I can't assign point to all !!!
Bye
Claudio.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2001 12:12 AM
11-07-2001 12:12 AM
Re: Become root without asking password
cannot or will not ??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2001 12:52 PM
11-07-2001 12:52 PM
Re: Become root without asking password
http://www.symark.com/powerbroker.htm
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2001 01:30 PM
11-07-2001 01:30 PM
Re: Become root without asking password
Claudio,
Can't assign points! What did you mouse break?
I would contend that people are more likely to answer your questions if you have a good history of assigning points. Up to you however.
C
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2001 01:44 PM
11-07-2001 01:44 PM
Re: Become root without asking password
He is also 1 for 16 in assigned points.
Make that 17 now.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2001 11:45 PM
11-07-2001 11:45 PM
Re: Become root without asking password
I'm a member from 2 years, but I'm new in the use of this forum ! (this is my first time !)
I was wrong in thinking that points is to be assigned only to the solution I choose for my problem.
Now I know !! I can assign point to all the answer.
Thank's again.