This script is a mutually exclusive alternative to the
parameter. This parameter
specifies and external program or script that must accept a single
command line option (the username transmitted in the authentication
request) and return a line line on standard output (the name to which
the account should mapped). In this way, it is possible to store
username map tables in an LDAP or NIS directory services.
/etc/samba/scripts/mapusers.sh