Eric Lucas on 30 Jan 2017 15:40:03 -0800


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Adding admin account back to sudoers


Another sudo tip:  entries that are later in the sudoers file override the earlier ones.
I always add myself as the last line of the file to prevent that from screwing me up.
Also good practice to use visudo as noted earlier. If you don't like vi[m] you can 
export EDITOR=/bin/nano 
in your .bashrc or .zshrc or .whateverrc

Eric Lucas


On Mon, Jan 30, 2017 at 5:35 PM, Eric H. Johnson <ejohnson@camalytics.com> wrote:

Hi all,

 

This happened to me the last time I ported accounts to a new machine, and I cannot figure out what I did to fix it. Both the old and new machines are running Ubuntu 16.04. After porting all of the user accounts to the new computer, I lost the use of sudo in the administrator account. If I try to use sudo, I get the error that the account is not in sudoers. I booted to recovery mode, mounted the drive read/write, and tried:

 

adduser administrator sudo

 

Which said “administrator is already a member of the sudo group”.

 

I checked /etc/sudoers, and it agrees with what my source (http://www.psychocats.net/ubuntu/fixsudo) says it should say.

 

Another source said to try:

 

sudo usermod –a –G sudo administrator

 

The command ran without error, but did not fix the problem.

 

Any ideas?

 

Thanks,

Eric

 


___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug


___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug