Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

my system is a new 11.04 ubuntu and i recently started working with LAMP. some how, when i tried to change permissions of the var/www/ for netbeans to work on the local server, and did something that causes this notice to show every time i do a sudo:

sudo: /var/lib/sudo owned by uid 33, should be uid 0

this is bad? how can i fix it? what exactly i did?


share|improve this question
uid 33 belongs to www-data – gnur Aug 16 '12 at 6:02
up vote 8 down vote accepted

To fix that particular issue is easy:

sudo chown -R root /var/lib/sudo

As for why that happened... I believe that when you were messing with permissions for /var/www you somehow, by accident, changed permissions (and ownership) of all /var tree, including /var/lib/sudo. (I bet the user you were trying to set has id=33)

This may have many consequenses, the sudo warning message being just one symptom.


As for the consequences... it really depends on what (and where) you did. Many (but not all) files and folds in the /var tree are owned by root:root, and its basically impossible to know who each and every file and folder originally belonged to. Full reinstall would be the only feasible way to restore it.

If you changed only the /var/lib tree, it narrows down the "damage", but not much: there are still hundreds of files there.

You can try to find out which command you issued caused this trouble, accesing your bash history:

gedit ~/.bash_history &

Maybe this will give a clue about what happened and its consequences

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.