Way to Synchronize users between 2 Freenas boxes

Status
Not open for further replies.

tmueko

Explorer
Joined
Jun 5, 2012
Messages
82
Hi,

is there a way to synchronize the users between two freenas boxes?

My try would be to export from sqlite-database like this:
Code:
.mode insert
select * from account_bsdgroups where "bsdgrp_gid" >= "1000" AND "bsdgrp_gid" < "65533";
select * from account_bsdusers where "bsdusr_uid" >= "1000" AND "bsdusr_uid" < "65534";


on the other side I would delete the user like this
Code:
delete from account_bsdgroups where "bsdgrp_gid" >= "1000" AND "bsdgrp_gid" < "65533";
delete from account_bsdusers where "bsdusr_uid" >= "1000" AND "bsdusr_uid" < "65534";

and then feed whith the INSERS from the export. In addition there is account_bsdgroupmembership which has to be ex- and imported....

Is there a better way?
 

paleoN

Wizard
Joined
Apr 22, 2012
Messages
1,402
Is there a better way?
You mean aside from a directory service, i.e. LDAP? Possibly not. Though it looks like you could just drop the whole table & recreate it vs deleting all the rows & inserting everything back if you're not trying to track changes.
 

tmueko

Explorer
Joined
Jun 5, 2012
Messages
82
You mean aside from a directory service, i.e. LDAP? Possibly not. Though it looks like you could just drop the whole table & recreate it vs deleting all the rows & inserting everything back if you're not trying to track changes.

I don't want to touch the root-User as the Passwords differ.
 
Status
Not open for further replies.
Top