[Samba] 'logon drive' questions

John H Terpstra jht at samba.org
Wed Feb 25 16:26:48 GMT 2004

On Wed, 25 Feb 2004, flinchlock wrote:

> I would like to ask "the list" to help me understand three Samba
> settings: 'logon path', 'logon drive', and 'logon home'.
> Please see my question at the bottom of this post. THANKS!
> -------------------------------------------
> My settings are:
> 	.
> 	.
> 	.
> 	logon path = \\%L\profiles\%u\%m

"logon path" sets the Windows XP environment variable %USERPROFILE% that
pervades the Windows registry.

> 	logon drive = H:

"logon drive" sets the drive letter that is used when you run:
	"net use * /home"

If set in smb.conf and you use either tdbsam or ldapsam this will
automatically map the users UNIX home directory to the drive letter
specified _and_ will set the environment variable %HOMEDRIVE% on the
workstation. Of course, the Windows XP Pro client must be a Domain Member
client for this to work.

> 	logon home = \\%L\%u\.win_profiles\%m

This has no real place in Windows NT/XP, it is used to set the profile
directory for Windows 9x/Me clients.

> [profiles]
> 	path = /home/samba/nt_profiles
> 	read only = No
> 	create mask = 0600
> 	directory mask = 0700
> 	browseable = No
> [homes]
> 	comment = %u's Home Directory
> 	valid users = %S
> 	read only = No
> 	create mask = 0640
> 	directory mask = 0750
> 	hide dot files = No
> 	veto files = /.*/Documents/public_html/
> 	browseable = No
> -------------------------------------------
> On my XP Pro client, when I click on "Command Prompt", I get a "dos"
> window that displays the prompt as: "C:\Documents and
> Settings\testuser".
> This happens, because the properties for the "Command Prompt" have
> this setting in the "Start in" box: %HOMEDRIVE%%HOMEPATH%
> According to
> http://support.microsoft.com/default.aspx?scid=kb;en-us;100843 ...
> [quote]

The %HOMEPATH% is derived from the Windows registry variables. When you
implement folder redirection (as I have documented in my new book "Samba-3
by Example" - can be ordered from Amazon.Com now) to redirect the user's
desktop folder contents to network drives, then this environment variable
will be changed also.

But remember, roaming profiles are copied from the server to the local
machine - no matter what - this always happens. It you have set Windows
registry to delete roaming profiles on logout (a good practice) you will
not see any remnants of the profile after the user has logged out.
Otherwise, if roaming profiles are not set to delete on logout you will
find a mirror of the roaming profile (temporary profile) under:

C:\Documents and Settings\'username' and you will find that the matching
environment parameters for this are:

HOMEPATH=\Documents and Settings\'username'

You have been confusing two entirely different aspects of profile
handling. There are two components:

1) Those that specify where windows obtains the profile to copy across the
network to the client

2) The location of the working image of the desktop profile

John T.

> These three environment variables are set based on the value of the
> home directory. The user's home directory is specified in User
> Manager (Choose Profile and Properties). If the home directory uses
> universal naming conventions (UNC), then they will have the
> following values:
> HOMESHARE=\\<server name>\<share name> HOMEPATH=\<path>
> HOMEDRIVE=<drive letter>:
> If the home directory is a local path such as c:\nt then they will
> look like this:
> [/quote]
> MY variables are set like this:
> C:> set | find "HOME"
> HOMEPATH=\Documents and Settings\testuser
> When I run USRMGR.EXE (User manager for Domains), I can see the two
> users listed in /etc/samba/smbpasswd (just as it should be).
> When I double-click on "testuser" (to open the Properties window), I
> can now click on the "Profile" button to see the two other boxes:
> "User Profiles"
>   User Profile path: \\mutt\profiles\testuser\lapdog
>   Logon Script Name: logon.bat
> "Home Directory"
>   Local Path:
>   Connect H: to \\mutt\testuser\.win_profiles\lapdog
> Remember the Microsoft Q100383 article says, "If the home directory
> uses universal naming conventions (UNC), then they will have the
> following values:
> HOMESHARE=\\<server name>\<share name>
> HOMEPATH=\<path>
> HOMEDRIVE=<drive letter>:"
> So, this indicates the Samba is not working correctly regarding
> these these variables!
> QUESTION: Can some of you please click on your "Command Prompt" and
> see if you get H: or C:\Documents and Settings\youruser?
> --
> SuSE 9.0 Pro (2.4.21-192-default) and samba-2.2.8a-107

John H Terpstra
Email: jht at samba.org

More information about the samba mailing list