On Wednesday 23 November 2005 13:12, 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. Without -f it reads from stdin. I use it this way and just start typing ... > 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. > Abuse the shell redirection features: ldapadd ... << EOF > 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 EOF (unquote your own mail of course ...). -- Buchan Milne ISP Systems Specialist B.Eng,RHCE(803004789010797),LPIC-2(LPI000074592)
Attachment:
pgpPKSAe21bJr.pgp
Description: PGP signature