LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 05-07-2012, 06:36 AM   #1
nass
Member
 
Registered: Apr 2006
Location: Athens, Greece
Distribution: slackware, debian, ubuntu
Posts: 666

Rep: Reputation: 39
forgot root passwd, kernel boot in single mode still asks for root passwd


Hello everyone,
stupid me. I must have typed smth that I don't recall for a vm guest slackware I setup.
I reboot to single mode , but i still get a root and password prompt when loading finishes.
empty password is not allowed and i can't get access not even i single mode (i really thought I should)

Quote:
(none) login: root
password:
I can also try to boot with kernel params:
Quote:
single init=/bin/bash
. this time I get a prompt but I can't remount / as rw, nor change the password (passwd complains it can't get a lock on /etc/shadow)

what am i forgeting?
 
Old 05-07-2012, 07:57 AM   #2
AlleyTrotter
Member
 
Registered: Jun 2002
Location: Coal Township PA
Distribution: Slackware64-15.0
Posts: 783

Rep: Reputation: 479Reputation: 479Reputation: 479Reputation: 479Reputation: 479
Not real sure but:

Boot the machine with a live DVD
then edit the /etc/passwd file
the first line should be
"root:x:0:0::/root:/bin/bash"
change it to
"root::0:0::/root:/bin/bash"
If my memory is good this gives root no password
so you just hit [ENTER] for the root login password

SORRY I missed that this was a VM

john

Last edited by AlleyTrotter; 05-07-2012 at 08:04 AM. Reason: self explanatory
 
Old 05-07-2012, 08:03 AM   #3
guanx
Senior Member
 
Registered: Dec 2008
Posts: 1,176

Rep: Reputation: 233Reputation: 233Reputation: 233
Quote:
Originally Posted by nass View Post
...
I can also try to boot with kernel params: . this time I get a prompt but I can't remount / as rw
...
What's the error message?
 
Old 05-07-2012, 08:10 AM   #4
hotchili
Member
 
Registered: Sep 2009
Location: Germany
Distribution: slackware64-current
Posts: 89

Rep: Reputation: 32
Basicly it should work what you are trying...

Try only init=/bin/bash no other parameters, and
then when you get the prompt: mount -o remount,rw /
 
Old 05-07-2012, 08:53 AM   #5
nass
Member
 
Registered: Apr 2006
Location: Athens, Greece
Distribution: slackware, debian, ubuntu
Posts: 666

Original Poster
Rep: Reputation: 39
Alley Trotter, i can't mount the /dev/sda1.. its a jfs volume... I thought the huge kernel has the jfs compiled in or as module...
mount says " bad fs option, bad superblock".

so no chances i mount the drive...

also i really though I could do all this without the slack dvd...
 
Old 05-07-2012, 09:06 AM   #6
nass
Member
 
Registered: Apr 2006
Location: Athens, Greece
Distribution: slackware, debian, ubuntu
Posts: 666

Original Poster
Rep: Reputation: 39
ok the error message is ugly:

1st attempt:
Quote:
bash4.1# mount -o remount,rw /
mount: / not mounted already, or bad option
2nd attempt
Quote:
bash4.1# mount -o remount,rw /
[ 52.254623] BUG: unabled to handle kernel NULL pointer dereference at 00...00040
[ 52.256358] IP: [<fffffffff81434235>] txBegin+0x7d/0x380
..
.
.
.
(more ugly dump following
3rd attempt
mount gets stuck somewhere and never returns a prompt... hmmmmm


it looks fairly 'outside' the norm. so i';ll assume something is really wrong and just dump the whole vm guest.. its a clean slack system either way
 
Old 05-07-2012, 11:25 AM   #7
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Download the SystemRescueCD, it has comes with the ability to mount JFS. Then just chroot into your /-partition and launch passwd root to change the root password. No need for editing files.
 
Old 05-07-2012, 12:16 PM   #8
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,702

Rep: Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896
Try this:
linux single init=/bin/bash rw

Ref:
http://www.linuxquestions.org/questi...ion-cd-876500/
 
1 members found this post helpful.
Old 05-08-2012, 04:24 AM   #9
nass
Member
 
Registered: Apr 2006
Location: Athens, Greece
Distribution: slackware, debian, ubuntu
Posts: 666

Original Poster
Rep: Reputation: 39
Thank you guys for the vm is gone at this point (perhaps not though at the time of your posting - but I didn't check LQ)

TobiSGD i guess many live distros would let me do what you're saying, i still would have preferred to get the password pack with what slackware has laying around. Its good to know jfs is not supported by the huge kernel of the install dvd (should it not?)

Michaelk yes that seems reasonable but no need to try it now. it seems this is what i was looking for though
 
Old 05-08-2012, 06:17 AM   #10
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Quote:
Originally Posted by nass View Post
Its good to know jfs is not supported by the huge kernel of the install dvd (should it not?)
Actually it is. I just had a look and the Slackware install DVD has, after booting up, makefs.jfs available, so I think that JFS is supported.
 
Old 05-08-2012, 06:25 AM   #11
nass
Member
 
Registered: Apr 2006
Location: Athens, Greece
Distribution: slackware, debian, ubuntu
Posts: 666

Original Poster
Rep: Reputation: 39
then why couldn't I just mount the drive ?:S
 
Old 05-08-2012, 12:37 PM   #12
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
I think jfs has to be checked with fsck before every mount.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Forgot root passwd!! :-( tomthebomb3 Linux - Newbie 10 10-29-2007 11:07 PM
Forgot my root passwd k1ll3r_x SUSE / openSUSE 23 04-06-2005 12:44 PM
forgot root passwd sanu Linux - Newbie 2 09-21-2004 02:07 AM
forgot root passwd sanu Linux - Newbie 1 09-20-2004 04:45 AM
MDK 9: Cannot boot into linux single to chage forgotten root passwd acadcworks Linux - Security 1 12-18-2002 10:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 09:35 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration