LDAP

From Antiflux Wiki

(Difference between revisions)
Jump to: navigation, search
(added section header, section on migrationtools)
Current revision (19:05, 29 September 2007) (edit) (undo)
 
(One intermediate revision not shown.)
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).
+
[[Category:Admin]]
-
# Use ldapadd to add the record.
+

Current revision

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