I used usermod -G
without the -a
option, now the main user has only 2 groups. I want to restore all the previous groups but the problem is that i need to list all the groups before the changes
I am trying to use
locate /etc/groups
and grep username in the previous version of the file to get all the previous group
How can I access to the file from the db and read them ?