This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: test_grp & test_pwd fail
Type: behavior Stage: resolved
Components: Tests Versions: Python 3.0, Python 2.6
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: doerwalter, georg.brandl, loewis, matrixise, rptownsend, splitscreen, yaccz
Priority: normal Keywords:

Created on 2006-04-06 10:57 by rptownsend, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
py_25_1.txt rptownsend, 2006-04-06 10:57 Test error messages
Messages (10)
msg28130 - (view) Author: Richard Townsend (rptownsend) Date: 2006-04-06 10:57
test_grp and test_pwd fail on PC running Red Hat 
Enterprise Edition V4.2 with Python-2.4.3 and Python-
2.5a1.

See attached file for test error messages.

msg28131 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2006-04-06 13:01
Logged In: YES 
user_id=849994

Can you post the relevant part of /etc/passwd and /etc/group?
msg28132 - (view) Author: Richard Townsend (rptownsend) Date: 2006-04-06 14:42
Logged In: YES 
user_id=200117

The test workstation is getting its password and group info 
from NIS.

The test workstation is running Red Hat Linux, but the NIS 
server is running HPUX 11i.

I believe these are the entries causing the errors:

lancaster:/etc > ypcat passwd | grep '-'
nobody:*:-2:-2::/:

lancaster:/etc > ypcat group | grep '-'
nogroup:*:-2:


msg28133 - (view) Author: Matt Fleming (splitscreen) Date: 2006-04-06 15:48
Logged In: YES 
user_id=1126061

AFAIK getgrgid() doesn't handle negative integers very well
(I can't even add a group with a negative gid on my NetBSD
machine).
msg28134 - (view) Author: Walter Dörwald (doerwalter) * (Python committer) Date: 2006-04-06 18:34
Logged In: YES 
user_id=89016

I'm prepared to throw out the fancy tests from test_pwd.py
and test_grp.py. They don't buy us much anyway and basically
test more the OS then the Python modules. (For related bugs
see #779218, #962226 and #775964.)
msg28135 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2006-04-07 10:13
Logged In: YES 
user_id=21627

We should drop the tests in a selective manner. In this
case, if -2 is in the password/group file, we should be able
to find it: somebody might want to search by a gid value
entered from a user, and that ought to work as well.

rptownsend: could you investigate in more detail what's
going on, on your system?
msg28136 - (view) Author: Richard Townsend (rptownsend) Date: 2006-04-07 14:58
Logged In: YES 
user_id=200117

When I run the following script on the workstation

import pwd, grp

entries = pwd.getpwall()
for e in entries:
    if e[2] < 0:
        print e
        
entries = grp.getgrall()
for e in entries:
    if e[2] < 0:
        print e
    
--------------------------

I get this output:

('nobody', '*', -2, -2, '', '/', '')
('nogroup', '*', -2, [])

msg114649 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2010-08-22 08:59
Can this be closed?
msg217161 - (view) Author: yaccz (yaccz) Date: 2014-04-25 14:56
Also fails on group + which is afaik a thing for ldap.

tested with python 2.6.9 on suse linux enterprise
msg342498 - (view) Author: Stéphane Wirtel (matrixise) * (Python committer) Date: 2019-05-14 18:33
Hi,

Thank you for your contribution,

I close this issue, 2.6 and 3.0 are deprecated and I can't reproduce the errors.
History
Date User Action Args
2022-04-11 14:56:16adminsetgithub: 43172
2019-05-14 18:33:34matrixisesetstatus: open -> closed

nosy: + matrixise
messages: + msg342498

resolution: out of date
stage: resolved
2014-04-25 14:56:14yacczsetnosy: + yaccz
messages: + msg217161
2014-02-03 19:46:58BreamoreBoysetnosy: - BreamoreBoy
2010-08-22 08:59:00BreamoreBoysetnosy: + BreamoreBoy
messages: + msg114649
2009-03-21 02:03:27ajaksu2settype: behavior
components: + Tests, - None
versions: + Python 2.6, Python 3.0
2006-04-06 10:57:57rptownsendcreate