New user passwords?

Andrew Bartlett abartlet at samba.org
Sun Oct 16 19:25:54 MDT 2011


On Sun, 2011-10-16 at 20:03 -0400, Charles Tryon wrote:
> On Fri, Oct 14, 2011 at 5:41 PM, Andrew Bartlett <abartlet at samba.org> wrote:
> 
> > On Fri, 2011-10-14 at 17:35 -0400, Charles Tryon wrote:
> > > On Fri, Oct 14, 2011 at 5:27 PM, Andrew Bartlett <abartlet at samba.org>
> > wrote:
> > >
> > > > On Fri, 2011-10-14 at 17:18 -0400, Charles Tryon wrote:
> > > > > When using samba-tool to create new Samba4 users from the command
> > line,
> > > > is
> > > > > there any way to:
> > > > >
> > > > >     (1) specify the Unix userid (xidNumber) on the command line
> > > > >
> > > > >     (2) specify the password using an existing password hash, for
> > > > example,
> > > > > from the output of "pdbedit -L -w" on an existing Samba3 box?
> > > >
> > > > If you wish to upgrade users from Samba3, see the 'samba-tool domain
> > > > samba3upgrade' command.
> > > >
> > > > This python script also gives a good example about how you might
> > perform
> > > > other manual imports of users.
> > > >
> > > > Andrew Bartlett
> > > >
> > >
> > >
> > > Unfortunately, my old domain is based on a pretty old version of Samba
> > > (3.0.9-2) and basically barfs the samba3upgrade script.
> >
> > What fails?  I'm happy to make reasonable modifications to the script to
> > have it import older databases.  It runs (mostly) the same backend code
> > that an upgrade to Samba 3.6 would trigger, so it should be pretty
> > reasonable to fix these issues.
> >
> 
> I'll see if I can replicate the error and give you some more specifics.
>  This was a pretty old database, running on a very tweaked out Linux
> install, which has already gone through a couple of migrations, and there
> are likely Bad Things in it to cause the error, so it's altogether possible
> that it's not the fault of the script.
> 
> The Samba4 project has a very good HOWTO, which though there are sometimes
> problems, I've noticed that people are working to keep it up to date, and
> it's been HUGELY helpful getting Samba4 running.  I'm wondering if there is
> any sort of guide to the conversion process.  There is some help in the
> script itself, and sometimes you get an error message, but for someone who
> hasn't been immersed in it's function, I feel pretty clueless.  Any kind of
> pointers would be helpful...
> 
> What I have done is copy over the old /etc/samba (with the contained tdb
> user databases) and /usr/lib/samba to the new Samba4 system.  I've then run
> the tool:
> 
> <samba4:ctryon>? sudo /usr/local/samba/sbin/samba-tool domain samba3upgrade
>  --libdir /usr/lib/samba3 -d 256 /etc/samba3/smb.conf

The tool runs best on the system with the old binaries also on it, as
you can then run it like:
sudo /usr/local/samba/sbin/samba-tool domain samba3upgrade -d
256 /etc/samba/smb.conf --testparm=/usr/bin/testparm

That way, we get to know the compiled-in default paths that are not in
your smb.conf.  The --libdir option you used is also quite valid, and in
that case all the tdb files must be in the pointed-at directory.  In
your specifc case you were missing secrets.tdb.

Attached is a proposed fix which will make this clearer, if you could
test it both with and without the secrets.tdb file.  If successful I can
put it into the tree to help the next person.

A wiki page with an upgrade HOWTO is a very good idea, and I would
welcome anyone who wishes to start on one, otherwise I'll try to get to
it soon.

Andrew Bartlett
-- 
Andrew Bartlett                                http://samba.org/~abartlet/
Authentication Developer, Samba Team           http://samba.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-s4-s3-upgrade-Give-a-better-clue-when-we-cannot-open.patch
Type: text/x-patch
Size: 2151 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20111017/0e7cfa6d/attachment.bin>


More information about the samba-technical mailing list