Project

General

Profile

Feature #11027

method to delete local SMB users

Added by Gordon Ross 8 days ago. Updated 3 days ago.

Status:
In Progress
Priority:
Normal
Assignee:
Category:
-
Start date:
2019-05-15
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

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

History

#1

Updated by Gordon Ross 3 days ago

  • Status changed from New to In Progress
  • Description updated (diff)

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

Also available in: Atom PDF