I know I have installed Debian a bazillion times already, but along the way I forgot certain things that are peculiar to its use. I tried to install pppoeconf via the cli but here is what happened:
daniel@debian:~$ sudo apt-get install pppoeconf
[sudo] password for daniel:
daniel is not in the sudoers file. This incident will be reported.
So I googled for the terms "add user to sudoers file" and got transported here. I then did the following:
daniel@debian:~$ visudo
-bash: visudo: command not found
daniel@debian:~$ sudo visudo
[sudo] password for daniel:
daniel is not in the sudoers file. This incident will be reported.
daniel@debian:~$ su
Password:
debian:/home/daniel# visudo
In visudo I saw this:
# /etc/sudoers
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the man page for details on how to write a sudoers file.
#
Defaults env_reset
# Uncomment to allow members of group sudo to not need a password
# %sudo ALL=NOPASSWD: ALL
# Host alias specification
# User alias specification
# Cmnd alias specification
# User privilege specification
root ALL=(ALL) ALL
I needed to put my username below root ALL=(ALL) ALL, I entered into edit mode and put daniel ALL=(ALL) ALL just below. I used this cheat sheet by the way. I saved my work and yes, now I can use sudo.
i found the solution here >http://alufis35.uv.es/~laura/spip/spip.php?article172
ReplyDeleteBasicaly it say that you must put> su - to get root privileges, then you can use de visudo command to add yourself to the sudoers file.