Yep. Forgot the root password to cave. =(.
Does anyone know any way I can get it back? I have physical access to the box, so using a startup CD is no problem at all.
Wiping Drive - 27% complete...
Eh, start the box with the boot CD, get to a shell, mount your drive, and uh, /etc/passwd / /etc/shadow <-- play with those files.
Otherwise, dunno.
IIRC, can't you just setpwd in single-user mode?
Quote from: LoRd[nK] on September 21, 2005, 08:01:40 PM
IIRC, can't you just setpwd in single-user mode?
passwd <username> works too, I think. But you have to be root, so eh
Did you have the insite to give yourself sudo priviledges?
When you get to your LILO prompt:
Quote
LILO: linux init=/bin/bash
Instead of starting /sbin/init and proceeding with the usual /etc/rc.d/* procedure the kernel will just give you a shell. Not of much use to you, the hdd is mounted read only since it never had a chance to get checked and remounted read/write.
Quote
# mount -o remount,rw /
Now you can use
passwd to change your password. Don't reboot yet. Since init isn't running there is no process in place for safely taking the system down. remount the root filesystem again.
Quote
# mount -o remount,ro /
Reboot.
Btw, this works on any linux system running LILO as a boot manager, so if ever you have console access to someone's box...
Ahh, so this is what you were talking about. So many neat tricks :p
a more fun way would be to backup all ur stuff and rm -rf /*.
QuoteWhen you get to your LILO prompt:
I don't use LILO. =(
Quotea more fun way would be to backup all ur stuff and rm -rf /*.
...................
@Quik: I have sudo privlidges. I guess why it didn't work is because I was doing su instead.
EDIT -
joe@dave:~ $ sudo passwd root
Password:
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Quote from: Joe[e2] on September 22, 2005, 07:46:51 AM
QuoteWhen you get to your LILO prompt:
I don't use LILO. =(
Quotea more fun way would be to backup all ur stuff and rm -rf /*.
...................
@Quik: I have sudo privlidges. I guess why it didn't work is because I was doing su instead.
EDIT -
joe@dave:~ $ sudo passwd root
Password:
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
You are no fun :o.
Quote from: mfqr on September 21, 2005, 10:13:54 PM
a more fun way would be to backup all ur stuff and rm -rf /*.
Don't say that, ever agian. You sound like c0n.
Quote from: Quik on September 22, 2005, 06:58:35 PM
Quote from: mfqr on September 21, 2005, 10:13:54 PM
a more fun way would be to backup all ur stuff and rm -rf /*.
Don't say that, ever agian. You sound like c0n.
*cough*... Anyway, That's a neat trick tmp.
Quote from: Krazed on October 06, 2005, 07:56:12 PM
Quote from: Quik on September 22, 2005, 06:58:35 PM
Quote from: mfqr on September 21, 2005, 10:13:54 PM
a more fun way would be to backup all ur stuff and rm -rf /*.
Don't say that, ever agian. You sound like c0n.
*cough*... Anyway, That's a neat trick tmp.
Yeah, I hint oh-so-subtle. Oh, and nice bump for what a pointless post. -1 ;)
It was only 10 days! I don't wanna hear it.
Its also rather easy if you plan to use a liveCD. Just boot with it and then mount your hd. After that chroot into it and use passwd and tada.