RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1253048 - "To create an encrypted password, use the following command:" improperly & unnecessarily suggests using custom salt
Summary: "To create an encrypted password, use the following command:" improperly & un...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: doc-Installation_Guide
Version: 6.7
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: rc
: ---
Assignee: Clayton Spicer
QA Contact: ecs-bugs
URL:
Whiteboard:
Depends On:
Blocks: 1253051
TreeView+ depends on / blocked
 
Reported: 2015-08-12 20:06 UTC by Ryan Sawhill
Modified: 2016-08-26 00:41 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1253051 (view as bug list)
Environment:
Last Closed: 2016-08-26 00:41:15 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Ryan Sawhill 2015-08-12 20:06:02 UTC
Document URL: 
  https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Installation_Guide/s1-kickstart2-options.html

Section Number and Name: 

  32.4 Kickstart Options

Describe the issue: 

  Twice on this page, you can find the following text:

    To create an encrypted password, use the following command:
      python -c 'import crypt; print(crypt.crypt("My Password", "$6$My Salt"))'
    This will create a sha512 crypt of your password using the provided salt. 

  Note that neither passwd nor grub-crypt let you specify custom salts ... so, to be clear, it's just not done, and a potentially bad practice to encourage.

Suggestions for improvement: 

  Remove all mentions of salt. The python version we have in RHEL6 and RHEL7 auto-generates an appropriate random salt when you don't specify it. Instead, the text could read:

    To create an encrypted password, use the following command:
      python -c 'import crypt; print(crypt.crypt("My Password"))'
    This will create a sha512 crypt-compatible hash of your password using a random salt. 

Additional information: 

  Here's what python's crypt looks like on RHEL6:

  # python -c 'import crypt; print(crypt.crypt("My Password"))'
  $6$ixr3bNcdW5VITMgz$8HJdnbow67FK8nDke3AyX19.Q1WqyRSM9CklF5sRcsp4j6crg0Kfm3RTTOLQibtUVGrTvK/BI5oDQ96Tx0cJq.

  # python -c 'import crypt; help(crypt.crypt)'
  Help on function crypt in module crypt:
  crypt(word, salt=None)
    Return a string representing the one-way hash of a password, with a salt
    prepended.
    
    If ``salt`` is not specified or is ``None``, the strongest
    available method will be selected and a salt generated.  Otherwise,
    ``salt`` may be one of the ``crypt.METHOD_*`` values, or a string as
    returned by ``crypt.mksalt()``.
    
    Note that these are non-standard extensions to Python 2.6's crypt.crypt()
    entrypoint, backported from 3.3: the standard Python 2.6 crypt.crypt()
    entrypoint requires two strings as the parameters, and does not support
    keyword arguments.
  (END)

Comment 2 Petr Bokoc 2015-12-14 13:56:40 UTC
See the RHEL7 clone for details.


Note You need to log in before you can comment on or make changes to this bug.