Hello there. 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: ""
Googling around I found that I need to add ( : ) after the attribute and that's wha I did, now Im getting the error in line 3 but adding the (: ) in the objectclass: did not help
ldapmodify: invalid format (line 3) entry: ""
Any help appreciated Thanks Regards
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
Thank you very much, I was able to load the schema
slapcat -n0
dn: cn={5}openssh-lpk,cn=schema,cn=config objectClass: olcSchemaConfig cn: {5}openssh-lpk olcAttributeTypes: {0}( 1.3.6.1.4.1.24552.500.1.1.1.13 NAME 'sshPublicKey' D ESC 'OpenSSH Public key' EQUALITY octetStringMatch SYNTAX 1.3.6.1.4.1.1466. 115.121.1.40 ) olcObjectClasses: {0}( 1.3.6.1.4.1.24552.500.1.1.2.0 NAME 'ldapPublicKey' SU P top AUXILIARY DESC 'OpenSSH LPK objectclass' MUST uid MAY sshPublicKey ) structuralObjectClass: olcSchemaConfig entryUUID: 5bb95eb0-d6c8-1037-8b06-cb9d662d8ad0 creatorsName: cn=Manager,cn=config createTimestamp: 20180417201921Z entryCSN: 20180417201921.476435Z#000000#000#000000 modifiersName: cn=Manager,cn=config modifyTimestamp: 20180417201921Z Regards
2018-04-17 15:48 GMT-03:00 Norman Gray gray@nxg.name:
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:
- that you'll have to convert the schema file to a corresponding .ldif
file; and
- 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
-- Norman Gray : https://nxg.me.uk
On 16.04.2018 19:58, Net Warrior wrote:
Hello there. 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: ""
You have to convert your schema file to the ldif format. i used
https://gist.github.com/jaseg/8577024
in the past for this task.
best regards Ulf
Am Mon, 16 Apr 2018 14:58:48 -0300 schrieb Net Warrior netwarrior863@gmail.com:
Hello there. 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: ""
Googling around I found that I need to add ( : ) after the attribute and that's wha I did, now Im getting the error in line 3 but adding the (: ) in the objectclass: did not help
ldapmodify: invalid format (line 3) entry: ""
- How did you load this schema? - do you maintain a slapd.conf file oder a slapd.d database?
-Dieter
openldap-technical@openldap.org