How to trick the lost root password on Slackware !

Okay ^^ slackers

i just want to share this and i hope this wouldn’t & can’t be used for criminality or something !! :p

the case is when you lost your root password or someone change it silently. How to recover it ?

first, prepare the live CD for your slackware series , ex : slackware 12.1 livecd.

1. Power on ur computer

2. boot the LiveCD.

3. just enter when ask about keymap

4. Login as ROOT

5. know u are the root ! Mount ur root partition to a directory (lets’s make it)

6. If you forgot what partition is your root, type fdisk -l to check ur partition status. Lets agree that we have /dev/sda2 as the root in this case.

7. mkdir test

8. mount /dev/sda2/test

9. chroot test

10. vi /etc/shadow

11. u will see the root :<encryption number>:ID:0:::::

12. delete JUST the encryption number and replace it with blank or *

13. :wq

14. umount test

15. reboot

16. take the LiveCD from ur DVD/CD player

17. enter the slackware : login as root with blank password

18. change your password with passwd

19. finish ^^

alternative way after steps number 10 : if u are forgot or accidentaly delete ur ID and the number after it. We can trick this as long as you have two profiles.

For example, u have root and ‘antonie’ user. u remember the antonie password and u lost your root password. Just write to your root : …. : … :…. :::: exactly the same as the antonie has one. !!

then follow the 13-19 steps.. 🙂

that’s the simple way of mine to change the root password 🙂

Hope this can help ur problem….^^

Love and Hugs,




  1. November 20, 2008 at 7:05 am

    why nobody gives comment ???

  2. November 25, 2008 at 3:52 am

    Hi, nice blog.
    Thanks for this post.
    Now you have two comments. 😉

  3. November 25, 2008 at 8:15 am

    thank youuuuuuu !!

  4. Rudi said,

    February 3, 2009 at 2:08 am

    Thank You. Thank You. Thank You

  5. SK said,

    February 19, 2010 at 2:36 am

    Can you explain better the last solution ? I know the password of a user but do not knoe the password for root.What can I do ?

    I am looking forward for your reply.Thanx!

  6. February 19, 2010 at 7:44 am

    let us say that you user name is ‘abunawas’,
    can u see something formatted like this ?–>
    root ::ID:0:::::
    (bla bla bla…..)
    abunawas: :ID:0:::::


    If you see it, just make a note with your pen and replace the root information with the abunawas information, example:
    assumpted that:

    then change the root:@#$@$@#@$%1232423as@:ID:0:….
    into root:%&^$%$#$#$asdadasd@:ID:0:….

    the short way to describe these steps are a tricky way to copy the abunawas password into root password 😉

    • SK said,

      February 21, 2010 at 12:54 am

      Ok I got it. the problem is that my user can not edit the shadow file. In that case the only solution is with the live CD? Thank you a lot 🙂

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: