Log viewer cant open syslog after messing up groups
I was doing some VirtualBox stuff today and I had so add my user to vbox group, well I did it wrong and I removed myself from sudoers. I used the recovery console and fixed it with this command:
usermod -a -G admin MyUserNow I can sudo again, but I went to the graphical log viewer (because ubuntu is booting kinda slower now and I wanted to see if I can find something there), and I see that it can't access syslog and other files from there because it says I don't have permissions. Previously I was able to see all the log files from "System Log Viewer", without having to use sudo or anything, just launching it as my normal user.
What could be happening?
btw, I know I can access syslog from any text editor with sudo, but I want to find why I was able to access it from the GUI before without sudo and now I can't. I am using ubuntu 11.10
1 Answer
Members of the adm group can read logfiles. Not only did you remove yourself from the admin group, you also removed all other groups.
To add yourself back to the adm group again:
sudo gpasswd -a MyUser admin 2