The Samba-Bugzilla – Bug 5540
User variable not passed to the "set primary group script"
Last modified: 2008-07-16 03:31:59 UTC
I use the script
/usr/sbin/usermod -g %g %u
to set the primary group for users. Upon discovering its malfunction, I made a bash script to see what samba was actually executing, and found that it properly substituted the new group, but %u remained as %u.
I am using Samba version 3.2.0rc1-15.fc9
I use samba in a productivity environment, and appreciate everything you do!
Please retry with
/usr/sbin/usermod -g %G %U
Does that work for you?
(In reply to comment #1)
> Please retry with
> /usr/sbin/usermod -g %G %U
> Does that work for you?
I believe the uppercase G and U are used to identify the user making the remote procedure call...as those are the values passed to the script. The group variable works fine as %g. %u remains as %u and %U is the name of the user who is making the change remotely. I should mention, also, that I get an 'access is denied' message on the remote computer, even though it does attempt to execute the script. I'm not sure which problem is causing which, but I thought it might be important. Thank you.
Created attachment 3406 [details]
Fix set primary group script user option substitution
This patch fixes the problem, indeed the %u variable was not substituted as it should have been.
Pushed into 3.2 and 3.3.
Closing out bug report.
Please re-open if it still an issue for you.
Thanks for the report!