...
Each user's primary group must exist before the user is created unless --user-group is specified on the useradd command.
User creation
This varies, depending on the type of user. Maybe the user will be a full Linux user; maybe the user is only required for use with samba.
For a full Linux user: TODO: complete and test this description
useradd --comment 'User Name' --create-home --gid <primary group name or number> --groups <comma separated list of secondary groups> <user name>
For a user who will only log on to samba: TODO: complete and test this description
useradd --comment 'User Name' --no-create-home --user-group --groups <comma separated list of secondary groups> <user name>
User disabling and removal
Reference: http://www.howtoforge.com/linux_remove_users
...
Find any other files and directories owned by the user (the command will also search network mounted file systems) and remove or change ownership as appropriate:
find / -user $u
In case the user has a dedicated group with the same name:
find / -group $u
De-configure the user
Remove references to the user from miscellaneous configurations: /etc/samba/smb.conf(.source),
...