by Void Main » Tue Dec 02, 2008 6:59 am
If your system is configured properly I shouldn't be able to tell you how to change your root password remotely without being root. The only proper way that I can think of without exploiting some unpatched root exploit or backdoor that you may have put in is if you have set your account up with root equivalence using sudo.
Changing it locally with physical access to the box is trivial. Just boot it into single user mode and change it using the passwd command. To do that all you have to do is append a "1" or the word "single" as a parameter to the kernel command line. If you are using grub you would arrow to the kernel line you want to boot on the grub boot menu and then press the "a" key (for append) where you would add the new parameter, then press ENTER to boot it. Adding that parameter at boot time will not be a permanent change, it will only effect that boot. It will take you to a root shell where you can change the password. Type "exit" to exit the shell when finished and continue the boot in the normal run level.