smbpasswd password changing

Herb Lewis herb at sgi.com
Wed Mar 27 12:20:03 GMT 2002


Andrew Morgan wrote:
> 
> Ok, I've touched the smbpasswd file.  Now I get:
> 
> [root at raven]# /private/samba/bin/smbpasswd -s -r asherah -U my_test1
> 123abc
> abc123
> abc123
> ERROR: Unable to locate my_test1 in passdb!
> 
> And smbpasswd is there:
> 
> [root at raven]# dir /private/samba/private/
> total 32
> drwxr-xr-x   2 root     other         96 Mar 27 09:34 .
> drwxr-xr-x   9 root     other       4096 Mar 26 08:48 ..
> -rw-r--r--   1 root     root          40 Mar 26 08:53 MACHINE.SID
> -rw-------   1 root     other       8192 Mar 27 09:42 secrets.tdb
> -rw-------   1 root     other          0 Mar 27 09:34 smbpasswd
> 
> Now, I understand why it is saying "Unable to locate my_test1 in passdb"
> (obviously, there are no entries in smbpasswd), but I still think it
> should not be giving me this error when I am changing a remote password.
> 
> You can tell me if I am just being dense...  :)
> 
>         Andy

This is a bug in smbpasswd. I just checked in a fix. thanks
for pointing this out. Here is the change I made.

Index: utils/smbpasswd.c
===================================================================
RCS file: /data/cvs/samba/source/utils/smbpasswd.c,v
retrieving revision 1.93.2.31
diff -r1.93.2.31 smbpasswd.c
903c903,905
<       if(!(local_flags &
(LOCAL_ADD_USER|LOCAL_DISABLE_USER|LOCAL_ENABLE_USER|LOCAL_DELETE_USER|LOCAL_SET_NO_PASSWORD)))
{
---
>       if(remote_machine) {
>               printf("Password changed for user %s on %s.\n", user_name, remote_machine );
>       } else if(!(local_flags & (LOCAL_ADD_USER|LOCAL_DISABLE_USER|LOCAL_ENABLE_USER|LOCAL_DELETE_USER|LOCAL_SET_NO_PASSWORD))) {


-- 
======================================================================
Herb Lewis                               Silicon Graphics 
Networking Engineer                      1600 Amphitheatre Pkwy MS-510
Strategic Software Organization          Mountain View, CA  94043-1351
herb at sgi.com                             Tel: 650-933-2177
http://www.sgi.com                       Fax: 650-932-2177          
======================================================================




More information about the samba-technical mailing list