LinuxQuestions.org
Review your favorite Linux distribution.
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
 
LinkBack Search this Thread
Old 03-01-2009, 07:01 PM   #1
skaldicpoet9
Member
 
Registered: Feb 2009
Distribution: Puppy Linux 5.2
Posts: 74

Rep: Reputation: 15
Lost root password?


I just installed Slackware and for some reason my root password is not the one that I entered in. So how do I log on as root?
 
Old 03-01-2009, 07:08 PM   #2
stormtracknole
Member
 
Registered: Aug 2005
Location: The Big Easy
Distribution: Slackware, RHEL
Posts: 557

Rep: Reputation: 70
Are you using LILO or GRUB as your bootloader? I know that for GRUB, you can select the kernel that you want to boot, then press e for edit. At the end of your boot file, add 1, press b and that should boot you to init 1 as root with no password. This works on Red Hat, but I haven't tried it with Slackware yet. For the life of me, I can't think of how to accomplish this in LILO. Maybe someone can chime in on that.
 
Old 03-01-2009, 07:11 PM   #3
skaldicpoet9
Member
 
Registered: Feb 2009
Distribution: Puppy Linux 5.2
Posts: 74

Original Poster
Rep: Reputation: 15
The weird thing is it isn't actually stating that my password is incorrect it is saying that my login is incorrect when I login as /.
 
Old 03-01-2009, 07:18 PM   #4
stormtracknole
Member
 
Registered: Aug 2005
Location: The Big Easy
Distribution: Slackware, RHEL
Posts: 557

Rep: Reputation: 70
It stills mean that you have an incorrect password, since a root user is created by default. I'm trying to figure out how to boot as init 1 from the lilo screen.
 
Old 03-01-2009, 07:21 PM   #5
bgeddy
Senior Member
 
Registered: Sep 2006
Location: Liverpool - England
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810

Rep: Reputation: 223Reputation: 223Reputation: 223
I think the easiest way is to boot up using the Slackwa5e install disk. If you chose /dev/hda2 as your root filesystem on which tio install Slackware then run :

Code:
chroot /dev/hda2
then run passwd to change the password to something youy remember.

If you can;t remember where your root filesystem is then fdisk -l will give you a list of partitions.
 
Old 03-01-2009, 07:23 PM   #6
trist007
Member
 
Registered: May 2008
Distribution: Slackware
Posts: 873

Rep: Reputation: 53
In LILO, at the boot selection screen hit TAB, then input the name of the OS you want and append an init 1 or whatever init you want. Once you're in as root, just type in passwd.

Another solution is to get a Live cd boot it up, then go into /etc/passwd and just remove the password. Or was it /etc/shadow, I don't remember, but I was surprised when it worked.

Last edited by trist007; 03-01-2009 at 07:26 PM.
 
Old 03-01-2009, 07:24 PM   #7
stormtracknole
Member
 
Registered: Aug 2005
Location: The Big Easy
Distribution: Slackware, RHEL
Posts: 557

Rep: Reputation: 70
Quote:
Originally Posted by bgeddy View Post
I think the easiest way is to boot up using the Slackwa5e install disk. If you chose /dev/hda2 as your root filesystem on which tio install Slackware then run :

Code:
chroot /dev/hda2
then run passwd to change the password to something youy remember.

If you can;t remember where your root filesystem is then fdisk -l will give you a list of partitions.
Doh, I forgot about using the cd! That should work.
 
Old 03-01-2009, 07:26 PM   #8
Ramurd
Member
 
Registered: Mar 2009
Location: Rotterdam, the Netherlands
Distribution: Slackware64 13.37-multilib
Posts: 480

Rep: Reputation: 71
Quote:
Originally Posted by skaldicpoet9 View Post
The weird thing is it isn't actually stating that my password is incorrect it is saying that my login is incorrect when I login as /.
This looks like a confusion about the root-directory (/) and the user named "root". When asked for the username, type "root" and press enter. When asked for a password, enter the one you gave.

There is confusion in the world for the double naming of "root" as in the directory (which is "/") and "root", it's a common mistake, so don't worry.

However, since you don't know the name of "root", I take your experience with Linux is limited. Don't take the name of root in vain, and only use that user when in dire need (e.g. to create a normal user ;-))

Edit: - Also: the error message about a bad login is the same as the message given for a wrong password provided. This is for a reason, so people cannot "guess" usernames and on a "found user" try to use all possible passwords (a password (dictionary) attack).

Last edited by Ramurd; 03-01-2009 at 07:29 PM. Reason: Realized another point ;-)
 
Old 03-02-2009, 02:14 AM   #9
skaldicpoet9
Member
 
Registered: Feb 2009
Distribution: Puppy Linux 5.2
Posts: 74

Original Poster
Rep: Reputation: 15
Thanks for the help. It turned out that I was typing in / instead of root
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Lost Root password Oakstaff Linux - Newbie 6 11-29-2006 04:03 AM
Lost Root Password Mr.Smith Mandriva 2 11-27-2006 11:20 PM
Root Password Lost ! gurmeet.bedi Linux - Security 1 10-17-2006 07:01 AM
lost root password papitu76 Mandriva 12 10-31-2004 10:40 AM
lost root password dvong3 Linux - Newbie 2 06-13-2003 09:34 AM


All times are GMT -5. The time now is 06:35 PM.

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration