You can do this with Kix as well.
First, if you create/edit file under Linux, you have to get flip:
apt-get install flip
Then, get kix and paste Kix32.exe in /home/samba/netlogon/
Then:
nano /home/samba/netlogon/logon.bat
Add this:
@ECHO OFF
%0\..\Kix32.exe %0\..logon.kix /f
Save and close, then:
flip -m /home/samba/netlogon/logon.bat
Now the Kix's part:
nano /home/samba/netlogon/logon.kix
If you have group, you can specify, like this:
IF INGROUP("DOMAIN\TheGroup")
USE Z: \\SERVER\Accounting
ENDIF
If you're using the same Drive's letter for each group, make sure to not put an user into more than 1 group or if you do, use a different letter for each share.
And Without groups:
USE P: \\SERVER\Public
ENDIF
When, you're done, Save & Close.
flip -m /home/samba/netlogon/logon.kix
About your printer, it's like Network drive mapping:
IF INGROUP(“\\SERVER\TheGroup”)
ADDPRINTERCONNECTION ("\\SERVER\HPMopier")
ENDIF
And/Or
ADDPRINTERCONNECTION ("\\SERVER\HPMopier")
Don't try to use IfMember.exe, because you've to copy it on client and while a simple user log on the domain, it might have no right to use "COPY" from the server to the %SystemRoot%.