10 May
2006
10 May
'06
2:39 p.m.
On Wed, May 10, 2006 at 10:24:22AM -0400, Chuck Noyes wrote:
'sudo usermod -G <new-group> <my-username>'. Now I only belong to <new-group>. That removed my username from the other groups I belonged to, including the admin group. Is there a way undo what I did? I do have a copy of /etc/group before the change.
/etc/group- should be a backup. Also, you need to restore /etc/gshadow-. I would save a copy of the current files: cp /etc/group /etc/group.SAVE cp /etc/gshadow /etc/gshadow.SAVE Then restore the backups: cp /etc/group- /etc/group cp /etc/gshadow- /etc/gshadow You can check the files for correctness: grpck (likewise with passwd, shadow, pwck)