GithubHelp home page GithubHelp logo

rfc2307bis's Introduction

rfc2307bis

This repo contains LDAP schema of the official IETF draft for the Network Information Service (NIS) called rfc2307bis. It is trying to map entities related to TCP/IP and the UNIX system so that they may be resolved with LDAP. Comparing to the original NIS schema, rfc2307bis allows to create posixGroup with no members.

The schema was slightly modified in order to work with OpenLDAP:

  • The uidNumber and gidNumber was commented out as they are hardcoded in the OpenLDAP.
  • The authPassword attribute was removed from all attribute types as the RFC 3112 is not currently implemented.
  • The SUBSTRING keyword was renamed to SUBSTR.

Usage

Copy the rfc2307bis.schema file into the /etc/openldap/schema/ directory on your OpenLDAP server.

Load the schema in the slapd.conf:

include /etc/openldap/schema/rfc2307bis.schema

Let's create basic DB structure:

$ ldapadd -W -H ldap:/// -D 'cn=Manager,dc=example,dc=com' <<LDIF
# Create a new organization
dn: dc=example,dc=com
objectClass: dcObject
objectClass: organization
dc: example
o: My Organization
description: The Example organization

# Create role for the directory manager
dn: cn=Manager,dc=example,dc=com
objectClass: organizationalRole
cn: Manager
description: Directory Manager

# Create unit for groups
dn: ou=groups,dc=example,dc=com
objectClass: top
objectClass: organizationalUnit
ou: groups
description: Organizational unit for user groups

# Create unit for people
dn: ou=people,dc=example,dc=com
objectClass: top
objectClass: organizationalUnit
ou: people
description: Organizational unit for user accounts

# Create a test user in the people unit
dn: uid=test,ou=people,dc=example,dc=com
objectClass: top
objectClass: person
objectClass: posixAccount
uid: test
cn: Test User
sn: Test
uidNumber: 10001
gidNumber: 100
homeDirectory: /home/test
loginShell: /bin/bash
LDIF

Now we can create an empty group (group with no members):

$ ldapadd -W -H ldap:/// -D 'cn=Manager,dc=example,dc=com' <<LDIF
# Creating ops group in the groups unit
dn: cn=ops,ou=groups,dc=example,dc=com
objectClass: top
objectClass: posixGroup
objectClass: groupOfMembers
cn: ops
gidNumber: 10001
description: Operations Group
LDIF

Then we can add a new member attribute into the empty group:

$ ldapadd -W -H ldap:/// -D 'cn=Manager,dc=example,dc=com' <<LDIF
# Setting the test user as a member of the ops group
dn: cn=ops,ou=groups,dc=example,dc=com
changetype: modify
add: member
member: uid=test,ou=people,dc=example,dc=com
LDIF

Resources

Author

Jiri Tyr

License

MIT

rfc2307bis's People

Contributors

jtyr avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.