net fsmo show|transfer|seize

Nadezhda Ivanova nadezhda.ivanova at
Thu Feb 4 06:01:32 MST 2010

Hi Jelmer, thanks for taking the time to review! And you have done a great job with the python net stuff.

The seize_role is indeed called:
 elif subcommand == "seize":
+            if role == "all":
+                self.seize_role("rid", samdb, force)
+                self.seize_role("pdc", samdb, force)
+                self.seize_role("naming", samdb, force)
+                self.seize_role("infrastructure", samdb, force)
+                self.zeize_role("schema", samdb, force)
+            else:
+                self.seize_role(role, samdb, force)

I'll fix the new lines in the help. For some reason the first two lines in the help always came up at the same line, no matter how many \n's I put...

I am not sure I understand your comment about getting a sam database from the command line arguments, I cant exactly imagine what you mean...


> From: Jelmer Vernooij <jelmer at>
> To: Nadezhda Ivanova <nadezhda.ivanova at>
> Cc: samba-technical at <samba-technical at>
> Sent: Четвъртък, 2010, Февруари 4 14:51:41 (GMT+02:00) Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius
> Subject: Re: net fsmo show|transfer|seize

> > Hi Nadezhda,
> On Wed, 2010-01-27 at 18:11 +0200, Nadezhda Ivanova wrote:
> > Hi Team,
> > I pushed the new net fsmo command, which can be used to cause a 
> server to transfer a role to itself or seize it. Implementation is 
> based on some research with ntdsutil tool. Tested against win2008, but 
> we have some implementation is Samba 4 until it can transfer roles. 
> I'll test it some more, my environment got busted after I reverted a 
> snapshot. 
> > Jelmer, I would appreciate it if you do a review when you have some 
> time:
> > 
> > 
> e52c8a1ea9c4f9
> Looks good! Two minor comments:
> * cmd_fsmo.seize_role doesn't seem to be called anywhere, is it dead
> code?
> * the help for --role seems to include too much newlines, if you use 
> """
> you shouldn't need the \n
> Perhaps - but let's keep that separate of this patch - given the 
> number
> of net commands that seem to use the samdb, we should add a helper
> function to get at a sam database from the command-line arguments 
> (i.e.
> a SamdbCommand class that subclasses Command?). 
> Cheers,
> Jelmer

More information about the samba-technical mailing list