PDA

View Full Version : Need Help from Unix Guru - lost root privs


drahnier
06-03-2006, 01:03 PM
in the course of customizing entries in /etc/sudoers, i lost the ability to sucessfully execute "sudo gainroot".

here's what happened:
i added some lines to /etc/sudoers and afterwards this file ended with
permissions: -rwxr-xr-x 1 user root.
when trying to do "sudo gainroot" this fails and i et "sudo: /etc/sudoers is mode 0755, should be 0440".
well, i can do a "chgmode 0440 /etc/sudoers" to set the suggested mode, but "sudo gainroot" still fails, this time wit "suduo /etc/sudoers is owned by uid 29999, should be 0".
now, attemting to change ownership (using "chown") fails: root permission required.

so, i need some help here:
- is there an alternative way of getten root permission to fix the mode/owner bits of /etc/sudoers?

_______________
drahnier

bradb
06-03-2006, 07:50 PM
so, i need some help here:
- is there an alternative way of getten root permission to fix the mode/owner bits of /etc/sudoers?

I'd think you're boned and only a reflash will help. If you could get to root now, wouldn't it be a security hole?

It doesn't really help, but consider visudo next time - no possibility of mistakes (you'll need to export VISUAL or EDITOR first though...)

Brad.

troubleshootr
06-03-2006, 08:43 PM
in the course of customizing entries in /etc/sudoers, i lost the ability to sucessfully execute "sudo gainroot".

here's what happened:
i added some lines to /etc/sudoers and afterwards this file ended with
permissions: -rwxr-xr-x 1 user root.
when trying to do "sudo gainroot" this fails and i et "sudo: /etc/sudoers is mode 0755, should be 0440".
well, i can do a "chgmode 0440 /etc/sudoers" to set the suggested mode, but "sudo gainroot" still fails, this time wit "suduo /etc/sudoers is owned by uid 29999, should be 0".
now, attemting to change ownership (using "chown") fails: root permission required.

so, i need some help here:
- is there an alternative way of getten root permission to fix the mode/owner bits of /etc/sudoers?

_______________
drahnier

Try using ssh or Putty to log in remotely as root from a PC. After logging into the 770, you should be able to fix permissions.

From a Linux box:

ssh root@<IP ADDRESS>
default root password is "rootme"

Edit: You would need open ssh or dropbear installed on the 770.

drahnier
06-05-2006, 05:30 AM
well, i decided to reflash. fortunately i had a a backup which was only two hoers od. so it was no big deal.