- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Maximum length of a NIS string (key and values)
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
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
тАО09-09-2004 10:45 PM
тАО09-09-2004 10:45 PM
Maximum length of a NIS string (key and values)
I need to find out the maximum length of the key and value strings used by NIS.
If this is a configurable parameter, I need to know where this is configured on a system.
Regards,
Naveej
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-09-2004 11:08 PM
тАО09-09-2004 11:08 PM
Re: Maximum length of a NIS string (key and values)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-10-2004 01:05 AM
тАО09-10-2004 01:05 AM
Re: Maximum length of a NIS string (key and values)
HeL
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-10-2004 01:14 AM
тАО09-10-2004 01:14 AM
Re: Maximum length of a NIS string (key and values)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-10-2004 02:40 AM
тАО09-10-2004 02:40 AM
Re: Maximum length of a NIS string (key and values)
As others have said, there is a 1024-byte limitation. The reason I'm posting is not for a "me too", but to provide some additional information.
If you look at the dbm(3C) man page you'll find this:
_________________________________
The sum of the sizes of a key/content pair must not exceed the internal block size (currently 1024 bytes). Moreover, all key/content pairs that hash together must fit on a single block. store returns an error if a disk block fills with inseparable data.
_________________________________
What this means to you is:
1. The combination of the key/content pair needs to fit into a 1024 byte block
2. If two or more values hash to the same block then *all* of the key/content pairs that hash to that block must be able to be stored in a single 1024 byte block
3. This is not configurable
4. The dbm stuff can only create 2GB database files, which limits the number of hash values and 1024 byte blocks
Item #2 above is significant because I've seen (and reproduced) cases where I can get an NIS map build failure to occur with an /etc/group file that only contains 2 entries! In this case the /etc/group file had 2 entries that were rather large and both hashed to the same block and the combination of both entries key/content pairs could not be stored in the same block, which resulted in the NIS map build failure.
What this also means is that if you're seeing problems where multiple dbm keys are hashing to the same block, you can try making a small modification to the key in question (i.e. change the group name in /etc/group by one character, or change the user name in /etc/passwd by one character) to get it to hash to a different block and store successfully.
Hope this helps,
Dave
I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-10-2004 09:54 AM
тАО09-10-2004 09:54 AM
Re: Maximum length of a NIS string (key and values)
Thanks for your answers.
We have a customer who is having some issues with E-mail addresss. We are using aliases maps in NIS.
I searched further and got to know that the NIS alias map follow the RFC 2821 / 2822 for which the user name is 64 and the max domain part is 255.
so I suspect the correct answer is 64 + 255 + 1 (@) = 320
Thanks once again for your replies