smbpasswd not handling password server = * correctly

ZINKEVICIUS,MATT (HP-Loveland,ex1) matt_zinkevicius at hp.com
Wed Feb 27 21:55:45 GMT 2002


Jeremy,
Hmm... I just looked at your changes in cvsweb, and I see you didn't change
smbpasswd.c at all, and therefore I don't think you could have completely
fixed the problem. This is because all the of the "*" lookup code uses the
lp_workgroup() parameter as the domain, yet smbpasswd should lookup based on
the domain parameter the user passed in. This is why smbpasswd has to do the
lookup itself. I'm probably not explaining this well so here's an example:

smb.conf:
[global]
   workgroup = domain1
   ...

% smbpasswd -j domain2 -r *

Without my patch, the above will attempt to join domain1. You might have
fixed samba to do better domain controller detection, but smbpasswd is still
broke in the four ways I detailed earlier, and my patch still applies.

--Matt

> -----Original Message-----
> From: jra at samba.org [mailto:jra at samba.org]
> Sent: Wednesday, February 27, 2002 8:29 PM
> To: ZINKEVICIUS,MATT (HP-Loveland,ex1)
> Cc: 'Romeril, Alan'; Samba-Technical (E-mail)
> Subject: Re: smbpasswd not handling password server = * correctly
> 
> 
> On Wed, Feb 20, 2002 at 09:22:03PM -0500, ZINKEVICIUS,MATT 
> (HP-Loveland,ex1) wrote:
> > Hi Alan,
> > Here I reported this problem along with 2 others in 
> smbpasswd about a month
> > ago. Here's the patch I came up with (against 2.2.3a):
> > 
> > smbpasswd-dcdetect.patch
> > ------------------------
> >   - Fixes bug where joining a domain with a given username
> >     and password would not read the password server line
> >     out of smb.conf.
> >   - Fixes bug where joining a domain with a given username
> >     and password would not correctly handle "*" as the
> >     remote machine (which should use the autodetected PDC).
> >   - Fixes bug where joining a domain with an existing account
> >     would not correctly handle "*" as the the remote machine.
> >     (it would use the lp_workgroup() field instead of the
> >     domain that was passed to determine the PDC).
> >   - Add a "-c" option to print the autodetected domain controller
> >     for the given domain.
> 
> I've just fixed this (I think) to allow the correct PDC
> autodetect in the SAMBA_2_2 branch (fix for 2.2.4). HEAD
> does this already.
> 
> If you could test it out I'd appreciate it (I think the -c
> is a good idea as well, but haven't added that yet).
> 
> Jeremy.
> 




More information about the samba-technical mailing list