This article will share with you an example about how to export and export oracle OID/LDAP users (groups). If you have any questions, please do not go to the reference page.
OID users have some attributes that cannot be operated, such as authpassword. Therefore, you must not export these attributes (similar to the automatically generated primary key in DB) during export ).
Therefore, when exporting OID, you must note that common tools cannot meet your needs well. The simplest way is to use the command:
| The Code is as follows: |
Copy code |
Ldapsearch-h 10.8.2.12-p 3060-D "cn = orcladmin"-w Welcome2-L-s one-B "cn = Users, dc = fmw007, dc = com "" cn = * "dn sn cn uid userpassword objectclass> users. ldif & |
In this way, you can export the appropriate attributes.
Import user script
| The Code is as follows: |
Copy code |
Ldapadd-h |
Ldapsearch command usage:
| The Code is as follows: |
Copy code |
Ldapsearch-h oid_hostname -D "binddn" -W password [-Y "proxy_dn"] [-P ldap_port] [-V ldap_version] -B "basedn" {-S base | one | sub} {"Filter_string" [attributes] |-f input_file} [-A] [-A never | always | search | find] [-F separator] [-S] [-R] [-I 1 | 0] [-t] [-u] [-L |-X] [-B] [-M] [- v] [-n] [-L time_limit] [-Z size_limit] [-O ref_hop_limit] [-U SSL_auth_mode {-W wallet_location-P wallet_password}] [-D debug_level] [-E character_set] |