smbpasswd has an
-L flag available, which is described in the manual as “Run in local mode”. What does this really mean?
Local mode allows a non-root user to specify the root-only options. This is used mostly in test environments where a user needs to make changes to the local smbpasswd file. The smbpasswd file must have read/write permissions for the user running the command.