Bug 12846 - pdbedit -x -m fails to delete one machine account on samba 4.6.5 install
Summary: pdbedit -x -m fails to delete one machine account on samba 4.6.5 install
Status: NEW
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Other (show other bugs)
Version: 4.6.5
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Andrew Bartlett
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-15 13:34 UTC by Jason Keltz
Modified: 2017-06-15 13:34 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jason Keltz 2017-06-15 13:34:12 UTC
I'm trying to delete a machine account using pdbedit -x -m and it fails.  Why might that happen?

The machine account exists..

# pdbedit -Lv 'ts$'

Unix username:        TS$
NT username:
Account Flags:        [W          ]
User SID: S-1-5-21-2594621239-3917873753-3682423317-3286
Primary Group SID: S-1-5-21-2594621239-3917873753-3682423317-515
Full Name:
Home Directory:
HomeDir Drive:        (null)
Logon Script:
Profile Path:
Domain:
Account desc:
Workstations:
Munged dial:
Logon time:           Fri, 26 May 2017 07:42:36 EDT
Logoff time:          0
Kickoff time:         Wed, 13 Sep 30828 22:48:05 EDT
Password last set:    Thu, 25 May 2017 12:22:20 EDT
Password can change:  Thu, 25 May 2017 12:22:20 EDT
Password must change: never
Last bad password   : 0
Bad password count  : 0
Logon hours         : FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF

When I try to delete it...

# pdbedit -x -m ts
Unable to delete machine ts$

I can create a different machine account, and delete that..

# pdbedit -a -m ts1
Unix username:        ts1$
NT username:
Account Flags:        [W          ]
User SID: S-1-5-21-2594621239-3917873753-3682423317-3360
Primary Group SID: S-1-5-21-2594621239-3917873753-3682423317-515
Full Name:
Home Directory:
HomeDir Drive:        (null)
Logon Script:
Profile Path:
Domain:
Account desc:
Workstations:
Munged dial:
Logon time:           0
Logoff time:          0
Kickoff time:         Wed, 13 Sep 30828 22:48:05 EDT
Password last set:    Tue, 13 Jun 2017 12:01:40 EDT
Password can change:  Tue, 13 Jun 2017 12:01:40 EDT
Password must change: never
Last bad password   : 0
Bad password count  : 0
Logon hours         : FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF

# pdbedit -x -m ts1

Samba version is 4.6.5.

I submitted to samba-users in case it was my error, but nobody has responded, and since I don't really see any reason for this behavior, I'm reporting it as a bug. 

Please let me know the debug output you need to solve this issue, and I will provide it.