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?
Keeping CentOS up to date in a flexible way without giving out root credentials?
rhel;yum;upgrade
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 rootIf 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)