workgroup to whatever name you want to use for your workgroup.domain logons, logon script, and add machine scriptlogon path, logon drive, and logon home.logon path=
[homes].
This will map the drive (to the drive letter specified with logon drive or to Z:),
and set the environment variables homedrive, homepath, and homeshare.
You probably also want to change read only to no.logon home=
mkdir -p /srv/samba/netlogon chmod 755 /srv/samba/netlogon touch /srv/samba/netlogon/logon.cmd addgroup machines addgroup smbadmin net groupmap add ntgroup="Domain Admins" unixgroup=smbadmin rid=512 type=d net groupmap add ntgroup="Domain Users" unixgroup=users rid=513 type=d net groupmap add ntgroup="Domain Guests" unixgroup=nobody rid=514 type=d
restart smbd restart nmbd
smbpasswd -a rootor create a domain administrator and give him the required rights, e.g. userid administrator:
adduser administrator --ingroup smbadmin --shell /bin/false --gecos ''
smbpasswd -a administrator
net -U administrator rpc rights grant "Domain Admins" \
SeMachineAccountPrivilege SePrintOperatorPrivilege \
SeAddUsersPrivilege SeDiskOperatorPrivilege \
SeRemoteShutdownPrivilege
Note: both adduser and smbpasswd with ask twice for the root or administrator password,
the net command asks once.
adduser --shell /bin/false --gecos '' newuser smbpasswd -a newuser(replace 'newuser' with the userid of the user that you want to create)
Notes
YOURDOMAIN\Domain Admins and YOURDOMAIN\administrator,
but for me it worked like documented above.
add machine script is incorrect in the sample config file,
but for me it worked when I just uncommented it.