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.