• 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


    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

    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$')
    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$")

    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


    [root@localhost ~]# grub-crypt   --md5   
    Retype password:


    [root@localhost ~]# grub-crypt   --sha-256
    Retype password:
    [root@localhost ~]#


    [root@localhost ~]# grub-crypt   --sha-512
    Retype password:


Tags: mysql

Mobile Applications

Video Content

Bigdata & NoSQL

SaaS Applications



Alexa Certified Site Stats for