![]() ![]() or scripted- $ python -c 'import crypt print(crypt.crypt("somesecret", crypt.mksalt(crypt.METHOD_SHA512)))' Take note that these are salted: Python (>= 3.3) $ python -c 'import crypt,getpass print(crypt.crypt(getpass.getpass(), crypt.mksalt(crypt.METHOD_SHA512)))' To work around this you can use the following Python or Perl one-liners to generate SHA-512 passwords. ![]() $ yum whatprovides "*/mkpasswd"īoth of these methods are superior to using rpm since the packages do not have to be installed to locate */mkpasswd. You can find out what package it belongs to with either of these commands. NOTE: The command mkpasswd is actually part of the expect package, and should probably be avoided. On any of the Red Hat distros such as Fedora, CentOS, or RHEL the command mkpasswd doesn't include the same set of switches as the version typically included with Debian/Ubuntu.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |