RFC 2307

An Approach for Using LDAP as a Network Information Service

πŸ“… published March 1998, from ietf

πŸ“œ An Approach for Using LDAP as a Network Information Service πŸŽ€

RFC 2307 πŸ’–

  • Author: L. Howard, Independent Consultant 🧚
  • Category: Experimental πŸ”¬
  • Date: March 1998 πŸ“…
  • Obsoletes / Updates: the header doesn't list either one 🌸

Status of This Memo 🌈

This memo defines an Experimental Protocol for the Internet community. It does not specify an Internet standard of any kind. Discussion and suggestions for improvement are requested. Distribution of this memo is unlimited.

Copyright (C) The Internet Society (1998). All Rights Reserved.

Abstract ✨

okay so this doc is about taking TCP/IP and UNIX stuff (users, groups, hosts, all of it πŸ‘€) and storing it as X.500 [X500] entries, so you can look them up with the Lightweight Directory Access Protocol [RFC2251]. it defines a bunch of attribute types and object classes, plus guidelines for how to read them 🫢

the goal is helping LDAP work as an organizational nameservice. none of this is meant to be an Internet standard yet! the hope is a general consensus shows up over time and that eventually leads to real standards πŸ¦‹ and fun fact: the mechanism has already been implemented, and it's been going pretty well πŸ”₯

1. Background and Motivation πŸ“

so the UNIX (R) operating system and its derivatives (the ones that support TCP/IP and follow the X/Open Single UNIX specification [XOPEN]) need a way to look things up, either by matching them against search criteria or by listing them all πŸ“‹ (other OSes that do TCP/IP can do some of this too, and this schema works for them as well πŸ’…)

the stuff in question includes users, groups, IP services (mapping names to IP ports and protocols and back again πŸ”Œ), IP protocols (names to IP protocol numbers and back), RPCs (names to ONC Remote Procedure Call [RFC1057] numbers and back), NIS netgroups, booting info (boot parameters and MAC address mappings πŸ₯Ύ), filesystem mounts, IP hosts and networks, and RFC822 mail aliases πŸ’Œ

here's how it goes down: lookups happen through a set of C functions in the UNIX C library. for example, the ls utility, which lists a directory's contents, calls getpwuid() to turn user IDs into login names πŸ—‚οΈ once the request is made, it gets resolved by a "nameservice" that the client library supports. the simplest version is just a bunch of files on the local filesystem that the C library opens and searches πŸ“ other common nameservices are the Network Information Service (NIS) and the Domain Name System (DNS). (DNS is usually what handles hosts, services and networks 🌐) both of these are distributed, which means a shared set of entities can be used by lots of clients at once 🀝

LDAP is a distributed, hierarchical directory service access protocol, and it's used to get at repositories of users and other network-related entities πŸ—„οΈ the catch is that LDAP usually isn't tightly integrated with the host OS, so stuff like users might have to live in both LDAP and a nameservice like NIS 😩 if you use LDAP as the primary way to resolve these entities, those redundancy problems get smaller and you get to use LDAP's scalability πŸ“ˆ (flat-file NIS services don't have the scalability or extensibility of LDAP or X.500, so that's a no-go πŸ™…β€β™€οΈ)

the object classes and attributes defined below are built to represent all those entities in a form that works with LDAP and X.500 directory services πŸ’–

2. General Issues 🫧

2.1. Terminology πŸ“–

The key words "MUST", "SHOULD", and "MAY" used in this document are to be interpreted as described in [RFC2119].

so for this doc, "nameservice" means a service (like NIS or flat files) that the OS uses to resolve entities inside one local naming context 🏠 contrast that with a "directory service" like LDAP, which supports extensible schema and multiple naming contexts 🌍

"NIS-related entities" is the broad name for entities that usually get resolved with the Network Information Service. (NIS used to be called YP πŸ•°οΈ) using LDAP for these doesn't mean NIS has to be involved, not even as a gateway or anything else πŸ™Œ the host and network classes are generic, so any system that wants to use LDAP or X.500 for host and network resolution can use them πŸ–₯️

the "DUA" (directory user agent) is the LDAP client doing the querying for these entities, like an LDAP to NIS gateway or the C library πŸ§‘β€πŸ’» the "client" is the app that actually uses whatever comes back from the resolution ✨ it doesn't matter whether the DUA and the client share the same address space. the DUA passing this info along to the client is called "republishing" πŸ“£

to avoid mix-ups: "login name" means the user's login name (the value of the uid attribute), and "user ID" means the user's integer identification number (the value of the uidNumber attribute) πŸ”’

"resolving an entity" and "resolution of entities" mean, respectively, listing NIS-related entities of a given type, and matching them against a given search criterion πŸ” a successful "resolution" returns one or more entities (a "match" operation will only return one entity 🎯)

using the word UNIX doesn't mean the UNIX trademark owners endorse this schema πŸ™ƒ when it's needed, "TCP/IP entity" refers to protocols, services, hosts, and networks, and "UNIX entity" refers to everything on the other side of that 🫢 (the TCP/IP category doesn't require the host OS to support the interfaces needed for resolving UNIX entities πŸ’…)

the OIDs defined below are derived from iso(1) org(3) dod(6) internet(1) directory(1) nisSchema(1) 🧾

2.2. Attributes 🏷️

the attributes and classes defined here are summed up below πŸ‘‡

the following attributes are defined in this document:

        uidNumber
        gidNumber
        gecos
        homeDirectory
        loginShell
        shadowLastChange
        shadowMin
        shadowMax
        shadowWarning
        shadowInactive
        shadowExpire
        shadowFlag
        memberUid
        memberNisNetgroup
        nisNetgroupTriple
        ipServicePort
        ipServiceProtocol
        ipProtocolNumber
        oncRpcNumber
        ipHostNumber
        ipNetworkNumber
        ipNetmaskNumber
        macAddress
        bootParameter
        bootFile
        nisMapName
        nisMapEntry

on top of those, some of the attributes defined in [RFC2256] are required too 🫑

2.3. Object classes 🧩

the following object classes are defined in this document:

        posixAccount
        shadowAccount
        posixGroup
        ipService
        ipProtocol
        oncRpc
        ipHost
        ipNetwork
        nisNetgroup
        nisMap
        nisObject
        ieee802Device
        bootableDevice

and some of the classes defined in [RFC2256] are required as well πŸ’œ

2.4. Syntax definitions 🧁

the following syntax definitions [RFC2252] are used by this schema πŸ“ the nisNetgroupTripleSyntax represents NIS netgroup triples:

        ( nisSchema.0.0 NAME 'nisNetgroupTripleSyntax'
          DESC 'NIS netgroup triple' )

values in this syntax look like this:

     nisnetgrouptriple = "(" hostname "," username "," domainname ")"
     hostname          = "" / "-" / keystring
     username          = "" / "-" / keystring
     domainname        = "" / "-" / keystring

X.500 servers may use the following representation of the above syntax:

     nisNetgroupTripleSyntax ::= SEQUENCE {
      hostname  [0] IA5String OPTIONAL,
      username  [1] IA5String OPTIONAL,
      domainname  [2] IA5String OPTIONAL
     }

the bootParameterSyntax syntax represents boot parameters πŸ₯Ύ:

        ( nisSchema.0.1 NAME 'bootParameterSyntax'
          DESC 'Boot parameter' )

where:

     bootparameter     = key "=" server ":" path
     key               = keystring
     server            = keystring
     path              = keystring

X.500 servers may use the following representation of the above syntax:

     bootParameterSyntax ::= SEQUENCE {
      key     IA5String,
      server  IA5String,
      path    IA5String
     }

values that follow these syntaxes get encoded as strings by LDAP servers πŸ’…

3. Attribute definitions ✨

okay so this section is where the DUAs (the directory user agents, aka the apps talking to the directory) get their attribute definitions πŸ’… anything supporting this schema has to implement these, no cap

( nisSchema.1.0 NAME 'uidNumber'
  DESC 'An integer uniquely identifying a user in an
        administrative domain'
  EQUALITY integerMatch SYNTAX 'INTEGER' SINGLE-VALUE )

( nisSchema.1.1 NAME 'gidNumber'
  DESC 'An integer uniquely identifying a group in an
        administrative domain'
  EQUALITY integerMatch SYNTAX 'INTEGER' SINGLE-VALUE )

( nisSchema.1.2 NAME 'gecos'
  DESC 'The GECOS field; the common name'
  EQUALITY caseIgnoreIA5Match
  SUBSTRINGS caseIgnoreIA5SubstringsMatch
  SYNTAX 'IA5String' SINGLE-VALUE )

( nisSchema.1.3 NAME 'homeDirectory'
  DESC 'The absolute path to the home directory'
  EQUALITY caseExactIA5Match
  SYNTAX 'IA5String' SINGLE-VALUE )

( nisSchema.1.4 NAME 'loginShell'
  DESC 'The path to the login shell'
  EQUALITY caseExactIA5Match
  SYNTAX 'IA5String' SINGLE-VALUE )

( nisSchema.1.5 NAME 'shadowLastChange'
  EQUALITY integerMatch
  SYNTAX 'INTEGER' SINGLE-VALUE )

( nisSchema.1.6 NAME 'shadowMin'
  EQUALITY integerMatch
  SYNTAX 'INTEGER' SINGLE-VALUE )

( nisSchema.1.7 NAME 'shadowMax'
  EQUALITY integerMatch
  SYNTAX 'INTEGER' SINGLE-VALUE )

( nisSchema.1.8 NAME 'shadowWarning'
  EQUALITY integerMatch
  SYNTAX 'INTEGER' SINGLE-VALUE )

( nisSchema.1.9 NAME 'shadowInactive'

  EQUALITY integerMatch
  SYNTAX 'INTEGER' SINGLE-VALUE )

( nisSchema.1.10 NAME 'shadowExpire'
  EQUALITY integerMatch
  SYNTAX 'INTEGER' SINGLE-VALUE )

( nisSchema.1.11 NAME 'shadowFlag'
  EQUALITY integerMatch
  SYNTAX 'INTEGER' SINGLE-VALUE )

( nisSchema.1.12 NAME 'memberUid'
  EQUALITY caseExactIA5Match
  SUBSTRINGS caseExactIA5SubstringsMatch
  SYNTAX 'IA5String' )

( nisSchema.1.13 NAME 'memberNisNetgroup'
  EQUALITY caseExactIA5Match
  SUBSTRINGS caseExactIA5SubstringsMatch
  SYNTAX 'IA5String' )

( nisSchema.1.14 NAME 'nisNetgroupTriple'
  DESC 'Netgroup triple'
  SYNTAX 'nisNetgroupTripleSyntax' )

( nisSchema.1.15 NAME 'ipServicePort'
  EQUALITY integerMatch
  SYNTAX 'INTEGER' SINGLE-VALUE )

( nisSchema.1.16 NAME 'ipServiceProtocol'
  SUP name )

( nisSchema.1.17 NAME 'ipProtocolNumber'
  EQUALITY integerMatch
  SYNTAX 'INTEGER' SINGLE-VALUE )

( nisSchema.1.18 NAME 'oncRpcNumber'
  EQUALITY integerMatch
  SYNTAX 'INTEGER' SINGLE-VALUE )

( nisSchema.1.19 NAME 'ipHostNumber'
  DESC 'IP address as a dotted decimal, eg. 192.168.1.1,
        omitting leading zeros'
  EQUALITY caseIgnoreIA5Match
  SYNTAX 'IA5String{128}' )

( nisSchema.1.20 NAME 'ipNetworkNumber'
  DESC 'IP network as a dotted decimal, eg. 192.168,

        omitting leading zeros'
  EQUALITY caseIgnoreIA5Match
  SYNTAX 'IA5String{128}' SINGLE-VALUE )

( nisSchema.1.21 NAME 'ipNetmaskNumber'
  DESC 'IP netmask as a dotted decimal, eg. 255.255.255.0,
        omitting leading zeros'
  EQUALITY caseIgnoreIA5Match
  SYNTAX 'IA5String{128}' SINGLE-VALUE )

( nisSchema.1.22 NAME 'macAddress'
  DESC 'MAC address in maximal, colon separated hex
        notation, eg. 00:00:92:90:ee:e2'
  EQUALITY caseIgnoreIA5Match
  SYNTAX 'IA5String{128}' )

( nisSchema.1.23 NAME 'bootParameter'
  DESC 'rpc.bootparamd parameter'
  SYNTAX 'bootParameterSyntax' )

( nisSchema.1.24 NAME 'bootFile'
  DESC 'Boot image name'
  EQUALITY caseExactIA5Match
  SYNTAX 'IA5String' )

( nisSchema.1.26 NAME 'nisMapName'
  SUP name )

( nisSchema.1.27 NAME 'nisMapEntry'
  EQUALITY caseExactIA5Match
  SUBSTRINGS caseExactIA5SubstringsMatch
  SYNTAX 'IA5String{1024}' SINGLE-VALUE )

4. Class definitions πŸŽ€

this part is the object class definitions that DUAs supporting the schema need to implement 🫢

the rfc822MailGroup object class MAY be used to represent a mail group for the purpose of alias expansion. Several alternative schemes for mail routing and delivery using LDAP directories, which are outside the scope of this document.

( nisSchema.2.0 NAME 'posixAccount' SUP top AUXILIARY
  DESC 'Abstraction of an account with POSIX attributes'
  MUST ( cn $ uid $ uidNumber $ gidNumber $ homeDirectory )
  MAY ( userPassword $ loginShell $ gecos $ description ) )

( nisSchema.2.1 NAME 'shadowAccount' SUP top AUXILIARY
  DESC 'Additional attributes for shadow passwords'
  MUST uid
  MAY ( userPassword $ shadowLastChange $ shadowMin
        shadowMax $ shadowWarning $ shadowInactive $
        shadowExpire $ shadowFlag $ description ) )

( nisSchema.2.2 NAME 'posixGroup' SUP top STRUCTURAL
  DESC 'Abstraction of a group of accounts'
  MUST ( cn $ gidNumber )
  MAY ( userPassword $ memberUid $ description ) )

( nisSchema.2.3 NAME 'ipService' SUP top STRUCTURAL
  DESC 'Abstraction an Internet Protocol service.
        Maps an IP port and protocol (such as tcp or udp)
        to one or more names; the distinguished value of
        the cn attribute denotes the service's canonical
        name'
  MUST ( cn $ ipServicePort $ ipServiceProtocol )
  MAY ( description ) )

( nisSchema.2.4 NAME 'ipProtocol' SUP top STRUCTURAL
  DESC 'Abstraction of an IP protocol. Maps a protocol number
        to one or more names. The distinguished value of the cn
        attribute denotes the protocol's canonical name'
  MUST ( cn $ ipProtocolNumber $ description )
  MAY description )

( nisSchema.2.5 NAME 'oncRpc' SUP top STRUCTURAL
  DESC 'Abstraction of an Open Network Computing (ONC)
       [RFC1057] Remote Procedure Call (RPC) binding.
       This class maps an ONC RPC number to a name.
       The distinguished value of the cn attribute denotes
       the RPC service's canonical name'
  MUST ( cn $ oncRpcNumber $ description )
  MAY description )

( nisSchema.2.6 NAME 'ipHost' SUP top AUXILIARY

  DESC 'Abstraction of a host, an IP device. The distinguished
        value of the cn attribute denotes the host's canonical
        name. Device SHOULD be used as a structural class'
  MUST ( cn $ ipHostNumber )
  MAY ( l $ description $ manager ) )

( nisSchema.2.7 NAME 'ipNetwork' SUP top STRUCTURAL
  DESC 'Abstraction of a network. The distinguished value of
        the cn attribute denotes the network's canonical name'

  MUST ( cn $ ipNetworkNumber )
  MAY ( ipNetmaskNumber $ l $ description $ manager ) )

( nisSchema.2.8 NAME 'nisNetgroup' SUP top STRUCTURAL
  DESC 'Abstraction of a netgroup. May refer to other netgroups'
  MUST cn
  MAY ( nisNetgroupTriple $ memberNisNetgroup $ description ) )

( nisSchema.2.09 NAME 'nisMap' SUP top STRUCTURAL
  DESC 'A generic abstraction of a NIS map'
  MUST nisMapName
  MAY description )

( nisSchema.2.10 NAME 'nisObject' SUP top STRUCTURAL
  DESC 'An entry in a NIS map'
  MUST ( cn $ nisMapEntry $ nisMapName )
  MAY description )

( nisSchema.2.11 NAME 'ieee802Device' SUP top AUXILIARY
  DESC 'A device with a MAC address; device SHOULD be
        used as a structural class'
  MAY macAddress )

( nisSchema.2.12 NAME 'bootableDevice' SUP top AUXILIARY
  DESC 'A device with boot parameters; device SHOULD be
        used as a structural class'
  MAY ( bootFile $ bootParameter ) )

5. Implementation details πŸ”₯

5.1. Suggested resolution methods πŸ’–

the preferred way to point a client app (one using the shared services of the C library) at LDAP as its info source, for the functions listed in 5.2, is to edit the source code so it queries LDAP directly. source for commercial C libraries and apps is rarely available to end-users, so one option is to emulate a supported nameservice (like NIS) instead 🧚 (this is also a good moment to cache entries across process address spaces, just saying πŸ‘€). with NIS, reference implementations are widely available and the RPC interface is well known, so it's pretty chill 🌸

how the OS gets directed to use LDAP is implementation dependent. for example, some operating systems and C libraries support end-user extensible resolvers using dynamically loadable libraries and a nameservice "switch". the way the DUA finds LDAP servers is also implementation dependent, so every setup can look a little different ✨

5.2. Affected library functions πŸ¦‹

these functions are typically found in the C libraries of most UNIX and POSIX compliant systems. each function name comes with an LDAP search filter [RFC2254] that can be used to satisfy the call. parameters are shown as %s and %d for string and integer arguments, respectively. long lines are broken, bestie πŸ™ˆ

getpwnam()              (&(objectClass=posixAccount)(uid=%s))
getpwuid()              (&(objectClass=posixAccount)
                        (uidNumber=%d))
getpwent()              (objectClass=posixAccount)

getspnam()              (&(objectClass=shadowAccount)(uid=%s))
getspent()              (objectClass=shadowAccount)

getgrnam()              (&(objectClass=posixGroup)(cn=%s))
getgrgid()              (&(objectClass=posixGroup)
                        (gidNumber=%d))
getgrent()              (objectClass=posixGroup)

getservbyname()         (&(objectClass=ipService)
                        (cn=%s)(ipServiceProtocol=%s))
getservbyport()         (&(objectClass=ipService)
                        (ipServicePort=%d)
                        (ipServiceProtocol=%s))
getservent()            (objectClass=ipService)

getrpcbyname()          (&(objectClass=oncRpc)(cn=%s))
getrpcbynumber()        (&(objectClass=oncRpc)(oncRpcNumber=%d))
getrpcent()             (objectClass=oncRpc)

getprotobyname()        (&(objectClass=ipProtocol)(cn=%s))
getprotobynumber()      (&(objectClass=ipProtocol)
                        (ipProtocolNumber=%d))
getprotoent()           (objectClass=ipProtocol)

gethostbyname()         (&(objectClass=ipHost)(cn=%s))
gethostbyaddr()         (&(objectClass=ipHost)(ipHostNumber=%s))
gethostent()            (objectClass=ipHost)

getnetbyname()          (&(objectClass=ipNetwork)(cn=%s))
getnetbyaddr()          (&(objectClass=ipNetwork)
                        (ipNetworkNumber=%s))
getnetent()             (objectClass=ipNetwork)

setnetgrent()           (&(objectClass=nisNetgroup)(cn=%s))

5.3. Interpreting user and group entries ✨

okay so user and group lookups get kicked off by the functions prefixed with getpw and getgr, respectively 🧚 the uid attribute holds the user's login name, and in posixGroup entries the cn attribute holds the group's name πŸ’–

the account object class is a super convenient structural class for posixAccount, and it SHOULD be used when no additional attributes are needed πŸ’…

it's suggested that uid and cn get used as the RDN attribute type for posixAccount and posixGroup entries, respectively πŸŽ€

an account's GECOS field is preferably taken from the gecos attribute. if there's no gecos attribute, the value of the cn attribute MUST be used 🫢 (the gecos attribute is such a vibe because it lets stuff like a user's telephone number ride along in the GECOS field and get returned to the client without overloading cn. it also helps when the common name doesn't contain the person's full name πŸ’€)

an entry of class posixAccount, posixGroup, or shadowAccount without a userPassword attribute MUST NOT be used for authentication πŸ™ˆ the client should be handed a non-matchable password like "x" instead.

userPassword values MUST be represented by following this syntax:

passwordvalue          = schemeprefix encryptedpassword
schemeprefix           = "{" scheme "}"
scheme                 = "crypt" / "md5" / "sha" / altscheme
altscheme              = "x-" keystring
encryptedpassword      = encrypted password

the encrypted password is basically a plaintext key hashed using the algorithm scheme πŸ”

userPassword values that don't follow this syntax MUST NOT be used for authentication. the DUA MUST keep iterating through the values of the attribute until it finds one that matches the syntax above. only if encryptedpassword is an empty string does the user have no password. DUAs are not required to consider encryption schemes the client won't recognize, and in most cases it may be sufficient to consider only "crypt" πŸ’œ

here's an example of a userPassword attribute:

userPassword: {crypt}X5/DBrWPOQQaI

a future standard may specify LDAP v3 attribute descriptions to represent hashed userPasswords, as noted below. This schema MUST NOT be used with LDAP v2 DUAs and DSAs 🚫

attributetype           = attributename sep attributeoption
attributename           = "userPassword"
sep                     = ";"
attributeoption         = schemeclass "-" scheme
schemeclass             = "hash" / altschemeclass
scheme                  = "crypt" / "md5" / "sha" / altscheme
altschemeclass          = "x-" keystring
altscheme               = keystring

and here's that same userPassword attribute, represented with an LDAP v3 attribute description:

userPassword;hash-crypt: X5/DBrWPOQQaI

A DUA MAY use the attributes in the shadowAccount class to provide shadow password service (getspnam() and getspent()). In that case, the DUA MUST NOT make use of the userPassword attribute for getpwnam() et al, and MUST return a non-matchable password (such as "x") to the client instead πŸ¦‹


5.4. Interpreting hosts and networks 🌸

the ipHostNumber and ipNetworkNumber attributes are preferred over dNSRecord ([RFC1279]) so the DUA's job of reading entries stays simple. a dNSRecord spells out a complete resource record, including time to live and class data, which is extra baggage for this schema πŸ™„

the ipHost and ipNetwork classes also let a host or network and all of its aliases live together in a single directory entry. that's not always possible when a DNS resource record gets mapped straight onto an LDAP entry. implementations that want LDAP to master DNS zone information aren't blocked from doing that, they can just skip the ipHost and ipNetwork classes ✨

this document redefines, though not exclusively, the ipNetwork class from [RFC1279], so the naming stays consistent with ipHost. the ipNetworkNumber attribute is also used in the siteContact object class [ROSE] 🌈

The trailing zeros in a network address MUST be omitted. CIDR-style network addresses (eg. 192.168.1/24) MAY be used πŸ“

Hosts with IPv6 addresses MUST be written in their "preferred" form as defined in section 2.2.1 of [RFC1884], with all components of the address indicated and leading zeros omitted. this gives you one consistent way to resolve ipHosts by address πŸ‘‘


5.5. Interpreting other entities 🧩

generally, the plan is one-to-one: each entity gets exactly one representation in the DIT, a single LDAP entry. sometimes that isn't doable, like a service that shows up in more than one protocol domain. check out this entry:

dn: cn=domain, dc=aja, dc=com
cn: domain
cn: nameserver
objectClass: top
objectClass: ipService
ipServicePort: 53
ipServiceProtocol: tcp
ipServiceProtocol: udp

This entry MUST map to the following two (2) services entities:

domain  53/tcp  nameserver
domain  53/udp  nameserver

those two entities could be stored as separate LDAP entities with different distinguished names (like cn=domain+ipServiceProtocol=tcp, ... and cn=domain+ipServiceProtocol=udp, ...), but it's way more convenient to keep them as one entry πŸ’… (if a service shows up in multiple protocol domains with different ports, you do need multiple entries, and multivalued RDNs can tell them apart 🫢)

except for userPassword values (which get parsed according to the syntax in section 5.2), the DUA returns any empty values, meaning zero-length strings, to the client. The DUA MUST reject any entries that don't conform to the schema (missing mandatory attributes). Non-conforming entries SHOULD be ignored while enumerating entries πŸ™…β€β™€οΈ

The nisObject object class MAY be used as a generic way to represent NIS entities. its use isn't encouraged. where you want support for entities this schema doesn't describe, an appropriate schema should be devised. Implementors are strongly advised to support end-user extensible mappings between NIS entities and object classes πŸŽ€ (where the nisObject class is used, the nisMapName attribute may be used as a RDN.)


5.6. Canonicalizing entries with multi-valued naming attributes πŸ’–

for entities like hosts, services, networks, protocols, and RPCs, where there may be one or more aliases, the entry's relative distinguished name SHOULD be used to determine the canonical name. Any other values of the same attribute are used as aliases. For example, the service from section 5.5 has the canonical name "domain" and exactly one alias, "nameserver" 🧁

the schema in this document generally defines only one attribute per class that's good for distinguishing an entity (leaving out attributes with integer syntax, since entries are assumed to be distinguished by name). Usually that's the common name (cn) attribute. this helps the DUA figure out the canonical name, because it can look at the value of the RDN. aliases are then any values of the distinguishing attribute (like cn) that don't match the entity's canonical name πŸ”

in the event that a different attribute is used to distinguish the entry, which may happen when these object classes are used as auxiliary classes, the entry's canonical name may not be in the RDN. in that case the DUA MUST choose one of the non-distinguished values to represent the entity's canonical name. since the directory server guarantees no ordering of attribute values, it may not be possible to tell an entry apart deterministically. This ambiguity SHOULD NOT be resolved by mapping one directory entry into multiple entities 😭


6. Implementation focus πŸ› οΈ

A NIS server that uses LDAP instead of local files has been developed, and it supports the schema defined in this document 🌸

a reference implementation of the C library resolution code has been written for the Free Software Foundation. It may support other C libraries that support the Name Service Switch (NSS) or the Information Retrieval Service (IRS) πŸ’œ

the author has made available a freely distributable set of scripts that parse local databases such as /etc/passwd and /etc/hosts into a form suitable for loading into an LDAP server 🧚


7. Security Considerations πŸ”

The entirety of related security considerations is outside the scope of this document. Making passwords encrypted with a widely understood hash function (such as crypt()) available to non-privileged users is dangerous, because it exposes them to dictionary and brute-force attacks πŸ’€ This is proposed only for compatibility with existing UNIX system implementations. Sites where security is critical SHOULD consider using a strong authentication service for user authentication 🫢

alternatively, the encrypted password could be made available only to a subset of privileged DUAs, which would provide "shadow" password service to client applications. This may be difficult to enforce πŸ™ˆ

because the schema represents operating system-level entities, access to these entities SHOULD be granted on a discretionary basis. (There's little point in restricting access to data that's going to be republished without restriction, though πŸ€·β€β™€οΈ) It is particularly important that only administrators can modify entries defined in this schema, with the exception of letting a principal change their own password (which may be done on behalf of the user by a client bound as a superior principal, so password restrictions may be enforced). For example, if a user were allowed to change the value of their uidNumber attribute, they could subvert security by equivalencing their account with the superuser account 😱

bestie, this is the big one: nobody but admins should be able to edit these entries, apart from changing their own password. a user who could tweak their own uidNumber could make their account the superuser account. not it 🚫

a subtree of the DIT that is to be republished by a DUA (such as a NIS gateway) SHOULD be within the same administrative domain that the republishing DUA represents. (For example, principals outside an organization, while conceivably part of the DIT, should not be considered with the same degree of authority as those within the organization 🏰)

finally, care should be exercised with integer attributes of a sensitive nature (particularly the uidNumber and gidNumber attributes) that contain zero-length values. DUAs MAY treat such values as corresponding to the "nobody" or "nogroup" user and group, respectively πŸŒ™


8. Acknowledgements πŸ’Œ

Thanks to Leif Hedstrom of Netscape Communications Corporation, Michael Grant and Rosanna Lee of Sun Microsystems Inc., Ed Reed of Novell Inc., and Mark Wahl of Critical Angle Inc. for their valuable contributions to the development of this schema 🫢 Thanks to Andrew Josey of The Open Group for clarifying the use of the UNIX trademark, and to Tim Howes and Peter J. Cherny for their support 🌈

UNIX is a registered trademark of The Open Group.

9. References πŸ“šβœ¨

okay bestie, this is the reading list 🧚 every doc it cites is basically the group chat's receipts, so here they all are:

  • [RFC1057] Sun Microsystems, Inc., "RPC: Remote Procedure Call: Protocol Specification Version 2", RFC 1057, June 1988.
  • [RFC1279] Kille, S., "X.500 and Domains", RFC 1279, November 1991.
  • [RFC1884] Hinden, R., and S. Deering, "IP Version 6 Addressing Architecture", RFC 1884, December 1995.
  • [RFC2119] Bradner, S., "Key Words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997.
  • [RFC2251] Wahl, M., Howes, T., and S. Kille, "Lightweight Directory Access Protocol (v3)", RFC 2251, December 1997.
  • [RFC2252] Wahl, M., Coulbeck, A., Howes, T., and S. Kille, "Lightweight Directory Access Protocol (v3): Attribute Syntax Definitions", RFC 2252, December 1997.
  • [RFC2254] Howes, T., "The String Representation of LDAP Search Filters", RFC 2254, December 1997.
  • [RFC2256] Wahl, M., "A Summary of the X.500(96) User Schema for use with LDAPv3", RFC 2256, December 1997.
  • [ROSE] M. T. Rose, "The Little Black Book: Mail Bonding with OSI Directory Services", ISBN 0-13-683210-5, Prentice-Hall, Inc., 1992.
  • [X500] "Information Processing Systems - Open Systems Interconnection - The Directory: Overview of Concepts, Models and Service", ISO/IEC JTC 1/SC21, International Standard 9594-1, 1988.
  • [XOPEN] ISO/IEC 9945-1:1990, Information Technology - Portable Operating Systems Interface (POSIX) - Part 1: Systems Application Programming Interface (API) [C Language]

10. Author's Address πŸŽ€

this is who wrote it, so you know who to thank (or message πŸ’Œ)

Luke Howard PO Box 59 Central Park Vic 3145 Australia

EMail: lukeh@xedoc.com


A. Example entries 🧚

these examples are here to show you the schema in action πŸ’– they're not the full collection, just the highlights, so don't treat them like the whole season

The following entry is an example of the posixAccount class:

dn: uid=lester, dc=aja, dc=com
objectClass: top
objectClass: account
objectClass: posixAccount
uid: lester
cn: Lester the Nightfly
userPassword: {crypt}X5/DBrWPOQQaI
gecos: Lester
loginShell: /bin/csh
uidNumber: 10
gidNumber: 10
homeDirectory: /home/lester

and this one matches the UNIX system password file entry:

lester:X5/DBrWPOQQaI:10:10:Lester:/home/lester:/bin/sh

The following entry is an example of the ipHost class:

dn: cn=peg.aja.com, dc=aja, dc=com
objectClass: top
objectClass: device
objectClass: ipHost
objectClass: bootableDevice
objectClass: ieee802Device
cn: peg.aja.com
cn: www.aja.com
ipHostNumber: 10.0.0.1
macAddress: 00:00:92:90:ee:e2
bootFile: mach
bootParameter: root=fs:/nfsroot/peg
bootParameter: swap=fs:/nfsswap/peg
bootParameter: dump=fs:/nfsdump/peg

this entry represents the host canonically peg.aja.com, also known as www.aja.com πŸ“ the Ethernet address and four boot parameters are also specified, so it's giving full profile ✨

An example of the nisNetgroup class:

dn: cn=nightfly, dc=aja, dc=com
objectClass: top
objectClass: nisNetgroup
cn: nightfly
nisNetgroupTriple: (charlemagne,peg,dunes.aja.com)
nisNetgroupTriple: (lester,-,)
memberNisNetgroup: kamakiriad

this entry represents the netgroup nightfly, which contains two triples (the user charlemagne, the host peg, and the domain dunes.aja.com; and, the user lester, no host, and any domain) and one netgroup (kamakiriad) 🫢

Finally, an example of the nisObject class:

dn: nisMapName=tracks, dc=dunes, dc=aja, dc=com
objectClass: top
objectClass: nisMap
nisMapName: tracks

dn: cn=Maxine, nisMapName=tracks, dc=dunes, dc=aja, dc=com
objectClass: top
objectClass: nisObject
cn: Maxine
nisMapName: tracks
nisMapEntry: Nightfly$4

this entry represents the NIS map tracks, and a single map entry πŸ¦‹


okay, the legal bit, but it's still iconic πŸ’… I'm keeping every word of it because the rules are the rules

Copyright (C) The Internet Society (1998). All Rights Reserved.

This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to the Internet Society or other Internet organizations, except as needed for the purpose of developing Internet standards in which case the procedures for copyrights defined in the Internet Standards process must be followed, or as required to translate it into languages other than English.

The limited permissions granted above are perpetual and will not be revoked by the Internet Society or its successors or assigns.

This document and the information contained herein is provided on an "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 🌈

πŸ“¦ where this page comes from