Blog

  • Creating Of Salted Form Hash In Linux

    Posted by Vishnu Gaur | Last Updated: 29-Jun-18

    << There are some fantastic method of creating salted form >>

    Note: this method for linux based os which having password at shadow file

    Important: I am creating  salted form using MD5 algo
    =========
    some important notations:

    $1 -- md5
    $5  --  sha256
    $6  --  sha512

    Method 1: By using  Perl method
    ========

    Note: open termina in linux and type below language based command
    =================================================

    [root@localhost html]#   perl -e 'print  crypt("sfsf","\$1\$jsdfk34\$")'

    Method 2: By using  php
    =================
    Again open terminal in linux based os

    [root@localhost html]# gedit  pass.php                                   # create a file

    <?php

    echo  crypt("redhat","$1$me435$");
    ?>


    Now this page in web browser or  type given method in terminal

    [root@localhost html]# php  pass.php   2>/dev/null
    $1$$0zVoVk4ItwraHPMvpK7581

    Method 3:  Using  ruby
    =================

    Note: first of all make sure that ruby is installed or not if it is not then install it

    [root@localhost ~]# yum  install ruby

    Now we can create password :
    ===========================

    [root@localhost ~]# ruby
    print  "linux".crypt('$1$sdf$')
    $1$sdf$Nz9fU9YFm0T9P7/Gv7cXL.
    Method 4: Using python
    ==================

    Open terminal and follow steps

    [root@localhost ~]# python
    Python 2.6.6 (r266:84292, Feb 22 2013, 00:00:18)
    [GCC 4.4.7 20120313 (Red Hat 4.4.7-3)] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import crypt
    >>> crypt.crypt("redhat","$1$fdsf$")
    '$1$fdsf$q0Sxg2R99BGRfZB0zsuuo.'
    >>>

    Method 5:  Using mysql
    =================
    GO to mysql server prompt and type :

    mysql> select  encrypt("me","$1$fgdfg$");
    +---------------------------------+
    | encrypt("me","$1$fgdfg$")       |
    +---------------------------------+
    | $1$fgdfg$MJnmjKiaPyxDO4ED4cp.V/ |
    +---------------------------------+
    1 row in set (0.00 sec)


    Method 6: Using no language :

    A) [root@localhost ~]# openssl  passwd -1  -salt  sdkdf   redhat
    $1$sdkdf$YhyFOvpsRtJXhR4LmwBF9.

    B)

    [root@localhost ~]# grub-crypt   --md5   
    Password:
    Retype password:
    $1$wAJ8eaqf$nbszh7ogHXj1N2vxMR6XT/

    C)

    [root@localhost ~]# grub-crypt   --sha-256
    Password:
    Retype password:
    $5$zoQK9nSLjnzQmSwO$neM0S99NuF/cz4egetvL9NCPKCeEEL.xPybMAiZZoB8
    [root@localhost ~]#

    D)

    [root@localhost ~]# grub-crypt   --sha-512
    Password:
    Retype password:
    $6$s2WxC8JFtpOqGsd9$ldPha2iT/Nm2Gml7JDEtQm5ri6JrSGYcrUFe.o9eKyrhhRIeAM3MGCQSEDUQvbgbITGebX5eP3sJ08/6Q9NEy0

     

Tags: mysql

Mobile Applications

Video Content

Bigdata & NoSQL

SaaS Applications

Miscellaneous

Archives


Alexa Certified Site Stats for www.oodlestechnologies.com