1

I try to install Chrome and Skype on Debian. Data about my laptop

When I'm trying to install from the terminal, or log in as administrator, even when I type the correct password, every time I receive a error. What am I doing wrong?

ravenous is not in the sudoers file. This incident will be reported.

Wrong password in terminal?

  • 5
    Please do not post screenshots of text. Copy-paste the text. Screenshots are hard to read and cannot be searched. – Gilles Jul 12 '15 at 13:15
5

Add an entry into /etc/sudoers to permit user ravenous to run dpkg as root.

See man page for sudo for more detail.

  • 4
    Use visudo to edit the file. – deltab Jul 12 '15 at 18:23
2

There are two common ways to execute commands as the administrator: with su or with sudo. The su command requires the root password, and can be used by any user who knows the root password. The sudo command asks for your own password, and can only be used by users who have been authorized by the administrator. (Both commands can be configured differently, I'm describing the default configuration.)

If you set a root password during installation, then you can use su to run commands as root, for example

su -c 'dpkg -i google-chrome*deb'

If you want to use sudo, you'll first need to your account to the list of users allowed to use it. Under Debian, all users in the group called sudo can run any command as any user via the sudo command. So add your account to the sudo group:

su -c 'addgroup ravenous sudo'

You can do that through the GUI (in the “Users” settings tool) if you prefer. Group assignments take effect when you log in, so you'll need to log out and back in.

1

Log into root with the su command. check your users groups with the command "groups ravenous" (note groups)

edit /etc/sudoers with, for example nano or vi "vi /etc/sudoers" scroll down to the part where you see groups that are uncommented (no # in front) and see if you are in that group (which your obviously are not)

if any group is allowed you need to add your user to the group. if you cant see any uncommented groups, you need to uncomment a group.

Uncomment: if using vi, press i for insert, move with keypads to the # in front of the group you need to uncomment, remove the hashtag. press esc and type :wq! to write and quit.

Now, you add your user to the group: usermod -a -G wheel ravenous (add ravenous to group wheel) Log out as root, log out as ravenous, log back in. Or reboot if u'd like that.

  • 9
    Don't edit /etc/sudoers directly! Run the command visudo. – Gilles Jul 12 '15 at 13:14
  • Indeed, better to use visudo. – Philip Wiberg Jul 13 '15 at 13:28
0

Or simply add ravenous to the sudo group. Login as root or use su. Then to add the user to the sudo group use this:

usermod -aG sudo ravenous

A default install of the sudo package on most Linux systems already have the group sudo setup for access (I know debian does as thats what I use myself), so simply adding any username to that group will grant access to use sudo. Also you will need to relogin for the change to take affect.

  • It wouldn't work if the logged-in user just typed newgrp sudo? – Jeff Schaller Jul 12 '15 at 15:36
  • hmm, good question, I am unsure whether that will make the new sudo group your default, or just add it as another group your belong to. Reading the man for this seems to indicate that would work though. – dakka Jul 13 '15 at 0:09
0

How to add user to the list of sudo users.

(Debian 9 Stretch)

First. From terminal, type: visudo

Find:

# User privilege specification
root    ALL=(ALL:ALL) ALL

Directly underneath these lines, add your user name:

# User privilege specification
root    ALL=(ALL:ALL) ALL
newName ALL=(ALL:ALL) ALL

Exit visudo:

ctrl + x

Save changes to file:

Y

Enter.

Reboot.

New terminal:

$   sudo apt-get update

At prompt, type password

Finished. You should now be using a 'regular' account user with sudo privileges.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.