Export and Import User Command Line

Hi,

I would like to export a user on my Xserver via command line. I know it's the nidump command but not sure how to use it for a proper export. After the export I want to import that user on a second macosx server with niload or whatever command is needed.

Please can somebody post some examples for me.

Thanks heaps,
Christian

Xserve, Mac OS X (10.4.6)

Posted on Jun 13, 2006 1:24 AM

Reply
5 replies
Sort By: 

Jun 14, 2006 9:31 AM in response to christian krauter

I would like to export a user on my Xserver via
command line. I know it's the nidump command but not
sure how to use it for a proper export. After the
export I want to import that user on a second macosx
server with niload or whatever command is needed.


To export all users on the old server:

sudo nidump passwd . > myExportFile

Then open the file with TextEdit (or the like) and clear out all the users you do not want to import. Then copy the file to your new server and do:

sudo niload passwd . < myExportFile

Note: this only works with local NetInfo users, not LDAP ones.<br>
MacBook Pro Mac OS X (10.4.6)
Reply

Jun 15, 2006 10:50 PM in response to christian krauter

passwords are not stored in the Netinfo Data Base,they are stored in /var/db/shadow/hash/ named for the users GUID.I have never tried moving them,I know you can generate older crypt passwords pretty eaisly using "openssl passwd mypassword" and then have the users change it after the fact.
Reply

Jun 17, 2006 3:11 AM in response to christian krauter

Just on problem with the solution below.

nidump passwd .>passwd

(xfer the file to the new host)

niload passwd . < /path/to/passwd

When I import the user on the backup machine its missing the 'authentication_authority: ;ShadowHash;' property which is very important to me. How can I get that property in there. I have tried the WGM but the same. I am using macosx server 10.4.2

Any help highly appreciated
Christian
Reply

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Export and Import User Command Line

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.