Solved

Neet to su without entering root password

Posted on 2006-11-02
11
346 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Hello I read in a discussion about a person who configured a very simple mirror RAID with two hard drives; the system and data were on the same partition. He asked how to repair the system as it was not booting up anymore. In his case running …
Windows 7 does not have the best desktop search built in. This is something Windows 7 users have struggled with. You type something in, and your search results don’t always match what you are looking for, or it doesn’t actually work at all. There ar…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

929 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

10 Experts available now in Live!

Get 1:1 Help Now