I've done a mistake: I've removed the 'sudo' group, because I have forgotten the -a option (I wanted to add 'video' group):
sudo usermod -G video $USER
Now, when I want to call sudo
I have this message:
orangepi@orangepi:~$ sudo apt-get update
[sudo] password for orangepi:
Sorry, user orangepi is not allowed to execute '/usr/bin/apt-get update' as root on orangepi.
I read some solution (like visudo
, or sudo adduser <username> sudo
) but the problem persists. I can be root with calling su
.
Some informations:
orangepi@orangepi:~$ groups
orangepi video # I would like to add sudo, groupes and others
visudo:
Defaults env_reset
Defaults mail_badpass
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
root ALL=(ALL:ALL) ALL
%admin ALL=(ALL) ALL
# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL
%shutdown ALL=(root) NOPASSWD: /usr/lib/arm-linux-gnueabihf/xfce4/xfsm-shutdown-helper
# Autoriser sudo ifup sans mot de passe
orangepi ALL = (root) NOPASSWD: /sbin/ifup
How can I repair this?