should samba-tool be in sbin?

Andrew Bartlett abartlet at
Fri Nov 4 23:45:31 MDT 2011

On Wed, 2011-10-05 at 13:59 -0400, Sean Dague wrote:
> On 10/05/2011 03:49 AM, Andrew Bartlett wrote:
> > On Tue, 2011-10-04 at 08:27 -0400, Sean Dague wrote:
> >> On 10/03/2011 08:44 PM, Andrew Bartlett wrote:
> >>> On Mon, 2011-10-03 at 17:01 -0400, Sean Dague wrote:
> >>>> After the changes to the wintest script to move the samba-tool path to
> >>>> sbin (patch previously on list) I've been able to get the basic Windows
> >>>> 7 test to run, though I'm still fighting a bit with the win2k8 testing.
> >>>
> >>> This is a bit fishy.  if it is expected to run from the install dir,
> >>> then I guess it should run without a bin/ or sbin/.  I think the bin/
> >>> was for running from the build dir.
> >>
> >> What about just tweaking the path in the script, and then getting rid of
> >> the prefixes entirely? Adding ${PREFIX}/bin:${PREFIX}/sbin to the path
> >> would be easy enough. I can provide a patch in that direction if you'd
> >> rather have that instead.
> >
> > Hmm, I would prefer to use as few environment variables as possible,
> > including $PATH.  If we are getting mixed up as to what directory we are
> > in and so bin/ isn't the directory we just built then we should just
> > prefix $PREFIX on the paths before we run them.  This will make it
> > easier to cut-and-paste the run commands when debugging.
> Well, the challenge is that we are running from the install dir (i.e. 
> /usr/local/samba), and some of the tools are in bin/ and some are in sbin/.
> So, it seems like we need to either:
> 1) fix the reference to samba-tool that is now in sbin/
> 2) change PATH so it can pick up the tools without the explicit path callout
> 3) don't run from install bin, run from build dir instead.
> I've got a patch out for #1. If you'd like a different approach (2 or 3, 
> or something else), I'd do it, just need to know what the acceptable 
> approach is for the in tree script.

I'm sorry for the confusion on this.  We currently cd to PREFIX before
we run the commands, so 1) would seem to be the correct patch.  However,
I've looked into it more closely, and it seems we got here because
samba-tool moved from C to python, an in the process became installed in
PREFIX/sbin not PREFIX/bin as it once was.  

So, the real fix (I think) is to move it back to bin/, but I still need
to figure out how to do that in waf.

Andrew Bartlett

Andrew Bartlett                      
Authentication Developer, Samba Team 

More information about the samba-technical mailing list