Title was "Running yum update && yum upgrade without root-privileges?"

I want to allow an unprivileged user to start a system update on a RHEL-based system (CentOS 7). yum-cron is not an alternative, because the user should be flexible e.g. he should be able to decide when to shutdown the machine.

Any idea?

2 Answers 2


You can simply setup your sudoers file and allow a user or a group to execute this one specific command. Syntax would look somehow like this in file /etc/sudoers (edit with visudo!):

user    ALL=(root) NOPASSWD: /usr/bin/yum update root

If you omit the NOPASSWD part, the user will have to provide his password. The users will get to run this simply as sudo yum update.

For more information, you can consult manual pages for sudoers(5)

  • Thanks, already thought about a sudo solution. Are you sure about the 'obsolete alias' aspect? In my understanding it sets the --obsoletes flag and is not obsolete in itself. Nov 15, 2015 at 14:51
  • yes, you are right. I read and wrote too fast. Sorry for confusion.
    – Jakuje
    Nov 15, 2015 at 14:53

Simple answer is no, it is not possible without root priviledges.

Deeper answer is you could compromise your system by making a sudo user user without a password. Which I don't recommend.

  • 1
    What about manually executing yum-cron. Is that possible? Nov 14, 2015 at 14:19
  • I will rephrase my question. Nov 14, 2015 at 14:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .