?
Solved

Neet to su without entering root password

Posted on 2006-11-02
11
Medium Priority
?
353 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 34

Accepted Solution

by:
PsiCop earned 200 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
 
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

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

I don't know if many of you have made the great mistake of using the Cisco Thin Client model with the management software VXC. If you have then you are probably more then familiar with the incredibly clunky interface, the numerous work arounds, and …
In this article we will discuss all things related to StageFright bug, the most vulnerable bug of android devices.
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

801 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