Ubuntu 11.04中用户的默认组?

由于一些虚拟机问题我昨天意外地将我的用户从某些组中移除了,今天我无法使用sudo做任何事情并且不得不使用livecd来编辑sudoers。

无论如何,我想编辑用户在默认安装中的相同组,但我没有将用户添加到哪个组。

除了您的用户组,您就在

adm dialout cdrom plugdev lpadmin admin sambashare 

/ etc / sudoers应如下所示:

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

这是我的成员,自安装以来我没有改变任何东西:

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

只需更改wojox作为您的用户名。