sudo with tar crashes /etc/sudoers

Bug #72552 reported by Marc-André Appel on 2006-11-20
4
Affects Status Importance Assigned to Milestone
sudo (Ubuntu)
Undecided
Unassigned

Bug Description

Binary package hint: sudo

sudo works well for every command i use, but one time i use: "sudo tar xvzf *.tgz -C /", i can't use sudo anymore, in whatever way you imagine (sudo su -, sudo nano hello.txt, etc.).

I get this error message: "sudo: can't open /etc/sudoers: Permission denied"

Until now (it happens to me already 3 times), i have to reinstall (k)ubuntu, to solve that problem. What i tried to install/extract with tar is: http://ubuntuforums.org/showthread.php?t=49714 (installation of drivers for a Lexmark Printer).
Even as root (in Recovery-mode) i can't use sudo, i get the same message as described earlier.

I checked the permission of the sudoers file as well:
"-r--r----- 1 root root 403 2006-11-20 14:19 /etc/sudoers", so it doesn't seem to be a problem with the permissions IMHO.

Martin Pitt (pitti) wrote :

"sudo tar xvzf *.tgz -C /" -> it seems this simply overwrote your /etc/sudoers with a version from the unpacked tarballs.

Changed in sudo:
status: Unconfirmed → Rejected
HorseDung (horse-dung) wrote :

"sudo" will normally report an error message about the binary or the configuration file having the wrong permissions if that is the issue. It will also report a different error message if the user is not allowed to execute the requested command.

"sudo" throws away its root user status when it reads from files (and relies upon root group membership to do the disk I/O -- it actually does the request as the daemon user :). So, something is probably wrong that means the "sudo" program can't read /etc/sudoers once its thrown away its root *user* privs...

I would check the file permissions on / and on /etc using the command "ls -lad / /etc" and make sure there aren't any ACLs or extended attributes in the way...

Post back if you don't work it out from there...

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers