[AktiviX-discuss] Breaking ubuntu...
Alan Dawson
aland at burngreave.net
Fri Oct 7 15:54:52 UTC 2005
Quoting Charlie Harvey <charlie at peopleandplanet.org>:
> So I'd say:
> - press ctrl-alt-f1 to get a plain text terminal
> - log in as root, using your usual password
> - at the # prompt, type:
But hehe... he can't because ubuntu doesn't have a root password by default,
only allowing sudo account to root.
So unless dan's set up a root password for his box that won't work.
You could maybe boot from a (Ubuntu) Live CD, mount your hardisks somewhere.
chroot and then chmod +s /usr/bin/sudo. And the chmod 755 /usr/bin again.. and
then find any other apps that have sudo set and/or need fixing seperately.
something like ..
1. Boot from an Ubuntu Live CD
2. launch and xterm
3. sudo su -
4. fdisk -l /dev/hda ( you will see a list of partitions)
5. Select the partion that looks like your disk (probably /dev/hda1 or
/dev/hda2) .. work it out from the size.. assuming /dev/hda2
6. mkdir /mnt/hda2
7. mount /dev/hda2 /mnt/hda2
9. chmod 4755 /mnt/hda2/usr/bin/sudo
10. reboot into your disk. and you "might" get sudo back.
Or.. just copy your home folder somewhere ( like to anther server or PC ) and
reinstall.
Or .. bring to the next hacklab
But yeah pressing the wrong key as root is evil. I once was adding a new disk
to a machine and moving /usr to it. Trying to tidy up I went
machine:/mnt # rm -fr /usr
instead of
machine: /mnt # rm -fr usr
oh the pain ;-)
AED
--
"If you make decisions about software -- or anything -- based solely on
short-term cost and benefit, someone with a longer view can easily
manoeuver you into a trap from which it is hard to escape."
More information about the AktiviX-discuss
mailing list