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 1508581 - modutil prompts for old password when -newpwfile <(echo) -force is passed to set blank password
Summary: modutil prompts for old password when -newpwfile <(echo) -force is passed to ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: nss
Version: 7.5
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Daiki Ueno
QA Contact: Alicja Kario
URL:
Whiteboard:
Depends On:
Blocks: 1539785 1730687
TreeView+ depends on / blocked
 
Reported: 2017-11-01 17:52 UTC by Niranjan Mallapadi Raghavender
Modified: 2019-07-17 11:08 UTC (History)
7 users (show)

Fixed In Version: nss-3.34.0-1.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1539785 (view as bug list)
Environment:
Last Closed: 2018-04-10 09:46:29 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Mozilla Foundation 1415847 0 -- RESOLVED modutil -changepw shouldn't prompt for old password if it's the empty string 2020-03-05 12:51:56 UTC
Red Hat Product Errata RHEA-2018:0679 0 None None None 2018-04-10 09:46:48 UTC

Description Niranjan Mallapadi Raghavender 2017-11-01 17:52:10 UTC
Description of problem:


I am seeing a difference in behaviour with regard to modutil in RHEL7.5.


RHEL7.5
===========
Red Hat Enterprise Linux release 7.5 Beta (Maipo)

Version: nss-tools-3.34.0-0.1.beta1.el7.x86_64


$ mkdir abc

$ cd abc
$ modutil -dbdir . -create -force
$ modutil -changepw "NSS Certificate DB" -newpwfile <(echo) -force -dbdir . >/dev/null
Enter old password:



RHEL7.4
========
Red Hat Enterprise Linux Server release 7.4 (Maipo)
version: nss-tools-3.28.4-8.el7.x86_64

[root@server-3294 abc]# modutil -changepw "NSS Certificate DB" -newpwfile <(echo) -force -dbdir . >/dev/null
[root@server-3294 abc]#



Version-Release number of selected component (if applicable):
nss-tools-3.34.0-0.1.beta1.el7.x86_64

Actual results:
 modutil -changepw "NSS Certificate DB" -newpwfile <(echo) -force -dbdir . >/dev/null 

The above command prompts for password



Expected results:

 modutil -changepw "NSS Certificate DB" -newpwfile <(echo) -force -dbdir . >/dev/null

The above command should not prompt for old password. 

Additional info:

Comment 3 Kai Engert (:kaie) (inactive account) 2017-11-09 11:00:01 UTC
Thanks for your report.

This is probably caused by a recent upstream change to make modutil behave more correctly.
  https://bugzilla.mozilla.org/show_bug.cgi?id=1395495

Previously, modutil created NSS databases in a half-initialized and unusable state, so it was changed to always create a usable database immediately, by setting an empty password by default.

IIUC, you are trying to set the password to the empty string. This is no longer necessary, because it is the new default.

Your command could be changed to work, by providing the old password parameter, e.g. by adding the following to your command line:
  -pwfile <(echo)

Comment 4 Kai Engert (:kaie) (inactive account) 2017-11-09 11:01:19 UTC
Do you think this change in behavior could cause problems for customers?

Can you please give an argument why you consider it a regression that must be fixed?

If necessary, we could potentially change modutil to check if the current password is the empty password, and avoid the prompt in that scenario.

Comment 5 Lukas Slebodnik 2017-11-09 11:03:46 UTC
(In reply to Kai Engert (:kaie) from comment #4)
> Do you think this change in behavior could cause problems for customers?
> 
> Can you please give an argument why you consider it a regression that must
> be fixed?
> 
> If necessary, we could potentially change modutil to check if the current
> password is the empty password, and avoid the prompt in that scenario.

Will that work with nss in el7.4 and also in el7.5?
Because it is annoying to use different steps in setup based on different versions of some package.

Comment 6 Kai Engert (:kaie) (inactive account) 2017-11-09 11:08:49 UTC
(In reply to Lukas Slebodnik from comment #5)
> Will that work with nss in el7.4 and also in el7.5?
> Because it is annoying to use different steps in setup based on different
> versions of some package.

You are assuming the fix is already agreed on and planned. You are one step to quick. I was asking you for justifications, prior to deciding that we try to implement that fix.

Comment 7 Kai Engert (:kaie) (inactive account) 2017-11-09 11:09:30 UTC
Reported upstream at
https://bugzilla.mozilla.org/show_bug.cgi?id=1415847

Comment 9 Kai Engert (:kaie) (inactive account) 2017-11-09 11:14:28 UTC
(In reply to Lukas Slebodnik from comment #5)
> Because it is annoying to use different steps in setup based on different
> versions of some package.

I believe you could add
  -pwfile <(echo)
everywhere, to both old and new versions, and it should work with both old and new versions.

The question is, should we consider this change in behavior disruptive for existing workflows? If yes, it would be an argument to get it fixed prior to shipping 7.5.0

Comment 17 errata-xmlrpc 2018-04-10 09:46:29 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2018:0679


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