I reinstalled my Linux and set the root password. But now I can't login to root. I can only run updates by password setted and do similar task but sudo is not working.
What's the problem?
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.Sign up to join this community
Fedora does not configure
sudo by default. Instead the default behavior is to obtain a root shell with the
su command. The rough equivalent to
sudo is to use the
-c argument to make it run a command. For instance, to update your system you'd run:
su -c 'yum update'
As Matt Jenkins indicated, you can configure
sudo to work on Fedora. Follow his instructions for discovering the syntax of the
sudoers file and then run this command to edit it:
su -c visudo
To add yourself to the
admin group more easily, without modifying
/etc/groups directly, just run this command:
su -c 'usermod -aG admin [username]'
This is caused by one of two things:
sudoconfiguration file set up right.
$ man sudoers
and read all about setting up the sudoers file.
Editing of the sudoers file is done through
I have in my sudoers file:
# Members of the admin group may gain root privileges %admin ALL=(ALL) NOPASSWD: ALL
and I am a member of the
admin group (in /etc/group). This lets me sudo to root without having to enter a password.