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.

1

2 Answers 2

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
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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .