LinuxQuestions.org
Review your favorite Linux distribution.
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 08-27-2009, 11:58 AM   #1
bloodsugar
Member
 
Registered: May 2009
Posts: 36

Rep: Reputation: 18
cant login as root


hello,

I've installed slack 12.2, and upgraded to the new kernel packages, but I didnt rebuild the initrd (!).

I reboot the machine, and get 'kernel panic'.

So I think I'll just get back in and fix it by using the slack dvd and

Code:
boot: hugesmp.s root=/dev/hda2 rdinit=ro
it works and I get to the login screen, but I cant login in with my root password, although I can login with my user. (I have been able to login as root before this).

is there anyway to get in as root without the password?
 
Old 08-27-2009, 12:06 PM   #2
Chuck56
Member
 
Registered: Dec 2006
Location: Colorado, USA
Distribution: Slackware
Posts: 930

Rep: Reputation: 479Reputation: 479Reputation: 479Reputation: 479Reputation: 479
from single user mode (init 1) run "passwd" and change the password

[edit]
oops - that doesn't work...

you can follow this thread: http://www.linuxquestions.org/questi...ht=root+passwd
[/edit]

Last edited by Chuck56; 08-27-2009 at 12:27 PM. Reason: added content
 
Old 08-27-2009, 12:49 PM   #3
hua
Member
 
Registered: Oct 2006
Location: Slovak Republic
Distribution: Slackware 14.2, current
Posts: 461

Rep: Reputation: 78
Quote:
[edit]
oops - that doesn't work...
And when you are logged in as user can you do su?
 
Old 08-27-2009, 01:00 PM   #4
gonzas
LQ Newbie
 
Registered: Aug 2009
Distribution: Slackware 14.0
Posts: 5

Rep: Reputation: 0
Have you tried the "init=/bin/bash" boot parameter?

If this gets you to bash prompt, you'll be "logged in" as root, and then you can change the password.

Last edited by gonzas; 08-27-2009 at 01:03 PM.
 
Old 08-27-2009, 01:17 PM   #5
bgeddy
Senior Member
 
Registered: Sep 2006
Location: Liverpool - England
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810

Rep: Reputation: 232Reputation: 232Reputation: 232
Quote:
is there anyway to get in as root without the password?
There are a few methods of doing this but I've only found one to work reliably. That is to boot using the Slackware install DVD. Make a mount directory "mkdir /mnt/root". Mount the installed Slackware hard disk,(lets say /dev/sda2), to the directory "mount /dev/sda2 /mnt/root". Chroot into the mounted directory with "chroot /mnt/root". Run "passwd". Reboot.

Other methods I have tried like tagging init=/bin/bash or single to the lilo prompt have problems for me. One is I can't get a lock on the password file when I try and write to it. The chroot seems to be the only reliable method.
 
Old 08-27-2009, 02:27 PM   #6
bloodsugar
Member
 
Registered: May 2009
Posts: 36

Original Poster
Rep: Reputation: 18
I followed the advice in this thread:

http://www.linuxquestions.org/questi...ht=root+passwd

particularly post #4, after following those instructions and bits of info from other posts, I then went into /hd/etc/shadow, and deleted the root password. I then rebooted using the slack 12.2 dvd with this:

boot: hugesmp.s root=/dev/hda2 rdinit=ro

and was able to login as root, and fix the inital problem.


I can eat my dinner now!

Thanks everyone

Last edited by bloodsugar; 08-27-2009 at 02:33 PM.
 
  


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
Adding root privaliges to user accounts or auto login as root Val-Ent Linux - General 15 03-02-2010 04:27 PM
wrong login shell prevent root login cefs99 Linux - Security 4 05-31-2006 08:28 AM
Gnome: Cannot login as default user, sends back to login, works as root Danny-T Linux - Newbie 2 05-27-2006 03:44 AM
I have re-installed MK 9.2 but cannot login as user, login as root works. bobinglis Mandriva 2 02-22-2004 11:39 AM
can only login as root? user login doesnt work..? anyone? hacking_4_b33r Linux - General 1 02-05-2004 11:40 PM

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

All times are GMT -5. The time now is 08:51 PM.

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