How do i create an encrypted password with the sha256 hash?



  • Man page for sha256sum: http://bit.ly/2xQJD2A

    To creare a sha256 hash to use for passwords in configuration management tools or other password type settings.

    Note: make your password stronger.

    $ echo -n "newhouse" | sha256sum
    

    or using openssl

    echo -n "newshouse" | openssl dgst -sha256
    (stdin)= e36657967895b789897364aa68556006f76e36ed27e3adb5c6513124eee0a3ea
    

    Normally it is best not is echo out passwords to the screen. This method prompts for password. Redhat 6+

    $ python -c 'import crypt,getpass; print crypt.crypt(getpass.getpass())'
    Password:
    $6$RJFevkTj29Ll3tCh$5SEENM7E3mWXJ9xdkMrYmNezDffBAIvwRl3ye30TVRdyCXySuKUOV96X57e/Qm1hKigmoZBfYF1ALjY0zBAgX/
    

Log in to reply
 

© Lightnetics 2024