Solved

Neet to su without entering root password

Posted on 2006-11-02
11
345 Views
Last Modified: 2011-10-03
Hello,

is there any way for a non-root user to su to root without entering a password?

I looked for a -p option on su but to no avail.

I need for a script to run a program as root and then get back out

i was hoping for something like this:

su -p password -c command

so far I only see the ability to su and manually type the password.
0
Comment
Question by:jameswalt
11 Comments
 
LVL 34

Expert Comment

by:PsiCop
ID: 17859386
0
 
LVL 9

Expert Comment

by:bigjimbo813
ID: 17859395
you can specify certain programs to allow all users to run it as root....is this what your asking?
0
 
LVL 9

Expert Comment

by:bigjimbo813
ID: 17859403
sudo will still require you to enter a password though.
0
 
LVL 34

Accepted Solution

by:
PsiCop earned 50 total points
ID: 17859725
Actually, bigjimbo813, that is configurable. You can tell sudo to *not* require a password for specific commands or specific users. Try using it some time.
0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 6

Expert Comment

by:_iskywalker_
ID: 17860754
sudo does not require password with you put the users in the sudoers group.
another way to make a user execute a program with root priviledges is putting the s bit, like bigjimbo812 said:
make root own that file, then chmod 755 file then chmod +s file. man chmod, for questions
0
 
LVL 34

Expert Comment

by:PsiCop
ID: 17861870
SUID programs are a Very Bad Idea (tm) in the modern security environment. If there are any holes in the SUID'd program, they become exploitable with root privilege.

sudo is the tool you want to use. It provides *controlled* privilege escalation that can be logged and audited.
0
 
LVL 1

Expert Comment

by:tissier
ID: 17864909
Sudo is a good solution.

I depends on what you want to do under root privileges. Maybe you can simply add user in the good groups ?
0
 
LVL 9

Expert Comment

by:bigjimbo813
ID: 17883985
i agree sudo would be the best option....I just was not aware you could configure it to not require a password. Thanks for the tip Psi
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
AIX  NFS  question 5 91
windows 10 free update 45 128
dsquery command line assistance 2 73
Mac Laptop - Water Spill 12 98
Just about everyone has an old PC laying around.  Ask anyone in the IT industry, whether they are a professional or play in it as a hobby.  From outdated Desktops to cheap "throwaway" laptops, they are all around and not as hard to "fix up" as you m…
#Citrix #POC #XenDesktop #vCenter #VMware #ESX
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now