Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Basically, I have the opposite problem of this guy. I would like my updates to be installed in a transparent way : I'm tired of entering my password every time.

I'm running on Red Hat (6.2 to be precise).

I saw a script somewhere saying that you need to edit a line containing "admin" in visudo, but I don't have that line. It was meant for Ubuntu, maybe that's the reason why...

share|improve this question
    
The answer is the same though. –  Ignacio Vazquez-Abrams Mar 21 '12 at 14:18
add comment

3 Answers

up vote 1 down vote accepted

I believe the solution is to modify the local PolicyKit definitions. Create a file called, say, /etc/polkit-1/localauthority/50-local.d/allowuserupdate.pkla

[Allow User Updates]
Identity=*
Action=org.freedesktop.packagekit.system-update
ResultAny=no
ResultInactive=no
ResultActive=yes

If you only want your user, you could change Identity=YOURUSERNAME (replace YOURUSERID with your username).

share|improve this answer
add comment

Allow user bob and group update-users to run yum without password.

bob, %update-users ALL= NOPASSWD: /sbin/yum

Only allow bob such access

bob, %update-users ALL= NOPASSWD: /sbin/yum

Note: I don't have a RedHat box to verify the location of yum. Please tell me if this location is invalid.

share|improve this answer
    
PackageKit, not yum. –  Ignacio Vazquez-Abrams Mar 24 '12 at 4:59
    
I'm confused where the user stated he or she is using PackageKit vs yum. Last time I used RH (10 years ago), they were using yum. If PackageKit is being used, then the user should simply replace PackageKit binary with suggested yum binary in the above. –  earthmeLon Mar 24 '12 at 5:06
    
No, because PackageKit uses PolicyKit. –  Ignacio Vazquez-Abrams Mar 24 '12 at 5:08
    
Personnaly, I'm not using anything. I'm ready to use whatever will do the job. –  Philippe Carriere Mar 26 '12 at 12:59
add comment

Have you tried yum -y update?

share|improve this answer
    
Why would you run yum when using PackageKit? –  Ignacio Vazquez-Abrams Mar 21 '12 at 21:40
    
@IgnacioVazquez-Abrams because it is the way the service yum-cron used to do it. –  Nils Mar 21 '12 at 21:46
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.