Feature #11027
closedmethod to delete local SMB users
100%
Description
If we add a local user (in /etc/passwd) and then do:
smbadm enable-user $U
passwd $U (set a password)
we'll have an SMB user (in /var/smb/smbpasswd)
If we then delete the user from /etc/passwd
the SMB user stays (in /var/smb/smbpasswd)
We should have a method to remove such users,
both at the command line, and programatically. i.e.
smbadm delete-user ...
Affected Components:
smbsrv
Updated by Gordon Ross over 4 years ago
- Description updated (diff)
- Status changed from New to In Progress
Proposed design:
1: new operation code for smb_pwd_setcntl(), called like:
error = smb_pwd_setcntl(user, SMB_PWC_DELETE);
This operation removes the user line from /var/smb/smbpasswd
2: new smbadm sub-command
smbadm delete-user $U
Similar to smbadm-disable user, calls:
error = smb_pwd_setcntl(user, SMB_PWC_DELETE);
Tested per description
Fix in production since late 2017
Updated by Electric Monk over 4 years ago
- Status changed from In Progress to Closed
- % Done changed from 0 to 100
git commit ef4cfbfda6599ba454267385722705117460a9c8
commit ef4cfbfda6599ba454267385722705117460a9c8 Author: Matt Barden <matt.barden@nexenta.com> Date: 2019-08-10T14:06:00.000Z 11027 method to delete local SMB users Reviewed by: Gordon Ross <gordon.ross@nexenta.com> Reviewed by: Evan Layton <evan.layton@nexenta.com> Approved by: Garrett D'Amore <garrett@damore.org>