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

Re: Ldapadd or Ldapmodify without ldif file



Yes, I do it all the time.
Just ldapmodify -h myhost -p myport -w mypass -otheroptions

And then you're presented with a blank.
Simply do this:

dn: cn=sadique,ou=addressbook,dc=srtachyonldap,dc=com
changetype: whatever (add, in your case)
rest:
of:
it:

(note blank line)
and it will return just like you had fed it a file.
Check here for ldif help:
http://www.zytrax.com/books/ldap/

On 11/23/05, sadique@vanillanetworks.com <sadique@vanillanetworks.com> wrote:
> Hello
>
> Is it possible to execute the ldapadd or ldapmodify command without -f
> <filename> options where I should pass all contents of file in the
> command line.  I need this since i wish to process this through some
> bash scripts and i don't want scritps to create files in any other
> locations.
>
> If it's possible Can somebody say how I can add a new entry using the
> following ldif file.
>
> dn: cn=sadique,ou=addressbook,dc=srtachyonldap,dc=com
> cn: sadique
> displayName: Sadique Puthen Peedikayil
> givenName: Sadique
> mail: sadique@vanillanetworks.com
> mobile: 9895643639
> homePhone: 0466-2254274
> objectClass: inetOrgPerson
>
> Can I pass all these to ldapadd command without using an ldif file?
>
> Thanks
> Sadique
>