Bug 100524 - python bindings don't seem to reflect state of /etc/shadow
python bindings don't seem to reflect state of /etc/shadow
Product: Red Hat Linux Beta
Classification: Retired
Component: libuser (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Miloslav Trmač
Depends On: 91452
Blocks: CambridgeTarget
  Show dependency treegraph
Reported: 2003-07-23 01:23 EDT by Brent Fox
Modified: 2007-04-18 12:55 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-09-02 11:56:18 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Brent Fox 2003-07-23 01:23:26 EDT
When I look at /etc/shadow for user 'foo5', I see:


but when I run the following Python program: 

import libuser

admin = libuser.admin()
userEnt = admin.lookupUserByName('foo5')

print "min is", userEnt.get(libuser.SHADOWMIN)
print "warning is", userEnt.get(libuser.SHADOWWARNING)
print "inactive is", userEnt.get(libuser.SHADOWINACTIVE)
print "max is", userEnt.get(libuser.SHADOWMAX)

I see:
min is [0L]
warning is [7L]
inactive is [-1L]
max is [99999L]

Aside from the SHADOWMAX, the values don't seem to be in line with what's in
/etc/shadow.  Any idea why this is?
Comment 1 Miloslav Trmač 2004-09-02 11:56:18 EDT
libuser is making the values up if the fields are empty.
(glibc makes up "-1" in all of these cases).

AFAICS it makes no difference if you want to enforce the limits,
at least until year 2243. The only difference is in the warning

Changing this now would break current s-c-users behavior,
so let's keep it as it is, until the next development cycle
at minimum.

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