Trying to reset root password

If none of the more specific forums is the right place to ask

Trying to reset root password

Postby JeSTeRFLA » 2011-12-04 00:35

i so far did the adding on "single init=/bin/bash" them "ctrl + x" to boot im in the bin/bash as root@none
i remounted using "mount -n -o remount,rx /" BUt its saying "bash: passwd: command not found"
JeSTeRFLA
 
Posts: 4
Joined: 2011-12-04 00:32

Re: Trying to reset root password

Postby JeSTeRFLA » 2011-12-04 00:38

OH its debian 6 (squeeze) if that helps any
JeSTeRFLA
 
Posts: 4
Joined: 2011-12-04 00:32

Re: Trying to reset root password

Postby nadir » 2011-12-04 03:15

Assuming you did forget the old password
(its not that clear, if you know the old password, just become root and type "passwd" without any further steps):

boot a live-CD
run 'fdisk -l' to find out what is the name of the / partition
mount it:
Code: Select all
mkdir /media/disk
mount /dev/sda1 /media/disk

chroot into it and change the password
Code: Select all
chroot /media/disk
passwd
exit

to exit chroot. Then reboot.
"I am not fine with it, so there is nothing for me to do but stand aside." M.D.
User avatar
nadir
 
Posts: 5965
Joined: 2009-10-05 22:06
Location: away

Re: Trying to reset root password

Postby Ibidem » 2011-12-04 03:43

JeSTeRFLA wrote:i so far did the adding on "single init=/bin/bash" them "ctrl + x" to boot im in the bin/bash as root@none
i remounted using "mount -n -o remount,rx /" BUt its saying "bash: passwd: command not found"

No need of the 'single'; it's a parameter for init, and you're using bash as init.
There's an 'ro' just before that by default, which you can change temporarily to rw instead of remounting. Just remember: anything after init=... is extra options for init/..., so put the rw before that (otherwise it panics)
Thinkpad X100e/Debian Squeeze (All reposiories enabled)/Linux 3.4.11:
1GB RAM/1.6GHz Neo X2/ATI HD 3200/RTL8191SEVA2 wlan0, RTL8169 eth0
Ibidem
 
Posts: 157
Joined: 2010-12-24 18:28

Re: Trying to reset root password

Postby JeSTeRFLA » 2011-12-04 04:32

i still get the "bash: passwd: command not found" im using after "root@(none):/ # passwd" to change the password and i still doing something wrong?

and no i forgot the password although i only use one of 4 passwords none seem to be it
JeSTeRFLA
 
Posts: 4
Joined: 2011-12-04 00:32

Re: Trying to reset root password

Postby meho_r » 2011-12-04 12:14

Couple of days ago somebody recommended this (no need for "remount"):
Code: Select all
init=/bin/bash rw
User avatar
meho_r
 
Posts: 105
Joined: 2009-02-20 01:17
Location: BiH

Re: Trying to reset root password

Postby jdev1240 » 2011-12-04 14:48

I've used this how to twice on my mom's pc & never had an issue. She's running squeeze.



http://forums.debian.net/viewtopic.php?f=16&t=52993&hilit=reset+root+password
jdev1240
 
Posts: 18
Joined: 2010-11-23 01:41
Location: Indiana

Re: Trying to reset root password

Postby golinux » 2011-12-04 15:05

jdev1240 wrote:I've used this how to twice on my mom's pc & never had an issue. She's running squeeze.

http://forums.debian.net/viewtopic.php?f=16&t=52993&hilit=reset+root+password

I have used this also for an old install I hadn't accessed in a loooong time. Easy, peasy.
Blessed are the 'troublemakers' who strive to right wrongs and shine light into dark places.
User avatar
golinux
 
Posts: 629
Joined: 2010-12-09 00:56
Location: not a 'buntard!

Re: Trying to reset root password

Postby JeSTeRFLA » 2011-12-05 00:58

OK so regardless i CANNOT use the passwd command in bash or sh why is that? its just not letting me
JeSTeRFLA
 
Posts: 4
Joined: 2011-12-04 00:32

Re: Trying to reset root password

Postby Ibidem » 2011-12-05 05:52

JeSTeRFLA wrote:OK so regardless i CANNOT use the passwd command in bash or sh why is that? its just not letting me

Is it installed?
Code: Select all
echo $PATH; export PATH=$PATH:/usr/bin
/usr/bin/passwd
test -d /usr/bin && echo "Directory found"||grep '/usr' /etc/fstab && mount|grep usr
ls -l /usr/bin/passwd
dpkg -l passwd

Is the path set right? is /usr supposed to be mounted, but isn't?
Are permissions right? Did the package get uninstalled?
Thinkpad X100e/Debian Squeeze (All reposiories enabled)/Linux 3.4.11:
1GB RAM/1.6GHz Neo X2/ATI HD 3200/RTL8191SEVA2 wlan0, RTL8169 eth0
Ibidem
 
Posts: 157
Joined: 2010-12-24 18:28


Return to General Questions

Who is online

Users browsing this forum: emarkay and 11 guests

fashionable