From 16e74f9918145f671b6d4c98087a3ea83416b376 Mon Sep 17 00:00:00 2001 From: Xavier Bachelot Date: Thu, 19 Oct 2023 17:42:52 +0200 Subject: [PATCH] Convert files to Unix EOL --- sample/hsqldb/sample.csv | 18 ++--- sample/multi/README.txt | 104 +++++++++++++-------------- sample/multi/create.sql | 70 +++++++++--------- sample/nis/README.txt | 136 +++++++++++++++++------------------ sample/postgresql/README.txt | 120 +++++++++++++++---------------- sample/postgresql/create.sql | 84 +++++++++++----------- sample/postgresql/insert.sql | 2 +- 7 files changed, 267 insertions(+), 267 deletions(-) diff --git a/sample/hsqldb/sample.csv b/sample/hsqldb/sample.csv index 7bdc19ce..579e69ed 100644 --- a/sample/hsqldb/sample.csv +++ b/sample/hsqldb/sample.csv @@ -1,9 +1,9 @@ -id;uid;endOfValidity;sn;cn;givenName;mail;o;address;telephoneNumber;carLicense -1;j.clarke;31/12/2015;Clarke;Clarke, Jonathan;Jonathan;jonathan@philipoux.net;Normation;;+33 (0)1 83 62 26 96;BHU772|DED899 -2;r.schermesser;31/12/2015;Schermesser;Schermesser, Remy-Christophe;Remy-Christophe;remy@schermesser.com;Octo;;; -3;t.chemineau;31/12/2015;Chemineau;Chemineau, Thomas;Thomas;thomas@aepik.net;AFNOR;;; -4;s.bahloul;31/12/2015;Bahloul;Bahloul, Sebastien;Sebastien;sebastien.bahloul@gmail.com;Dictao;156 av. de Malakof, 75116 PARIS, France;; -5;c.oudot;31/12/2015;Oudot;Oudot, Clement;Clement;clem.oudot@gmail.com;Linagora;;33(0)810251251; -6;r.ouazana;31/12/2015;Ouazana;Ouazana, Raphael;Raphael;rouazana@linagora.com;Linagora;;33(0)810251251; -7;d.coutadeur;31/12/2015;Coutadeur;Coutadeur, David;David;dcoutadeur@linagora.com;Linagora;;33(0)810251251; -8;e.pereira;31/12/2015;Pereira;Pereira, Esteban;Esteban;epereira@linagora.com;Linagora;;33(0)810251251; +id;uid;endOfValidity;sn;cn;givenName;mail;o;address;telephoneNumber;carLicense +1;j.clarke;31/12/2015;Clarke;Clarke, Jonathan;Jonathan;jonathan@philipoux.net;Normation;;+33 (0)1 83 62 26 96;BHU772|DED899 +2;r.schermesser;31/12/2015;Schermesser;Schermesser, Remy-Christophe;Remy-Christophe;remy@schermesser.com;Octo;;; +3;t.chemineau;31/12/2015;Chemineau;Chemineau, Thomas;Thomas;thomas@aepik.net;AFNOR;;; +4;s.bahloul;31/12/2015;Bahloul;Bahloul, Sebastien;Sebastien;sebastien.bahloul@gmail.com;Dictao;156 av. de Malakof, 75116 PARIS, France;; +5;c.oudot;31/12/2015;Oudot;Oudot, Clement;Clement;clem.oudot@gmail.com;Linagora;;33(0)810251251; +6;r.ouazana;31/12/2015;Ouazana;Ouazana, Raphael;Raphael;rouazana@linagora.com;Linagora;;33(0)810251251; +7;d.coutadeur;31/12/2015;Coutadeur;Coutadeur, David;David;dcoutadeur@linagora.com;Linagora;;33(0)810251251; +8;e.pereira;31/12/2015;Pereira;Pereira, Esteban;Esteban;epereira@linagora.com;Linagora;;33(0)810251251; diff --git a/sample/multi/README.txt b/sample/multi/README.txt index ce063fed..d9eaf5ef 100755 --- a/sample/multi/README.txt +++ b/sample/multi/README.txt @@ -1,52 +1,52 @@ -This README file is describing how to setup a sample PostgreSQL server and to -setup the synchronization from an OpenDJ instance. - -REQUIREMENTS ------------- - -First, please check that you have downloaded and deployed the PostgreSQL -JDBC jar from the PostgreSQL community website. This sample has been tested -with PostgreSQL-8.4-702-jdbc4.jar but may worked with any feature release and -also previous release, but with a transactional support. - -POSTGRESQL SERVER SETUP ------------------------ -This sample suppose that the SQL server is installed and correctly setup. -Please open a psql command line with database administrator rights on the -embedded postgres database and drop any existing database and role lsc, BUT -TAKE CARE THAT YOU HAVE ALREADY BACKUPED ANY EXISTING DATA : - -postgres=# DROP DATABASE IF EXISTS lsc -postgres=# DROP ROLE IF EXISTS lsc - -Go in the right directory and launch the creation script : - -postgres=# \cd $LSC_HOME/sample/postgresql -postgres=# \i create.sql - -You should see some information message and maybe some warnings. If you don't -encountered an error, you can continue at the following step. If not, check -which is the first SQL command that has failed and solved the issue before -relaunching a copy of the script in which you will have copied only the SQL -commands that have not succeed first time. - -LSC SETUP ---------- - -You will find in the etc subdirectory a correct configuration to use with -newly setup server. You need to edit the lsc.xml to change the server IP -address, TCP port, username and password : - - jdbc:postgresql://127.0.0.1:5432/lsc - lsc - lsc - -This sample requires that you start the embedded OpenDJ LDAP server: -$ sample/hsqldb/bin/lsc-sample --start-ldap-server - -Then, launch the LSC in a command line -$ bin/lsc -f sample/postgresql/etc -s all - -And now you should get a OpenDJ and a PostgreSQL synchronized : -you should see a add operation which will add an entry inside your lsc database -and inetorgperson table. +This README file is describing how to setup a sample PostgreSQL server and to +setup the synchronization from an OpenDJ instance. + +REQUIREMENTS +------------ + +First, please check that you have downloaded and deployed the PostgreSQL +JDBC jar from the PostgreSQL community website. This sample has been tested +with PostgreSQL-8.4-702-jdbc4.jar but may worked with any feature release and +also previous release, but with a transactional support. + +POSTGRESQL SERVER SETUP +----------------------- +This sample suppose that the SQL server is installed and correctly setup. +Please open a psql command line with database administrator rights on the +embedded postgres database and drop any existing database and role lsc, BUT +TAKE CARE THAT YOU HAVE ALREADY BACKUPED ANY EXISTING DATA : + +postgres=# DROP DATABASE IF EXISTS lsc +postgres=# DROP ROLE IF EXISTS lsc + +Go in the right directory and launch the creation script : + +postgres=# \cd $LSC_HOME/sample/postgresql +postgres=# \i create.sql + +You should see some information message and maybe some warnings. If you don't +encountered an error, you can continue at the following step. If not, check +which is the first SQL command that has failed and solved the issue before +relaunching a copy of the script in which you will have copied only the SQL +commands that have not succeed first time. + +LSC SETUP +--------- + +You will find in the etc subdirectory a correct configuration to use with +newly setup server. You need to edit the lsc.xml to change the server IP +address, TCP port, username and password : + + jdbc:postgresql://127.0.0.1:5432/lsc + lsc + lsc + +This sample requires that you start the embedded OpenDJ LDAP server: +$ sample/hsqldb/bin/lsc-sample --start-ldap-server + +Then, launch the LSC in a command line +$ bin/lsc -f sample/postgresql/etc -s all + +And now you should get a OpenDJ and a PostgreSQL synchronized : +you should see a add operation which will add an entry inside your lsc database +and inetorgperson table. diff --git a/sample/multi/create.sql b/sample/multi/create.sql index 807d8d6b..d3fea059 100755 --- a/sample/multi/create.sql +++ b/sample/multi/create.sql @@ -1,35 +1,35 @@ -CREATE ROLE lsc LOGIN - ENCRYPTED PASSWORD 'md5809ead1da2f082b19e643d95a616110f' - NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE; - -CREATE DATABASE lsc - WITH OWNER = lsc - ENCODING = 'UTF8' - TABLESPACE = pg_default - CONNECTION LIMIT = -1; - -\c lsc - -CREATE SEQUENCE public.inetorgperson_pkey - INCREMENT 1 - MINVALUE 1 - MAXVALUE 9223372036854775807 - START 1 - CACHE 1; - -ALTER TABLE public.inetorgperson_pkey OWNER TO lsc; - -CREATE TABLE public.inetorgperson -( - uid character varying(255) NOT NULL, - sn character varying(255) NOT NULL, - givenname character varying(255), - cn character varying(512) NOT NULL, - mail character varying(255) NOT NULL, - address character varying(512), - telephonenumber character varying(255), - id bigint NOT NULL DEFAULT nextval('inetorgperson_pkey'::regclass), - CONSTRAINT inetorgperson_pkey1 PRIMARY KEY (id) -); - -GRANT ALL ON TABLE public.inetorgperson TO lsc; +CREATE ROLE lsc LOGIN + ENCRYPTED PASSWORD 'md5809ead1da2f082b19e643d95a616110f' + NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE; + +CREATE DATABASE lsc + WITH OWNER = lsc + ENCODING = 'UTF8' + TABLESPACE = pg_default + CONNECTION LIMIT = -1; + +\c lsc + +CREATE SEQUENCE public.inetorgperson_pkey + INCREMENT 1 + MINVALUE 1 + MAXVALUE 9223372036854775807 + START 1 + CACHE 1; + +ALTER TABLE public.inetorgperson_pkey OWNER TO lsc; + +CREATE TABLE public.inetorgperson +( + uid character varying(255) NOT NULL, + sn character varying(255) NOT NULL, + givenname character varying(255), + cn character varying(512) NOT NULL, + mail character varying(255) NOT NULL, + address character varying(512), + telephonenumber character varying(255), + id bigint NOT NULL DEFAULT nextval('inetorgperson_pkey'::regclass), + CONSTRAINT inetorgperson_pkey1 PRIMARY KEY (id) +); + +GRANT ALL ON TABLE public.inetorgperson TO lsc; diff --git a/sample/nis/README.txt b/sample/nis/README.txt index dfebd612..66b89a58 100644 --- a/sample/nis/README.txt +++ b/sample/nis/README.txt @@ -1,68 +1,68 @@ -This README file is describing how to setup a sample NIS server and to setup -the synchronization. - -REQUIREMENTS ------------- - -First, please check that you have downloaded and deployed the nis plugin jar -from LSC Project main website. Please also check that you have the nis jar -provided by Oracle (ex Sun) and note that this dependency is not Open Source -and is licensed under the Sun Binary license and thus can not be -redistributed freely. - -NIS SERVER SETUP ----------------- -Then connect to your Debian box and install the nis package : -$ su - -$ apt-get install nis - -At this step, please wait until ypbind timeouts because your NIS server is -not already setup. Then go to /var/yp and create the required domain directory -structure : -$ cd /var/yp -$ mkdir -p lsc-project.org -$ cd lsc-project.org -$ make -f ../Makefile all - -You may get some warning message about unregistered RPC service. You can safely -ignore them. Then check your installation by launching the server in debug mode -$ ypserv -d - -Then launch the ypbind client in debug mode to check for connection correctness -$ ypbind -d - -You must see that the connection is well established. Then open a new terminal -and check for the final test through the ypcat client : -$ ypcat passwd - -You must see your current accounts shown there and that's it. - -Then stop both daemon started in debug mode and start them again without the --d flag. They will daemonize themselves, and it's now time to setup LSC. - -LSC SETUP ---------- - -You will find in the etc subdirectory a correct configuration to use with -newly setup server. You need to edit the lsc.xml to change the server IP -address and the managed NIS domain in the following line : - - nis://NIS-SERVER-ADDRESS/lsc-project.org - -Note that this synchronization will lookup accounts through the -passwd.byname map : - - passwd.byname - -This means that if you want to synchronize groups, you will need to change the -map you plan to use. - -This sample requires that you start the embedded OpenDJ LDAP server: -$ sample/hsqldb/bin/lsc-sample --start-ldap-server - -Then, launch the LSC in a command line -$ bin/lsc -f sample/nis/etc -s passwd - -And now you should get a NIS server and a directory synchronized : -you should see a renaming operation which will change the RDN of the uid=00000001 -entry to mail=test@lsc-project.org +This README file is describing how to setup a sample NIS server and to setup +the synchronization. + +REQUIREMENTS +------------ + +First, please check that you have downloaded and deployed the nis plugin jar +from LSC Project main website. Please also check that you have the nis jar +provided by Oracle (ex Sun) and note that this dependency is not Open Source +and is licensed under the Sun Binary license and thus can not be +redistributed freely. + +NIS SERVER SETUP +---------------- +Then connect to your Debian box and install the nis package : +$ su - +$ apt-get install nis + +At this step, please wait until ypbind timeouts because your NIS server is +not already setup. Then go to /var/yp and create the required domain directory +structure : +$ cd /var/yp +$ mkdir -p lsc-project.org +$ cd lsc-project.org +$ make -f ../Makefile all + +You may get some warning message about unregistered RPC service. You can safely +ignore them. Then check your installation by launching the server in debug mode +$ ypserv -d + +Then launch the ypbind client in debug mode to check for connection correctness +$ ypbind -d + +You must see that the connection is well established. Then open a new terminal +and check for the final test through the ypcat client : +$ ypcat passwd + +You must see your current accounts shown there and that's it. + +Then stop both daemon started in debug mode and start them again without the +-d flag. They will daemonize themselves, and it's now time to setup LSC. + +LSC SETUP +--------- + +You will find in the etc subdirectory a correct configuration to use with +newly setup server. You need to edit the lsc.xml to change the server IP +address and the managed NIS domain in the following line : + + nis://NIS-SERVER-ADDRESS/lsc-project.org + +Note that this synchronization will lookup accounts through the +passwd.byname map : + + passwd.byname + +This means that if you want to synchronize groups, you will need to change the +map you plan to use. + +This sample requires that you start the embedded OpenDJ LDAP server: +$ sample/hsqldb/bin/lsc-sample --start-ldap-server + +Then, launch the LSC in a command line +$ bin/lsc -f sample/nis/etc -s passwd + +And now you should get a NIS server and a directory synchronized : +you should see a renaming operation which will change the RDN of the uid=00000001 +entry to mail=test@lsc-project.org diff --git a/sample/postgresql/README.txt b/sample/postgresql/README.txt index 9dedfa0a..3e6836bd 100644 --- a/sample/postgresql/README.txt +++ b/sample/postgresql/README.txt @@ -1,60 +1,60 @@ -This README file is describing how to setup a sample PostgreSQL server and to -setup the synchronization from and to an OpenDJ instance. - -REQUIREMENTS ------------- - -First, please check that you have downloaded and deployed the PostgreSQL -JDBC jar from the PostgreSQL community website. This sample has been tested -with PostgreSQL-8.4-702-jdbc4.jar but may worked with any feature release and -also previous release, but with a transactional support. - -POSTGRESQL SERVER SETUP ------------------------ -This sample suppose that the SQL server is installed and correctly setup. -Please open a psql command line with database administrator rights on the -embedded postgres database and drop any existing database and role lsc, BUT -TAKE CARE THAT YOU HAVE ALREADY BACKUPED ANY EXISTING DATA : - -postgres=# DROP DATABASE IF EXISTS lsc; -postgres=# DROP ROLE IF EXISTS lsc; - -Go in the right directory and launch the creation script : - -postgres=# \cd $LSC_HOME/sample/postgresql -postgres=# \i create.sql - -You should see some information message and maybe some warnings. If you don't -encountered an error, you can continue at the following step. If not, check -which is the first SQL command that has failed and solved the issue before -relaunching a copy of the script in which you will have copied only the SQL -commands that have not succeed first time. - -LSC SETUP ---------- - -You will find in the etc subdirectory a correct configuration to use with -newly setup server. You need to edit the lsc.xml to change the server IP -address, TCP port, username and password : - - jdbc:postgresql://127.0.0.1:5432/lsc - lsc - lsc - -This sample requires that you start the embedded OpenDJ LDAP server: -$ sample/hsqldb/bin/lsc-sample --start-ldap-server - -In a new console, populate the LDAP server by using the HSQLDB sample: -$ sample/hsqldb/bin/lsc-sample --import sample/hsqldb/sample.csv -$ sample/hsqldb/bin/lsc-sample --run - -Then, launch the LSC in a command line to start LDAP to postgresql synchronization: -$ bin/lsc -f sample/postgresql/etc-opendj2postgresql -s all -c all - -Or launch the LSC in a command line to start an asynchronous postgresql to LDAP task: -$ bin/lsc -f sample/postgresql/etc-postgresql2opendj -a all - -When the asynchronous task has synchronized the default jdoe account, add the jsmith by launching the insert.sql script : -postgres=# \i insert.sql - -And now you should get a OpenDJ and a PostgreSQL synchronized: you should see add operations which will add entries inside your lsc database and inetorgperson table. +This README file is describing how to setup a sample PostgreSQL server and to +setup the synchronization from and to an OpenDJ instance. + +REQUIREMENTS +------------ + +First, please check that you have downloaded and deployed the PostgreSQL +JDBC jar from the PostgreSQL community website. This sample has been tested +with PostgreSQL-8.4-702-jdbc4.jar but may worked with any feature release and +also previous release, but with a transactional support. + +POSTGRESQL SERVER SETUP +----------------------- +This sample suppose that the SQL server is installed and correctly setup. +Please open a psql command line with database administrator rights on the +embedded postgres database and drop any existing database and role lsc, BUT +TAKE CARE THAT YOU HAVE ALREADY BACKUPED ANY EXISTING DATA : + +postgres=# DROP DATABASE IF EXISTS lsc; +postgres=# DROP ROLE IF EXISTS lsc; + +Go in the right directory and launch the creation script : + +postgres=# \cd $LSC_HOME/sample/postgresql +postgres=# \i create.sql + +You should see some information message and maybe some warnings. If you don't +encountered an error, you can continue at the following step. If not, check +which is the first SQL command that has failed and solved the issue before +relaunching a copy of the script in which you will have copied only the SQL +commands that have not succeed first time. + +LSC SETUP +--------- + +You will find in the etc subdirectory a correct configuration to use with +newly setup server. You need to edit the lsc.xml to change the server IP +address, TCP port, username and password : + + jdbc:postgresql://127.0.0.1:5432/lsc + lsc + lsc + +This sample requires that you start the embedded OpenDJ LDAP server: +$ sample/hsqldb/bin/lsc-sample --start-ldap-server + +In a new console, populate the LDAP server by using the HSQLDB sample: +$ sample/hsqldb/bin/lsc-sample --import sample/hsqldb/sample.csv +$ sample/hsqldb/bin/lsc-sample --run + +Then, launch the LSC in a command line to start LDAP to postgresql synchronization: +$ bin/lsc -f sample/postgresql/etc-opendj2postgresql -s all -c all + +Or launch the LSC in a command line to start an asynchronous postgresql to LDAP task: +$ bin/lsc -f sample/postgresql/etc-postgresql2opendj -a all + +When the asynchronous task has synchronized the default jdoe account, add the jsmith by launching the insert.sql script : +postgres=# \i insert.sql + +And now you should get a OpenDJ and a PostgreSQL synchronized: you should see add operations which will add entries inside your lsc database and inetorgperson table. diff --git a/sample/postgresql/create.sql b/sample/postgresql/create.sql index 984480e4..114d9924 100644 --- a/sample/postgresql/create.sql +++ b/sample/postgresql/create.sql @@ -1,42 +1,42 @@ -DROP DATABASE IF EXISTS lsc; - -DROP ROLE IF EXISTS lsc; - -CREATE ROLE lsc LOGIN - ENCRYPTED PASSWORD 'md5809ead1da2f082b19e643d95a616110f' - NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE; - -CREATE DATABASE lsc - WITH OWNER = lsc - ENCODING = 'UTF8' - TABLESPACE = pg_default - CONNECTION LIMIT = -1; - -\c lsc - -CREATE SEQUENCE public.inetorgperson_pkey - INCREMENT 1 - MINVALUE 1 - MAXVALUE 9223372036854775807 - START 1 - CACHE 1; - -ALTER TABLE public.inetorgperson_pkey OWNER TO lsc; - -CREATE TABLE public.inetorgperson -( - uid character varying(255) NOT NULL, - sn character varying(255) NOT NULL, - givenname character varying(255), - cn character varying(512) NOT NULL, - mail character varying(255) NOT NULL, - address character varying(512), - telephonenumber character varying(255), - id bigint NOT NULL DEFAULT nextval('inetorgperson_pkey'::regclass), - CONSTRAINT inetorgperson_pkey1 PRIMARY KEY (id) -); - -INSERT INTO public.inetorgperson VALUES ( 'jdoe-test', 'Doe', 'John', 'Doe, John', 'jdoe@foobar.com', 'The White House, Washington DC, United States', '(1) 123 45678', 1); - -GRANT ALL ON TABLE public.inetorgperson TO lsc; - +DROP DATABASE IF EXISTS lsc; + +DROP ROLE IF EXISTS lsc; + +CREATE ROLE lsc LOGIN + ENCRYPTED PASSWORD 'md5809ead1da2f082b19e643d95a616110f' + NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE; + +CREATE DATABASE lsc + WITH OWNER = lsc + ENCODING = 'UTF8' + TABLESPACE = pg_default + CONNECTION LIMIT = -1; + +\c lsc + +CREATE SEQUENCE public.inetorgperson_pkey + INCREMENT 1 + MINVALUE 1 + MAXVALUE 9223372036854775807 + START 1 + CACHE 1; + +ALTER TABLE public.inetorgperson_pkey OWNER TO lsc; + +CREATE TABLE public.inetorgperson +( + uid character varying(255) NOT NULL, + sn character varying(255) NOT NULL, + givenname character varying(255), + cn character varying(512) NOT NULL, + mail character varying(255) NOT NULL, + address character varying(512), + telephonenumber character varying(255), + id bigint NOT NULL DEFAULT nextval('inetorgperson_pkey'::regclass), + CONSTRAINT inetorgperson_pkey1 PRIMARY KEY (id) +); + +INSERT INTO public.inetorgperson VALUES ( 'jdoe-test', 'Doe', 'John', 'Doe, John', 'jdoe@foobar.com', 'The White House, Washington DC, United States', '(1) 123 45678', 1); + +GRANT ALL ON TABLE public.inetorgperson TO lsc; + diff --git a/sample/postgresql/insert.sql b/sample/postgresql/insert.sql index 5ef00dab..e93972f8 100755 --- a/sample/postgresql/insert.sql +++ b/sample/postgresql/insert.sql @@ -1 +1 @@ -INSERT INTO public.inetorgperson VALUES ( 'jsmith-test', 'Smith', 'Jane', 'Smith, Jane', 'jsmith@foobar.com', 'The White House, Washington DC, United States', '(1) 123 45679', 2); +INSERT INTO public.inetorgperson VALUES ( 'jsmith-test', 'Smith', 'Jane', 'Smith, Jane', 'jsmith@foobar.com', 'The White House, Washington DC, United States', '(1) 123 45679', 2);