Friday, May 3, 2024
 Popular · Latest · Hot · Upcoming
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 668  / 1 Year ago, sun, february 12, 2023, 8:35:45

I followed bad instructions and left the -a out of:



usermod -a -G wireshark ak


Now all of my groups have been lost, including sudo permissions:



$ groups
ak wireshark


If I understand correctly, I should be able to fix this by booting to the recovery option in GRUB, but I'm not sure what groups need to be added back.



Where can I check to find out what groups I used to be in?


More From » users

 Answers
7

In a standard Ubuntu installation there's a groups config backup file in /var/backups/group.bak. So (from a root recovery console) you could do something like



grep <your_username> /var/backups/group.bak


to list all groups you used to be in.



EDIT: as Lekensteyn rightly pointed out, it would be better to use the /etc/group- backup file, not the /var/backups/group.bak one.


[#44122] Monday, February 13, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ligenvirt

Total Points: 238
Total Questions: 98
Total Answers: 100

Location: Senegal
Member since Fri, Aug 21, 2020
4 Years ago
ligenvirt questions
Tue, Aug 17, 21, 02:28, 3 Years ago
Thu, Sep 23, 21, 17:55, 3 Years ago
Mon, Oct 18, 21, 03:34, 3 Years ago
;