madharry
Posts: 2
Joined: Tue Mar 06, 2018 9:44 pm

sudo: gid problem?

Tue Mar 06, 2018 10:39 pm

when I run sudo I get the following error

pi$ sudo

sudo: gid=%}: invalid value
sudo: unable to initialize policy plugin

pi$ ls -als /etc/sudoers

4 -r--r----- 1 root root 670 Mar 6 22:04 /etc/sudoers

does anyone have any bright ideas?
TIA

User avatar
jostle
Posts: 16
Joined: Tue Mar 06, 2018 6:26 am

Re: sudo: gid problem?

Wed Mar 14, 2018 5:49 pm

Looks like your /etc/sudoers file has been corrupted or perhaps one of the files in /etc/sudoers.d.
Use

Code: Select all

sudo visudo
to edit the /etc/sudoers file or

Code: Select all

sudo nano /etc/sudoers.d/<filename>
to edit the others.

My /etc/sudoers looks like this

Code: Select all

#
# 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
Defaults        mail_badpass
Defaults        secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

# Host alias specification

# User alias specification

# Cmnd alias specification

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

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

# See sudoers(5) for more information on "#include" directives:

#includedir /etc/sudoers.d
Have Fun ...

madharry
Posts: 2
Joined: Tue Mar 06, 2018 9:44 pm

Re: sudo: gid problem?

Thu Mar 22, 2018 5:13 pm

Thanks for the input.

The sudoers file checked out, the sudoers.d directory had nothing unusual, and the permissions all appeared ok.

In the end I backed up essential files and reformatted the SD card with the latest NOOBS download.

Problem sorted!

User avatar
DougieLawson
Posts: 40137
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: sudo: gid problem?

Fri Mar 23, 2018 12:44 am

madharry wrote:
Thu Mar 22, 2018 5:13 pm
In the end I backed up essential files and reformatted the SD card with the latest NOOBS download.
You'd have been better off (and saved 1.3GB of space) with plain Raspbian.
Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All fake doctors are on my foes list.

Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Return to “General discussion”