Greetings.
On 16 Apr 2018, at 18:58, Net Warrior wrote:
Im trying to load this schema http://pig.made-it.com/ldap-openssh.html
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: ( 1.3.6.1.4.1.24552.500.1.1.1.13 NAME 'sshPublicKey' DESC 'OpenSSH Public key' EQUALITY octetStringMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.40 ) # # printableString SYNTAX yes|no olcObjectClasses: ( 1.3.6.1.4.1.24552.500.1.1.2.0 NAME 'ldapPublicKey' SUP top AUXILIARY DESC 'OpenSSH LPK objectclass' MUST uid MAY sshPublicKey )
Best wishes,
Norman