Sunday, April 12, 2009

sudo not working in Ubuntu and Semantic package manager vanished

I have recently had a problem when sudo did not worked in Ubuntu, The problem was that whenever I tried to do sudo it would ask for my password but it wont carry out the action as per the command.Another symptom was that the synaptic package manager had vanished from the menu. It was a peculiar behavior for me because I had jumped from windows to Ubuntu and it was just few weeks I was trying on Ubuntu. I was trying to install Nagios and this problem suddenly arised when normally working sudo stopped working for my root user.

The problem with it was that I had accidently removed my root admin user from the admin group, So in order to fix I had to do the following steps :

step 1 : I started the computer in recovery mode
step 2 : I entered the root user space
step 3 : And finally I just added my user back to admin group by the following command
adduser username admin

And the problem was solved I again had my synaptic package manager in the menu and I could now do everything back again. I guess my experience might help some novice users.

user@user : adduser username admin

Comments are welcomed !