LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-29-2011, 03:01 PM   #1
duffrecords
LQ Newbie
 
Registered: Nov 2009
Location: Los Angeles, CA
Posts: 29

Rep: Reputation: 0
LDAP account migration


I currently have two LDAP servers--one at an office and another at a data center. I would like to move the office accounts to the data center to centralize account management. What's the best method to migrate the accounts? Also, how do I avoid conflicting uid and gid numbers?
 
Old 08-29-2011, 03:38 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
generally you'd just dump the data with an ldapsearch -LLL and then reimport it again with an ldapadd. As for the uid's, for a one off, i'd personally manually check before doing it, but outside of that, you can just do an ldapadd and manually change any uid's that fail, it's a pretty verbose format, and assuming that uid is indexed uniquely on the destination, it will reject those records. Note that you'e said nothing at all about what ldap services you're using, so the advice we can provide is limited.
 
Old 08-29-2011, 07:56 PM   #3
duffrecords
LQ Newbie
 
Registered: Nov 2009
Location: Los Angeles, CA
Posts: 29

Original Poster
Rep: Reputation: 0
Both servers are running Webmin so the underlying configuration may not be that standardized. I was reading the documentation on the RedHat website (the servers are running CentOS), which demonstrated how to use db2ldif, but I don't have that utility installed.
 
Old 09-15-2011, 08:16 PM   #4
duffrecords
LQ Newbie
 
Registered: Nov 2009
Location: Los Angeles, CA
Posts: 29

Original Poster
Rep: Reputation: 0
After several inelegant attempts at importing the accounts, the users are now on the destination server. However, the dn is wrong, causing them not to appear in the database. For example, "dc=hostname,dc=subdomain,dc=domain,dc=com" instead of "dc=subdomain,dc=domain,dc=com." All I need to do is remove the "dc=hostname" part and that should fix it. I wrote a file with the following contents:
Code:
dn: uid=firstname.lastname,ou=flash,o=domain,dc=hostname,dc=subdomain,dc=domain,dc=com
changetype: modify
replace: dn
dn: uid=firstname.lastname,ou=flash,o=domain,dc=subdomain,dc=domain,dc=com
then I used this command:
Code:
ldapmodify -x -f filename
but I got the following error:
Code:
ldap_initialize( <DEFAULT> )
replace dn:
	uid=firstname.lastname,ou=flash,o=domain,dc=subdomain,dc=domain,dc=com
modifying entry "uid=firstname.lastname,ou=flash,o=domain,dc=hostname,dc=subdomain,dc=domain,dc=com"
modify complete
ldapmodify: Undefined attribute type (17)
	additional info: dn: attribute type undefined
Nothing changed in the user list in Webmin. I tried to delete the user but Webmin times out, waiting (it tried to delete it from other modules, even though I didn't select that). What's the best way to modify the dn for these users?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Huge account migration cbtshare Linux - Server 3 03-18-2010 04:00 PM
ssh local account / ldap account Poil Linux - Security 5 02-26-2010 01:04 AM
User Account Migration rickylim *BSD 1 04-19-2006 01:33 PM
User account migration mjakob Linux - General 14 09-26-2001 01:53 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 09:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration