Samba and the passwd -r nis command

jason.walton at jason.walton at
Mon Nov 18 18:34:00 GMT 2002

cheers for that, but I'm not bothered about using windows to change the
password, most of the users are unix based and could be cajoled into using
smbpasswd, I can always set up another password change system for the
windows only users (I seem to remember using http at my last company, to
synchronise passwords), having a standard system for changing passwords
will make everyone happy.

The smbpasswd command looks to do the trick, I give it a plaintext old
password and it knows about it. All I want is to be able to pass this onto
smbd and the chgpasswd module.

thanks for the input though, as I hadn't thought about the windows side of

Jason Walton
Nomad Software Ltd
186 Regent Street
London W1B 5TN
Tel. +44 (20) 7292 2459
Fax. +44 (20) 7292 2401

|         |           Steve Langasek   |
|         |           <vorlon at netexpres|
|         | >           |
|         |                            |
|         |           18/11/2002 17:50 |
|         |                            |
  |                                                                                                              |
  |       To:       jason.walton at                                                                   |
  |       cc:       samba-technical at                                                              |
  |       Subject:  Re: Samba and the passwd -r nis command                                                      |

On Mon, Nov 18, 2002 at 05:31:10PM +0000, jason.walton at wrote:

> I have set up a Samba server as a PDC, but want to be able to set
> via NIS, for this end (the NIS server could be on any machine, the PDC
> could be on any machine) I need the passwd -r NIS command to work.
> I have trolled through the code but have come up against a problem, that
> being that the code doesn't pass the old unix password through the code,
> looks like smbpasswd reads it in and passes it onto smbd to change.
> Could anybody tell me if a patch has been applied to solve this problem
> know the code says samba PDC must be run on the NIS master, but that
> practical is our environment).

> I tracked the piece of code down to this bit in smbd\chgpasswd.c, the
> second argument should be the old unix password but isn't known in this
> module. I will keep on looking for a way around this, but any help /
> pointers to patches that fix this, are appreciated.

Er, that's a limitation of the way Windows clients send password changes.
You're not going to be able to synchronize a Samba PDC to a remote NIS
master, because the Samba server never *has* the plaintext of the old

If running the Samba PDC on the NIS master is not practical for your
environment, then password synchronization between NIS and the PDC is not
practical for your environment.

Steve Langasek
postmodern programmer
(See attached file: att184tb.dat)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: att184tb.dat
Type: application/octet-stream
Size: 196 bytes
Desc: not available
Url :

More information about the samba-technical mailing list