cancel
Showing results for 
Search instead for 
Did you mean: 
yfzblu
Level 7
Report Inappropriate Content
Message 1 of 2

mcafee.py - account lockouts

Jump to solution

Hey all,

When authenticating to ePO using the mcafee.py client, user accounts are locked out if an incorrect username/password combination is entered. After reviewing ePO's audit logs, I noticed that attempting to login one time via the API produces six failed login attempts to the server. Here is a snippet of Python which is causing my issue:

==============================================================

#!/usr/bin/python

epoHostname = <hard-coded hostname>

epoPort = <hard-coded port>

username = getpass.getuser()

password = getpass.getpass("Enter your account password: ")

try:

    mc = mcafee.client(epoHostname, epoPort, username, password)

except Exception, e:

    if "HTTP Error 401" in str(e):

        print "Invalid credentials"

        exit(1)

==============================================================

Can anyone explain to my why there are six failed login attempts when this runs? I was unable to find any similar issue by searching the forums. I am open to the idea that mcafee.py isn't the problem; any help you can provide would be excellent. Obviously, locking out after one failed attempt by the User renders my script unusable.

1 Solution

Accepted Solutions
yfzblu
Level 7
Report Inappropriate Content
Message 2 of 2

Re: mcafee.py - account lockouts

Jump to solution

Starting to look like a urllib2 problem:

http://bugs.python.org/issue8797

cpython: e0510a3bdf8f

Edit:

Confirmed - I grabbed a proper and updated version of urllib2, which mcafee.py imports, and this issue was resolved.

1 Reply
yfzblu
Level 7
Report Inappropriate Content
Message 2 of 2

Re: mcafee.py - account lockouts

Jump to solution

Starting to look like a urllib2 problem:

http://bugs.python.org/issue8797

cpython: e0510a3bdf8f

Edit:

Confirmed - I grabbed a proper and updated version of urllib2, which mcafee.py imports, and this issue was resolved.