ubuntu server guide ldap suggested amendment

Alan Loughlin alan at apt-net.co.uk
Wed Apr 25 11:09:20 UTC 2012


 

Hi, 

In both the ldap and samba/ldap guides, there are points in
there that ask to edit the ldif files to remove the index entries, i've
written this command line that saves having to do this: 

sed -i
'1s/{[^}]*}//g;1s|$|,cn=schema,cn=config|;3s/{[^}]*}//g' *.ldif


Hopefully renders on in the mailing list, but basically does exactly
what the guide states, but can be applied on mass to all ldif files
used. 

The following bit removes the last 7 lines of the ldif files:


sed -i -e :a -e '$d;N;2,7ba' -e 'P;D' *.ldif 

the guide states the
content varies, but i've always seen it as 7 lines, so should be ok.


benefit of this method is that if you are bolting on an integration
with something like zarafa, you dont have to edit each file manually.


I don't mind outlining what each bit of the command does if you're not
sure. 

-- 
Kind regards,

Alan Loughlin
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-doc/attachments/20120425/30bb9a7a/attachment-0001.html>


More information about the ubuntu-doc mailing list