mkpasswd

Table Of Content

Generating password hash

To generate a pwd hash you can use the command mkpasswd. This will allow you to insert your choosen pwd via stdin after you have excuted the command.

$ /usr/bin/mkpasswd -m <method-type> -s

mkpasswd sample

# generating hash for shado file:
$ /usr/bin/mkpasswd -m sha-512 -s
Password: asdf
$6$9ypFRuCiSWdHC9cQ$Ryb8sqLsic8ndvdcVPcHtU6QVRgr1giXNJC9p1gTvxAUzKSXaBv3f/lANfXABo2N1w6UjHEyJ1T76ZhtZFUVk0