I have added the user to to the wheel group, I have also manually checked the group file the username is also showing there but when ever I use yum update command it gives an error mentioning that “This command has to run using superuser privileges”. Hi have also tried using the su command but it also gives an error message mentioning “Authentication failure”.
Adding a user to the wheel group allows that user to use the sudo
command using the users password.
su
wants the root password and does not check for wheel as far as I remember.
Relogin or reboot to apply changes:
Adding a user to sudoers :: Fedora Docs
commands like sudo
is working after adding the user to the wheel group. But the command yum
is not working it says that the user does not have super user privileges. But as far as I know adding a user to the wheel group gives super user privileges.
I tried this already but it is not working
Try running newgrp wheel
first on that user, or logging out and logging back in / starting a new login shell?
dnf is the name of the packaging tool, yum is an alias to allow old code to work.
Did you do this?
sudo dnf
Not quite. It gives the user the ability to use the sudo command and thus execute most administrative commands as if they were root, but does not actually provide those privileges without the sudo command.
Also, after adding the user to the wheel group that user MUST log out and back in before the group access becomes available
Once the user is recognized as a member of the wheel group then sudo yum ...
should work, as should the newer command sudo dnf ...
. (yum is now an alias for dnf)
# ls -l /usr/bin/dnf /usr/bin/yum
lrwxrwxrwx. 1 root root 5 Jul 26 19:00 /usr/bin/dnf -> dnf-3
lrwxrwxrwx. 1 root root 5 Jul 26 19:00 /usr/bin/yum -> dnf-3
By logging out, do you mean to type logout
which closes the fedora instance and then to open it again. If you mean the same thing I have already tried it but it didn’t work
Didn’t knew about that. Thanks
Thanks for the help yum update
doesn’t work alone i need to add sudo yum update
. Also thanks for letting me know that yum is an alias of dnf sudo dnf update
also works thanks.
That is exactly what I meant.
After logging in as that user then run the groups
command. It should return a list of all groups of which that user is a member, something like this
$ groups
myuser wheel cdrom dialout vboxusers boinc libvirt
If the wheel group shows up there then that user should be able to use the sudo command properly. If not then they won’t be able to do so.
The command sudo usermod -a -G wheel <username>
adds the user to the wheel group as specified.