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 02-16-2005, 04:37 AM   #1
thick_guy_9
Member
 
Registered: Jan 2004
Location: Singapore
Distribution: VMS, CentOS
Posts: 109

Rep: Reputation: 16
lost root password


guys,
over the weekend, I had to reinstall slackware because I did not know how to set the root password, because I forgot it?

How do I do it?

THanks for any help

bye
 
Old 02-16-2005, 04:56 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

This has been asked and answered very, very often..........

Please use your fav searchengine or look here:

http://www.google.com/search?q=slack...utf-8&oe=utf-8

Last edited by druuna; 07-01-2005 at 11:25 AM.
 
Old 03-07-2005, 08:35 AM   #3
perfect_circle
Senior Member
 
Registered: Oct 2004
Location: Athens, Greece
Distribution: Slackware, arch
Posts: 1,783

Rep: Reputation: 53
Use the instructions of our beloved Slackware maintainer
It's in the first cd, in Slackware-HOWTO file. (in slack 10.1 at least)
Quote:
Passwords and security
----------------------

When choosing passwords for a Linux system that is connected to a network
you should pick a strong password. However, passwords only help protect a
system from remote trespassing. It's easy to gain access to a system if
someone has physical access to the console.

If you forget the root password, you can use a rescue disk to mount your
root partition and edit the files containing the password information.
If you have a bootable CD-ROM drive, the second CD-ROM provides a full
bootable version of Linux (with no root password) and makes an excellent
rescue disk. Otherwise, use the bootdisk that you used to install Linux
to load the "rescue.dsk" rootdisk image. At the prompt, you can manually
mount the root Linux partition from your hard drive and remove the root
password. For example, if your root linux partition is /dev/hda2, here
are the commands to use after logging into the rescue disk as "root":

mount /dev/hda2 /mnt
cd /mnt/etc

Next, you'll need to edit the "shadow" file to remove root's password.
Editors which might be available include "vi", "emacs", and "pico". "vi"
and "emacs" might be more of an adventure than you need unless you've used
them before. The "pico" editor is easy for beginners to use.

pico shadow

At the top of the file, you'll see a line starting with root. Right after
root, you'll notice the encrypted password information between two colons.
Here's how root's line in /etc/shadow might look:

root:EnCl6vi6y2KjU:10266:0:::::

To remove root's password, you use the editor to erase the scrambled text
between the two colons, leaving a line that looks like this:

root::10266:0:::::

Save the file and reboot the machine, and you'll be able to log in as root
without a password. The first thing you should do is set a new password
for root, especially if your machine is connected to a network.
*EDIT*
the command to set a new password is passwd

Last edited by perfect_circle; 03-07-2005 at 08:39 AM.
 
  


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
root password is lost!!! :( alaios Linux - General 3 11-07-2005 05:48 AM
Lost root password zillah Solaris / OpenSolaris 10 05-24-2005 05:28 PM
lost root password papitu76 Mandriva 12 10-31-2004 10:40 AM
Lost root Password us06154 Linux - Newbie 17 08-14-2003 04:08 PM
Lost My root password !!! hitesh_linux Linux - General 33 04-14-2003 08:32 AM

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

All times are GMT -5. The time now is 11:48 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