LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   lost root password (https://www.linuxquestions.org/questions/slackware-14/lost-root-password-290855/)

thick_guy_9 02-16-2005 04:37 AM

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

druuna 02-16-2005 04:56 AM

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

perfect_circle 03-07-2005 08:35 AM

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


All times are GMT -5. The time now is 11:15 AM.