View Full Version : [SOLVED] Upgrade server from 25 to 26 Weird problem..

25th October 2017, 05:52 PM
Hello all, hoping someone has an answer to a strange problem I'm having. I've looked everywhere on the net and I just can't get the key words right I suppose.. :doh: Anyhow my problem is this; I upgraded my AMD server the other day to Fedora 26 finally. After a few hours of waiting it finally finished and everything is working from the previous state... Except when I try to run 'dnf -y upgrade' or any DNF command it states I need to be the root user to use these commands(Error: This command has to be run under the root user.). Any ideas what's going on here? I am obviously the root user.

 linux.box  root  ~  dnf -y upgrade
Error: This command has to be run under the root user.

(The weird characters are due to pasted PowerLine bash shell formatting.)


25th October 2017, 07:01 PM
What's the output of


26th October 2017, 04:51 AM
Okay, the result is this:

 linux.box  root  ~  id
uid=0(root) gid=100(users) groups=100(users) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023

26th October 2017, 05:48 AM
Some more information.

It seems that everything under SELinux is reporting things properly, as shown with

semanage login -l

I get:

Login Name SELinux User MLS/MCS Range Service

__default__ unconfined_u s0-s0:c0.c1023 *
root unconfined_u s0-s0:c0.c1023 *

under visudo I can see that root is in the proper place with this line.

root ALL=(ALL) ALL


I'm starting to think the upgrade broke DNF. Any ideas on how to reinstall DNF?

26th October 2017, 10:46 AM
Use Fedora installation disk, rescue your partition and try reinstalling dnf.

Looks like root user is messed up.
Mine is

uid=0(root) gid=0(root) groups=0(root) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
Correct your root's group and gid.

26th October 2017, 12:51 PM
Omg thank you. Seemed that it worked!! I thought the root groups were wheel? Also if the root group was not assigned to root but my other sudo users were still in the sudoers list, why would the other users getting the same error with 'sudo dnf upgrade'?

Steps used to fix
1.) Assign root user to root group by:

usermod -g root root
usermod -G root root

2.) Log out and log back in to root