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 1006260 - Account provider: creation of super long char user ends with error unauthorized instead of error too-long
Summary: Account provider: creation of super long char user ends with error unauthoriz...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: openlmi-providers
Version: 7.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Roman Rakus
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 922084
TreeView+ depends on / blocked
 
Reported: 2013-09-10 10:34 UTC by Petr Sklenar
Modified: 2014-01-13 00:15 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-09-10 14:04:01 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Petr Sklenar 2013-09-10 10:34:52 UTC
Description of problem:
Creation of super long char user ends with error unauthorized instead of error too-long.

Version-Release number of selected component (if applicable):
openlmi-account-0.1.1-2.el7.x86_64

How reproducible:
always

Steps to Reproduce:
def setUp(self):
        self.conn = lmishell.connect(HOST, USER, PASSWD)
        self.assertTrue(isinstance(self.conn, lmishell.LMIConnection), "Couldn't connect to remote provider")
        self.cs = self.conn.root.cimv2.Linux_ComputerSystem.first_instance()
        self.lams = self.conn.root.cimv2.LMI_AccountManagementService.first_instance()


def test(self)
        # create 32char user
        myuser = "32charabcdefghijklmnopqrstuvwxyz"
        user = self.lams.CreateAccount(Name=myuser, System=self.cs)
        self.assertEqual(user.rval, -1)
        self.assertTrue('name is too long' in user.errorstr)

# this is OK, it ends with the right error message ^^

        # try to create too long user
        myuser = "superman" * 9999999
        user = self.lams.CreateAccount(Name=myuser, System=self.cs)
        print user
        self.assertEqual(user.rval, -1)
        self.assertTrue('name is too long' in user.errorstr)

Actual results:
unauthorized

Expected results:
name is too long

Additional info:
/var/log/message

Sep 10 06:33:02 pes-guest-90 cimserver[25085]: pam_unix(wbem:auth): authentication failure; logname= uid=0 euid=0 tty=wbemLocal ruser= rhost=  user=root
Sep 10 06:33:02 pes-guest-90 cimserver[25085]: pam_succeed_if(wbem:auth): requirement "uid >= 1000" not met by user "root"
Sep 10 06:33:04 pes-guest-90 cimserver[25085]: pam_authenticate failed: Authentication failure
Sep 10 06:33:05 pes-guest-90 cimserver[25085]: PAM authentication failed for local user: root

Comment 2 Roman Rakus 2013-09-10 14:04:01 UTC
Looks like you have bad password. I can't reproduce it.


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