5

I accidentally removed my user from some groups yesterday because of some virtualbox issues and today I couldn't use sudo to do anything and had to use a livecd to edit sudoers.

Anyway I want to edit the user to be in the same groups it would be in the default installation but I don't which groups to add the user to.

Braiam
  • 67,791
  • 32
  • 179
  • 269
chbtn
  • 53

2 Answers2

5

Apart from your user's group, you are in

adm dialout cdrom plugdev lpadmin admin sambashare

/etc/sudoers should look like this:

#
# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
Defaults    env_reset

# Host alias specification

# User alias specification

# Cmnd alias specification

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

# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL

# Allow members of group sudo to execute any command
%sudo   ALL=(ALL:ALL) ALL

#includedir /etc/sudoers.d
htorque
  • 64,798
0

Here's what I'm a member of and I haven't changed anything since install:

wojox@wojox-desktop:~$ groups
wojox adm dialout cdrom plugdev lpadmin admin sambashare

Just change wojox for your user name.

Peachy
  • 7,117
  • 10
  • 38
  • 46
wojox
  • 11,362