Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Recent update reverted /etc/sudoers (maybe?)

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
HankB
Posts: 53
Joined: 2012-03-07 15:15

Recent update reverted /etc/sudoers (maybe?)

#1 Post by HankB »

I'm running Stretch RC (AMD_64) and after updating my system (yesterday according to the date on /var/log/dpkg.log) I've lost the ability to `sudo`. I installed without a root login and use `sudo` for all administrative tasks. This morning I'm advidsed " ... is not in the sudoers file. This incident will be reported."

I'm curoius how this happened. I grepped the dpkg log for 'sudo' and found nothing. I did reboot sune time yesterday because the system was getting wonky (programs not running, desktop not responding etc.) I also rebooted when NetworkManager filled my root drive with log messages when a WiFi access point went away. (Grrr...)

Since the update I also installed Wireshark and selected to not require users to run as root. I then used the `newgrp` command as described in this post https://superuser.com/questions/272061/ ... ogging-out to add the group w/out the need to log out. Could that have caused this problem?

I can fix this pretty easily (I think) by booting a live CD and adding myself back to /etc/sudoers but I thought it worth mentioning anyway.

Thanks!

Edit:
On further investigation I found that my user ID had been removed from all groups other than wireshark in /etc/group. Apparently this is the result of executing

Code: Select all

sudo usermod -G wireshark hbarta
I think the correct command would have been.

Code: Select all

sudo usermod -a wireshark hbarta
:oops:

Usually I edit /etc/group manually and perhaps I should stick with that.

Dai_trying
Posts: 1101
Joined: 2016-01-07 12:25
Has thanked: 5 times
Been thanked: 16 times

Re: Recent update reverted /etc/sudoers (maybe?)

#2 Post by Dai_trying »

I think the correct command would be

Code: Select all

sudo usermod -a -G wireshark hbarta
at least that's how i do it and it hasn't failed me yet.

cronoik
Posts: 310
Joined: 2015-05-20 21:17

Re: Recent update reverted /etc/sudoers (maybe?)

#3 Post by cronoik »

HankB wrote: I think the correct command would have been.

Code: Select all
sudo usermod -a wireshark hbarta
Just the a parameter doesn't work at all. You need the additional -G parameter like Dai_trying and the manpage suggest's.
Have a nice day!

HankB
Posts: 53
Joined: 2012-03-07 15:15

Re: Recent update reverted /etc/sudoers (maybe?)

#4 Post by HankB »

Thank you both for the clarification on the correct command.

Post Reply