[Samba] What is the difference between %u and %U

James A. Dinkel jdinkel at bucoks.com
Fri Feb 9 22:42:39 GMT 2007

> From: Don McCall
> %U returns the username the client requested over the wire
> %u returns the username that he actually mapped to.

> From: Gerald (Jerry) Carter
> %u is based on the uid of the connected userand
> is only available with the context of a share
> connection.  That's a little over simplified explanation
> but a good rule of thumb.
> cheers, jerry

Don's answer was the same as what's in the documentation...

Jerry, I still don't get it.  Basically this is for setting the path for
the Homes share and what to use in the script to create the Homes share
folder.  Right now I am using %S (per suggestion) but that is also
creating shares and folders for computer accounts.  I don't want
computer accounts to create shares so I thought I would use %u or %U

>From what Jerry says then, I should use %u, but I'm still a little
curious as to what %U would be used for then.

More information about the samba mailing list