Export and Import User Command Line

christiankraute

Registered
Hi,

I would like to export a user on my Xserver via command line for a backup to a different server. 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

PS I know it won't export the passwords - I don't need them!
 
If you just want the LDAP or NetInfo data, you could just use the WGM program. Point it to the proper node and export.

Just to confirm, this is in the NetInfo DB or in the shared LDAP DB?

Michael
 
Thanks for the reply

I just want the NetInfo data but for some reason when I export the user it doesn't export that the users password is a shadow password.

Please note I am not after the actual password.

Thanks C
 
Please anybody I need to migrate 300 users by tomorrow.

When I import the user on the backup machine its missing the 'authentication_authority: ;ShadowHash;' property.

Thanks heaps,
 
Upon re-import, if you select all of the accounts in WGM and attempt to apply a password change to all of the user accounts, you'll get what you want.

When you import, it lists a simplistic crypt password type. When you update the password value, it then creates, in the case of NetInfo, a more secure Shadow Password, which is stored in a more secure method apart from the user account, as opposed to Crypt, which is in the user record itself.

Out of curiosity, why are you running 300 user records in a local netinfo db? I'd think you'd want a centralized authentication authority, like Open Directory and the corresponding LDAP + replication system to keep this in order.

Michael
 
Hi Michael,

Thanks for the reply.

Nothing special - I am using the users only for email accounts on the mail server so properly NetInfo is all I need.

When you import, it lists a simplistic crypt password type. When you update the password value, it then creates, in the case of NetInfo, a more secure Shadow Password, which is stored in a more secure method apart from the user account, as opposed to Crypt, which is in the user record itself.[/U]

That's correct but it also asks for a new password when I update to shawdow password. I have copied all passwords over from /var/db/bla/bla but with the window popin up I am forced to put a password in. The problem is I haven't got all passwords on hand and it would take quiet a bit to do.

Is there anything else I can do?

Thanks again Christian
 
Ahhhh, you had said that you didn't need the passwords, so I assumed you were just simply going to select all of the users via WGM and type in a generic password for them to use. That process also upgrades the password type being used without having to explicitly change it manually. Then maybe using WGM again to force password changes at next login.

You could use dscl to manipulate the password values for the users.

Michael
 
Go3iverson said:
You could use dscl to manipulate the password values for the users.

Michael

Thanks heaps Michael. I just man paged the dscl command quiet a few options. You wouldn't have any command line examples for dscl on hand :)

thanks again Christian
 
Back
Top