Hello, dear Samba developers! First of all, I'd like to thank you for this change: > winbind primary group and nss info > With 4.6, it will be possible to optionally use the primary group as set in the "Unix > Attributes" tab for the local unix token of a domain user. Before 4.6, the Windows primary group was always chosen as primary group for the local unix token. > To activate the unix primary group, set > idmap config <DOMAIN> : unix_primary_group = yes It is Greatly appreciated! Now we have the primary groups for all the users set correctly even BEFORE they log in, thank you! But I found out that string '%G' in parameter 'template homedir' is still expands to "Domain Users" for all the users that didn't log in. Example. We have 'template homedir = /FILES/%G/staff/%U' in smb.conf. We have group ADMIN with gidNumber 5100 (gidNumber of 'Domain Users' is 5615) So now even before user logs in he has a correct gid, but not the home folder: # getent passwd admin admin:*:5203:5100::/FILES/Domain Users/staff/admin:/bin/bash after login it became as it should be (correct gid AND home folder): admin:*:5203:5100::/FILES/ADMINS/staff/admin:/bin/bash But we need to know correct users home folders for all users BEFORE they log in. It is required for scheduled scripts (backup, optimisation, etc.) This is the last thing preventing us to use Samba gracefully! I'm asking you to fix this! Thank you! Best regards, Albert