A close call (usermod -G)
Nearly borked my system this morning trying to help a user here.
I ran usermod -G www-data wim to add the only adminstrative user to the www-data group. This wiped all additional groups that the user was a member of (including sudo) Luckily I checked, and because sudo remembered the password and I did not close the terminal yet, I could correct the situation.
Close, very very close.
The correct command is, by the way, usermod -aG www-data wim
If you don't make backups of your important data, your data is obviously not important to you.
Bookmarks