LDAP

From Antiflux Wiki

(Difference between revisions)
Jump to: navigation, search
(added section header, section on migrationtools)
(easier way to copy a user to ldap)
Line 5: Line 5:
<code>ldapadd -xW -D cn=admin,dc=antiflux,dc=org < &laquo;file.ldif&raquo;</code>
<code>ldapadd -xW -D cn=admin,dc=antiflux,dc=org < &laquo;file.ldif&raquo;</code>
-
==Convert /etc/passwd to LDAP==
+
==Copy user from /etc/passwd to LDAP==
-
# Use <code>/usr/share/migrationtools/migrate_passwd.pl</code> as root to generate an LDIF file.
+
<code>sudo ldif-from-password &laquo;username&raquo; | ldapadd -xW -D cn=admin,dc=antiflux,dc=org</code>
-
# Cut'n'paste the LDIF entry for the user you want to add.
+
-
# Grep out any references to Kerberos entries (krb or kerb).
+
-
# Use ldapadd to add the record.
+

Revision as of 01:05, 11 January 2007

Find a user by username

ldapsearch -x uid=«username»

Add a record

ldapadd -xW -D cn=admin,dc=antiflux,dc=org < «file.ldif»

Copy user from /etc/passwd to LDAP

sudo ldif-from-password «username» | ldapadd -xW -D cn=admin,dc=antiflux,dc=org

Personal tools