Bug 6374 - problems using smbpasswd to enable/disable workstations trusted accounts
problems using smbpasswd to enable/disable workstations trusted accounts
Status: RESOLVED WONTFIX
Product: Samba 3.0
Classification: Unclassified
Component: User/Group Accounts
3.0.28a
x86 All
: P3 normal
: none
Assigned To: Samba Bugzilla Account
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-05-19 09:25 UTC by Alceu Rodrigues de Freitas Junior
Modified: 2009-05-19 12:15 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alceu Rodrigues de Freitas Junior 2009-05-19 09:25:32 UTC
Greetings,

My name is Alceu and I was trying to create some scripts to
enable/disable users when I found this strange behavior with the account
flags:

# please assume that the Unix user is already created

root at midgard:~# smbpasswd -a -m lab16$
Added user lab16$.

root at midgard:~# pdbedit -Lv lab16$
Unix username:        lab16$
NT username:
Account Flags:        [W          ]
...

root at midgard:~# smbpasswd -d lab16$
Disabled user lab16$.

root at midgard:~# pdbedit -Lv lab16$
Unix username:        lab16$
NT username:
Account Flags:        [DU         ]
...

root at midgard:~# smbpasswd -e lab16$
Enabled user lab16$.

root at midgard:~# pdbedit -Lv lab16$
Unix username:        lab16$
NT username:
Account Flags:        [U          ]
...

Looks like my workstation trusted account is now a new user in the
system. I never had experienced that, I thought that smbpasswd -e or -d
keys  would only add or remove the D flag. With pbedit works fine, but I
need to check if there are other flags that I should maintain (and I
would create a possible race condition in my script):

root at midgard:~# smbpasswd -x lab16$
Deleted user lab16$.

root at midgard:~# smbpasswd -a -m lab16$
Added user lab16$.
root at midgard:~# pdbedit -Lv lab16$
Unix username:        lab16$
NT username:
Account Flags:        [W          ]
...

root at midgard:~# pdbedit -c '[D]' lab16$
Unix username:        lab16$
NT username:
Account Flags:        [DW         ]

I tested this against two machines: one with Debian 4 (Samba 3.0.20b-1)
and Kubuntu 8.04 (Samba 3.0.28a-1ubuntu4.7). Kubuntu box is fully
updated. Both are using tdbsam as backend.

Thanks,
Alceu
Comment 1 Alceu Rodrigues de Freitas Junior 2009-05-19 09:29:38 UTC
Bug identified in Kubuntu 8.04 (Samba 3.0.28a-1ubuntu4.7). Identified also in Debian 4 (Samba 3.0.20b-1).
Comment 2 Simo Sorce 2009-05-19 09:36:07 UTC
The 3.0.x series is EOL and is subject only to security fixes.

But if you could try the latest upstream releases with the patch in #6333 it would be nice.
Comment 3 Tiago Cruz 2009-05-19 11:53:59 UTC
Hello,

I'm also got this problem, using Ubuntu 9.04:

$ dpkg -l | grep samba
ii  samba                                      2:3.3.2-1ubuntu3                        SMB/CIFS file, print, and login server for U
ii  samba-common                               2:3.3.2-1ubuntu3                        common files used by both the Samba server a

$ smbd --version
Version 3.3.2
Comment 4 Alceu Rodrigues de Freitas Junior 2009-05-19 12:15:37 UTC
A new bug was created (6377) with same description but with a different version that actually is being suported.