Как генерировать/etc/shadow совместимый пароль для Ubuntu 10.04?

Да, определенно. Должен работать безупречно, пока Ваш не движение от новой версии рабочей станции VMware, к более старой версии.

VMware спросит Вас, если vm будет перемещением или операцией копии и если Вы выберете копию, то он генерирует вещи, такие как новый MAC-адрес в vmx файле.

10
задан 14 April 2011 в 18:58
1 ответ

Это должно быть тривиально, чтобы изрубить быстрый python/perl/whatever сценарий и назвать склеп (3) функция.

The glibc2 version of this function supports additional encryption algorithms.

If salt is a character string starting with the characters "$id$" followed by
a string terminated by "$":

      $id$salt$encrypted

then instead of using the DES machine, id identifies the encryption method
used and this then determines how the rest of the password string is
interpreted.  The following values of id are supported:

      ID  | Method
      ---------------------------------------------------------
      1   | MD5
      2a  | Blowfish (not in mainline glibc; added in some
          | Linux distributions)
      5   | SHA-256 (since glibc 2.7)
      6   | SHA-512 (since glibc 2.7)

So $5$salt$encrypted is an SHA-256 encoded password and $6$salt$encrypted is
an SHA-512 encoded one.

"salt" stands for the up to 16 characters following "$id$" in the salt.  The
encrypted part of the password string is the actual computed password.  The
size of this string is fixed:

MD5     | 22 characters
SHA-256 | 43 characters
SHA-512 | 86 characters

The characters in "salt" and "encrypted" are drawn from the set [a-zA-Z0-9./].
In the MD5 and SHA implementations the entire key is significant (instead of
only the first 8 bytes in DES).

Можно все еще использовать md5 пароли в теневом файле в системах что значение по умолчанию к sha-512 или чему-то еще. Команда как инструмент makepasswd может использоваться для генерации хеша MD5.

Можно использовать mkpasswd, который странно является частью whois пакета на Debian/Ubuntu. mkpasswd -m sha-512. (Найденный здесь)

14
ответ дан 2 December 2019 в 22:07

Теги

Похожие вопросы