Deleting users from your Samba domain is a two-stage process in which you have to remove the user from the Linux server and also remove the user's corresponding smbpasswd enTRy:
1.
Delete the users using the smbpasswd with the -x switch:
[root@bigboy tmp]# smbpasswd -x john
Deleted user john.
[root@bigboy root]#
2.
Delete the Linux user by following the normal deletion process. For example, to delete the user john and all john's files from the Linux server, use:
[root@bigboy tmp]# userdel -r john
Sometimes you may not want to delete the user's files so that they can be accessed by other users at some other time. In this case, you can just deactivate the user's account using the passwd -l username command.