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: nis module not supporting group aliases
Type: enhancement Stage: resolved
Components: Library (Lib) Versions: Python 3.5
process
Status: closed Resolution: wont fix
Dependencies: Superseder:
Assigned To: loewis Nosy List: ernstp, iritkatriel, jcea, loewis, terry.reedy
Priority: normal Keywords:

Created on 2008-02-20 12:30 by ernstp, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (6)
msg62591 - (view) Author: Ernst Persson (ernstp) Date: 2008-02-20 12:30
Nis (applications?) has a line limit in the "group" entry, so you can't 
have very long lines (=many users)
The way to solve this is to put aliases in the group map, like this:
MY_GROUP::123:user1,user2
MY_GROUP::123:user3,user4

This is supported by the OS, grp.getgrall(), etc, but
nis.cat("group")
only puts the last entry into the dict it returns.

I guess the best thing if you want to return a dict is to merge the 
members if both the name and gid matches.
msg62598 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2008-02-20 20:19
Can you dig up some specification for that behaviour? The more official,
the better.

Otherwise, I'd rather add an option to return a list instead of a dict;
people wanting that semantics could then do their own processing.
msg62599 - (view) Author: Ernst Persson (ernstp) Date: 2008-02-20 20:28
Here's another description of the issue:
http://www.tldp.org/HOWTO/NIS-HOWTO/maps.html#AEN548
There's a suggestion to have different group-names but same gids, but 
automatic splitters of nis-groups doesn't allways do this.

Right, grp.getgrall() returns a list, that's why it works.
msg107424 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2010-06-09 21:57
Is this really a bug (discrepancy between nis.cat doc and behavior) or a feature request?
msg227769 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2014-09-28 17:15
I think this should be an enhancement request.
msg415079 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2022-03-13 19:02
nis is deprecated as per PEP 594, so there won't be further enhancements to it.
History
Date User Action Args
2022-04-11 14:56:31adminsetgithub: 46401
2022-03-13 19:02:26iritkatrielsetstatus: open -> closed

nosy: + iritkatriel
messages: + msg415079

resolution: wont fix
stage: resolved
2019-04-26 20:34:57BreamoreBoysetnosy: - BreamoreBoy
2014-09-28 17:15:39BreamoreBoysetversions: + Python 3.5, - Python 3.1, Python 2.7, Python 3.2
nosy: + BreamoreBoy, jcea

messages: + msg227769

components: + Library (Lib), - None
type: behavior -> enhancement
2010-06-09 21:57:03terry.reedysetnosy: + terry.reedy

messages: + msg107424
versions: + Python 3.1, Python 2.7, Python 3.2, - Python 2.5
2008-03-19 23:49:20jafosetpriority: normal
assignee: loewis
2008-02-20 20:28:01ernstpsetmessages: + msg62599
2008-02-20 20:19:08loewissetnosy: + loewis
messages: + msg62598
2008-02-20 12:30:31ernstpcreate