[Samba] difference between '%u' and '%U'?

Linda Walsh samba at tlinx.org
Wed Aug 10 22:50:23 MDT 2011

I realized in looking at my smb.conf, I'm not using these in
a consistent manner, and .... well I just don't understand what the
differences are between them.

Sure I can read the smb.conf page:
            session username (the username that the client wanted, not
            necessarily the same as the one they got).
            username of the current service, if any.
So if I use %U, what name might I get 'instead'?

For example, MS, seems to save my profile under 'user.V2'...even
though my smb config has:

	logon path = \\%D\%U\profile
	logon home = \\%D\%U
	logon drive = i:

But my 'home' is always set to  /home/Domain/User,
but my profile (under W7), is stored under /home/Domain/User.V2...

So when my home dir is mounted, I don't see the 'appdir' of *my*
profile, but the appdir of an XP login (which has caused more than
a little bit of confusion over the years)....

Now, I 'hack' around this by mounting 'i:' manually,
and setting it to '/home/Domain/User.V2'....(which still feels
like a 'hack', but at least my homedir contains my profile and
not my XP profile!

So how are %u and %U supposed to be different?   Should one evaluate
to 'User.V2'?

Thanks for any 'enlightenment!'

More information about the samba mailing list