Delete a Samba user (use pdbedit instead if the Unix account has been deleted)

smbpasswd

  • Add/remove a Samba user or change its password.
    Samba users must have an existing local Unix account.
    More information: <https://manned.org/smbpasswd.8>.
  • Trick copyright: tl;dr; <https://github.com/tldr-pages/tldr>

sudo smbpasswd -x {{username}}

click the source code to copy install smbpasswd on any operating system with command-not-found.com