- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: getgrgid returns nothing for some valid gid
Categories
Company
Local Language
Forums
Discussions
Knowledge Base
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Knowledge Base
Forums
Discussions
- Cloud Mentoring and Education
- Software - General
- HPE OneView
- HPE Ezmeral Software platform
- HPE OpsRamp
Knowledge Base
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2006 01:10 AM
12-04-2006 01:10 AM
getgrgid returns nothing for some valid gid
Trying to write a perl script and have run into some weirdness with getgrgid. The shortest script that reproduces the problem is the following:
# perl -e 'print scalar(getgrgid(149)), "\n"'
elp
# perl -e 'print scalar(getgrgid(150)), "\n"'
# perl -e 'print scalar(getgrgid(151)), "\n"'
mmw
And yes, gid 150 is a valid group. Is pwgrd the culprit here? There are about 3 or 4 other valid group id's that also return nothing, but that list is not always constant(!). We are running B.11.23 U ia64. One thing to note is that we have very large groups memberships lists. We have had to create multiple lines in /etc/group with the same name/gid to get all the users in the same groups. This was happening last week, and over the weekend the system was rebooted , but still displays the same problem (i.e. a restart of pwgrd does not seem to have fixed this).
Any help is appreciated.
Thanks,
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2006 01:33 AM
12-04-2006 01:33 AM
Re: getgrgid returns nothing for some valid gid
The fact that you have had to create multiple lines in '/etc/group' with the same name/gid to get all the users in the same groups may be the reason for this behavior.
That said, however, at of 11.0 there was no good reason to have to populate '/etc/group' in the fashion that you describe. If '/etc/logingroup' and '/etc/group' are links to the same file, the default access list includes the entire set of groups associated with the user.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2006 02:05 AM
12-04-2006 02:05 AM
Re: getgrgid returns nothing for some valid gid
Interestingly, I have an AIX (release 5.2)server with a vast number of users belonging to the same group. Like your case, the declaration of the group name is replicated. Using Perl (5.8.0) as you show, also fails for me in the case described.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2006 02:19 AM
12-04-2006 02:19 AM
Re: getgrgid returns nothing for some valid gid
I also suspect that:
# perl -le 'print scalar getgrnam("gidname")'
...where 'gidname' is the correct string for group-150 in your case, will *not* return the value '150'...
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2006 11:29 PM
12-04-2006 11:29 PM
Re: getgrgid returns nothing for some valid gid
You are correct in that
perl -le 'print scalar getgrnam("gidname")'
also fails for these groups. One thing I should clarify, although we have multiline groups, none of the groups that display this problem are like that, although they are between 1479 and 1527 in length.
Thanks!
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2006 02:02 AM
12-05-2006 02:02 AM
Re: getgrgid returns nothing for some valid gid
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2006 05:39 PM
12-05-2006 05:39 PM
Re: getgrgid returns nothing for some valid gid
Thanks,
John