[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Error Loading Schema


On 16 Apr 2018, at 18:58, Net Warrior wrote:

Im trying to load this schema

And I get this error.
ldapmodify: invalid format (line 1) entry: ""

ldapmodify will upload files in LDIF format (which you might be able to see documented using 'man ldif'), but the file at <http://pig.made-it.com/ldap-openssh/openssh-ldap.schema> is a schema file, which has a slightly different syntax.

That means:

1. that you'll have to convert the schema file to a corresponding .ldif file; and

2. that it has to be installed in the openldap directory on your LDAP server (you'll see other .schema and .ldif files in there), and included into your slapd configuration file (something like .../openldap/slapd.ldif) with a line like

include: file://blah/blah/blah/openldap/schema/openssh-ldap.ldif

Here is a variant of that file that I've used, in .ldif format:

# LDAP Public Key Patch schema for use with openssh-ldappubkey
# Author: Eric AUGE <eau@phear.org>
# Based on the proposal of : Mark Ruijter
# See https://github.com/jirutka/ssh-getkey-ldap
# Converted by hand from openssh-lpk.schema to .ldif format,
# following the advice in openldap.ldif.
dn: cn=openssh-lpk,cn=schema,cn=config
objectClass: olcSchemaConfig
cn: openssh-lpk
# octetString SYNTAX
olcAttributeTypes: ( NAME 'sshPublicKey'
  DESC 'OpenSSH Public key'
  EQUALITY octetStringMatch
# printableString SYNTAX yes|no
olcObjectClasses: ( NAME 'ldapPublicKey' SUP top AUXILIARY
  DESC 'OpenSSH LPK objectclass'
  MUST uid
  MAY sshPublicKey )

Best wishes,


Norman Gray  :  https://nxg.me.uk