Skip navigation

How to import local user from iMac to network users in Open Directory?

1920 Views 10 Replies Latest reply: Jan 8, 2014 8:36 AM by MrHoffman RSS
Archizzus Calculating status...
Currently Being Moderated
Jan 27, 2013 12:49 PM

Hello,

 

I recently bought a mac mini server to be used as server at home. I already had an iMac with my family users. Now that my server is configured as directory server, I would like to import my existing users from my imac to the new directory, in order to use mobile user profiles on both computer. But I cannot find any procedure to do that. The Migration Assistant delivered in Mountain Lion only allows migration local to local (and it works perfect), but I need a copy from local to network users. Meaby I can create new users in my directory, but how importing the personal data from the iMac ?

 

If someone can help ;-)

 

Archizzus

Mac mini, OS X Server, Server running on Mountain Lion
  • UptimeJeff Level 4 Level 4 (3,390 points)

    You can export users fron local to opendirectory (LDAP) with Work Group Manager.

    http://support.apple.com/kb/DL1567?viewlocale=en_US&locale=en_US

     

    You'll want to be careful depending on what services you run on the server...

    For example, if you delete a user from local and your server hosts mail, you will lose their mail.

     

    If service data isn't an issue, then its straightforward to export from local, import to OD.

    You'll need to reset the user's PW, its note retained with an export/import.

  • gracoat Level 3 Level 3 (645 points)

    I don't know that I would use WGM to export.  Not that I don't trust it....  Wait... Actually, no.  I don't trust it!

     

    There's a number of steps that you can take to complete this process.  There's a couple command line ...  ...commands...  but I'll do my best to walk you through it.

     

    If I miss some steps, hopefully someone will interject!

     

    Step one:

    Assuming that your network based users are going to have their home folders in the same location as the local ones, you need to share that location.

     

    -Click File Sharing in the Server.app

    -Click the Plus button at the bottom of the Filesharing window.

    -Select the "Users" folder in the SECOND column (just to the right of "Macintosh HD")

    -Click Choose

    -Double click the Users folder that appears.

    -Scroll down and check the item: "Make available for Home Directories over AFP" (afp is in the pulldown menu)

    -Click done

     

    Step two:

    Open System Preferences ---> Accounts, delete the users that you want to be network based.  When it asks you what you want to do with the home folder, select "Don't change the home folder."  You do not want to move that home folder, make it a disk image, or delete it.  We need to use it for the new user we're going to create in WGM.

    Step three:

    In WGM, create a new user in the LDAP Node. 

    Name that user with the identical name that the user had when he/she was a local user. Ensure that the user's "shortname" is the same name as their home folder.  This will be important when we claim ownership for the new user.  Don't forget to set a password!

    Click on the Home tabm in WGM.

    Select the one that says, "afp://server.example.com/Users"

    Click save.

    Step four:

    Open up terminal and type the following.

    sudo chown -R *username* /Users/*username*

     

    ****Note that it goes without saying that *username* is both the shortname and the name of the homefolder we're assigning.

     

    Hopefully this helps!

     

    -Graham

  • UptimeJeff Level 4 Level 4 (3,390 points)

    WGM has been dependable for me.. I move users with export/import quite often.

  • UptimeJeff Level 4 Level 4 (3,390 points)

    @Archizzus

     

    We are just talking about moving the users from server to server, right?

    If its a family server, I imagine its < 10 users, why don't you just type them into the new server as local network users after enabling open directory...

     

    You can use WGM from the old server, export the users.

    - use WGM on old server to export users/groups

    - promote new server to OD

    - Launch WGM (relaunch if it was running when you pomoted)

    - Above the user list, you can switch between local and LDAP(OD) users, switch to LDAP

    - Import Users/Groups

     

     

    This process isn't going to move service data and it won't retain passwords...  It will save you retyping users and ensure you have the same Full Name, Shortname(s) and GUID. Thats about it.

  • gracoat Level 3 Level 3 (645 points)

    Yikes.  You'll have to move the user data to the server in this case.  THEN you'll have to import the users using one of the methods above.

     

    If you have an external drive you can connect your iMac to, then copy the data there. Note that Dragging the Users folder won't work.

    You'll have to use terminal.

    Note that we're going to use the sudo command.  BE CAREFUL to type the commands exactly (with the exception of .

    Sudo can do nasty things to your compy if you're not careful.

     

    Like this:

     

    sudo rsync -aov /Users /Volumes/*externalDriveName*/

     

    Depending on how much data your Users folder has in it, this could take quite a bit of time, but it will transfer nicely.

     

    Next, connect the External drive to your Mini.

     

    Open terminal there.

    sudo rsync -aov /Volumes/*externalDriveName*/Users/* /Users/

     

    ENSURE THAT YOU TYPE THE TRAILING SLASHES EXACTLY.

    If you don't have a slash at the end of the last one, you might really badly break your Users folder.

     

    Once that finishes, the data will be on your server in your Users folder.

    As I stated above, you'll need to share this folder and ensure Make available for Home Directories over AFP is checked in the sharing options.

  • UptimeJeff Level 4 Level 4 (3,390 points)

    I've never tried it with ML.. But it is possible to use WGM to export users from a client computer. It reads the local directory same as-if it were a server. You could probably do it.

     

    But again- how many users are we talking about? Has to be a alot to be worthwhile.

     

    And- we are only talking about moving their user name, shortname (account details) without password.

    No service data (home folder) is moved by this process.

  • iwanlucky Calculating status...

    thx dudes for your tutorial

  • MrHoffman Level 6 Level 6 (11,720 points)

Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.