You are not logged in.

#1 2007-06-23 06:50:40

flebber
Member
Registered: 2007-06-19
Posts: 32

Moment of frustration - Locked Root Account

I have locked the root account by entering the password 3 times incorrectly. How can I re-enable it ? I killed X and went to the console to try and login as root but it kicks me back out.

Offline

#2 2007-06-23 07:06:09

somedrew
Member
From: Canada
Registered: 2007-05-14
Posts: 140

Re: Moment of frustration - Locked Root Account

It it locked out completely? If so, you can either 1) activate the root account from a live cd or 2) boot up with with a kernel option of init=/bin/bash to be able to activate/reset root (this list is far from exhaustive, but it'll get the job done).
cheers,

Offline

#3 2007-06-23 08:35:02

flebber
Member
Registered: 2007-06-19
Posts: 32

Re: Moment of frustration - Locked Root Account

where are the kernel options located ? Or am I supposed to edit grub and insert that option ?

Last edited by flebber (2007-06-23 08:35:34)

Offline

#4 2007-06-23 08:45:26

bboozzoo
Member
From: Poland
Registered: 2006-08-01
Posts: 120

Re: Moment of frustration - Locked Root Account

on hpux or solaris you nornally unlock root account by logging in from console, which in case of kernel without console=... option passed is first terminal (A+C+F1)

Offline

#5 2007-06-23 08:50:11

somedrew
Member
From: Canada
Registered: 2007-05-14
Posts: 140

Re: Moment of frustration - Locked Root Account

flebber wrote:

where are the kernel options located ? Or am I supposed to edit grub and insert that option ?

You can do it from the grub menu (changes only take effect for that one boot). From the menu, you can press 'e' from a boot entry, and append the desired boot options from there. Once done, press 'enter' and then 'b' to boot.

Offline

#6 2007-06-23 10:41:35

flebber
Member
Registered: 2007-06-19
Posts: 32

Re: Moment of frustration - Locked Root Account

when I specify init=/bin/bash I get this error

bash: root/dev/sdb3: no such file or directory
kernel panic - not syncing

from etc/passwd

root:x:0:0:root:/root:/bin/bash

So the file I nedd to access is

/etc/passwd-

but how can I get around the permissions

Last edited by flebber (2007-06-23 11:08:02)

Offline

#7 2007-06-23 12:00:13

lloeki
Member
From: France
Registered: 2007-02-20
Posts: 456
Website

Re: Moment of frustration - Locked Root Account

the simplest way is to pop in te livecd, mount and chroot to your root part

but instead of init=/bin/bash, which fails because you need the initcpio image to load modues, try 'break'. you will end up in ash, which is a freakin' unfriendly shell, but from there you may mount+chroot your hd too. maybe you'll have to ismod/modprobe some ide/fs modules.


To know recursion, you must first know recursion.

Offline

#8 2007-06-23 12:30:19

flebber
Member
Registered: 2007-06-19
Posts: 32

Re: Moment of frustration - Locked Root Account

Hopefully this will be successful

[root@localhost flebber]# chroot /archroot su
[root@localhost flebber]# passwd
Changing password for user root.
New UNIX password:
BAD PASSWORD: it is based on a dictionary word
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
[root@localhost flebber]#

Will reboot and see and hope

Offline

Board footer

Powered by FluxBB