Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1116786

Summary: system-config-users crashes if /etc/shadow does not exist
Product: Red Hat Enterprise Linux 6 Reporter: Siteshwar Vashisht <svashisht>
Component: system-config-usersAssignee: Than Ngo <than>
Status: CLOSED WONTFIX QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.5CC: cww, nphilipp, pkis
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-08-17 19:12:48 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1075802, 1172231, 1269194    
Attachments:
Description Flags
bz-1116786.patch none

Description Siteshwar Vashisht 2014-07-07 10:16:26 UTC
Description of problem:
system-config-users crashes if /etc/shadow does not exist.

Version-Release number of selected component (if applicable):
system-config-users-1.2.106-7.el6.noarch

How reproducible:
Always

Steps to Reproduce:
1. Start system-config-users.
2. Open a user's properties.
3. Change it's primary group.

Actual results:
system-config-users crashes with following exception :

userProperties.py:575:on_ok_button_clicked:IndexError: list index out of range

Traceback (most recent call last):
  File "/usr/share/system-config-users/userProperties.py", line 575, in on_ok_button_clicked
    if self.userEnt.get(libuser.SHADOWLASTCHANGE)[0] == 0:
IndexError: list index out of range

Expected results:
Primary group of a user should be changed.

Comment 1 Siteshwar Vashisht 2014-07-07 12:17:04 UTC
Created attachment 916054 [details]
bz-1116786.patch

Comment 3 Nils Philippsen 2015-04-29 09:25:28 UTC
Instead of the attached patch I'd use the one by Miroslav Trmač which is already upstream:

commit 4c148a2c5edfe7ef3b78ca03d89abd6355fd5da9
Author:     Miloslav Trmač <mitr>
AuthorDate: Thu Nov 8 11:50:07 2012 +0100
Commit:     Nils Philippsen <nils>
CommitDate: Tue Aug 13 10:56:20 2013 +0200

    Default missing SHADOWLASTCHANGE to -1, treat it as "unknown"