Running an AD joined Samba server and trying to setup home directories for users per these instructions.

I got the error:

# net rpc rights grant "HOME\Domain Admins" SeMachineAccountPrivilege SePrintOperatorPrivilege SeAddUsersPrivilege SeDiskOperatorPrivilege SeRemoteShutdownPrivilege -Uadministrator
Enter administrator's password:
Failed to grant privileges for HOME\Domain Admins (NT_STATUS_ACCESS_DENIED)

Which led to these instructions and a hour of searching for an answer.

The fix is, the instructions on that second link are no longer accurate for the combination of 2012R2 and Samba4.  I found the fix here.

I think the command line you typed is using a old syntax. This is working for me on a 4.1.6 :

[root at srvfichiers.tranq ~]# net sam rights grant "TRANQUILIT\\domain admins" SeDiskOperatorPrivilege
Granted SeDiskOperatorPrivilege to TRANQUILIT\domain admins

[root at srvfichiers.tranq ~]# net rpc rights list accounts -U Administrator
Enter Administrator's password:
TRANQUILIT\domain admins

In short the fix is:

net sam rights grant "HOME\\domain admins" SeDiskOperatorPrivilege -U<DomainAdminUser>

On to the next problem.