Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Trying to reset root password

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
JeSTeRFLA
Posts: 4
Joined: 2011-12-04 00:32

Trying to reset root password

#1 Post by JeSTeRFLA »

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

#2 Post by JeSTeRFLA »

OH its debian 6 (squeeze) if that helps any

User avatar
nadir
Posts: 5961
Joined: 2009-10-05 22:06
Location: away

Re: Trying to reset root password

#3 Post by nadir »

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.

Ibidem
Posts: 160
Joined: 2010-12-24 18:28

Re: Trying to reset root password

#4 Post by Ibidem »

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

JeSTeRFLA
Posts: 4
Joined: 2011-12-04 00:32

Re: Trying to reset root password

#5 Post by JeSTeRFLA »

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

User avatar
meho_r
Posts: 105
Joined: 2009-02-20 01:17

Re: Trying to reset root password

#6 Post by meho_r »

Couple of days ago somebody recommended this (no need for "remount"):

Code: Select all

init=/bin/bash rw

jdev1240
Posts: 18
Joined: 2010-11-23 01:41
Location: Indiana

Re: Trying to reset root password

#7 Post by jdev1240 »

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? ... t+password

User avatar
golinux
Posts: 1579
Joined: 2010-12-09 00:56
Location: not a 'buntard!
Been thanked: 1 time

Re: Trying to reset root password

#8 Post by golinux »

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? ... t+password
I have used this also for an old install I hadn't accessed in a loooong time. Easy, peasy.
May the FORK be with you!

JeSTeRFLA
Posts: 4
Joined: 2011-12-04 00:32

Re: Trying to reset root password

#9 Post by JeSTeRFLA »

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

Ibidem
Posts: 160
Joined: 2010-12-24 18:28

Re: Trying to reset root password

#10 Post by Ibidem »

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

Post Reply