Before discussing how to configure roaming profiles, it is useful to see how Windows 9x/Me and Windows NT4/200x clients implement these features. Windows 9x/Me clients send a NetUserGetInfo request to the server to get the user's profiles location. However, the response does not have room for a separate profiles location field, only the user's home share. This means that Windows 9x/Me profiles are restricted to being stored in the user 's home directory. Windows NT4/200x clients send a NetSAMLogon RPC request, which contains many fields including a separate field for the location of the user's profiles. 23.2.1 Samba Configuration for Profile HandlingThis section documents how to configure Samba for MS Windows client profile support. 23.2.1.1 NT4/200x User ProfilesFor example, to support Windows NT4/200x clients, set the followoing in the [global] section of the smb.conf file: logon path = \\profileserver\profileshare\profilepath\%U\moreprofilepath This is typically implemented like: logon path = \\%L\Profiles\%u where " %L " translates to the name of the Samba server and " %u " translates to the user name. The default for this option is \\%N\%U\profile , namely \\sambaserver\username\profile . The \\%N\%U service is created automatically by the [ homes ] service. If you are using a Samba server for the profiles, you must make the share that is specified in the logon path browseable. Please refer to the man page for smb.conf in respect of the different semantics of " %L " and " %N ", as well as " %U " and " %u ".
23.2.1.2 Windows 9x/Me User ProfilesTo support Windows 9x/Me clients, you must use the logon home parameter. Samba has been fixed so net use /home now works as well and it, too, relies on the logon home parameter. By using the logon home parameter, you are restricted to putting Windows 9x/Me profiles in the user's home directory. But wait! There is a trick you can use. If you set the following in the [global] section of your smb.conf file: logon home = \\%L\%U\.profiles then your Windows 9x/Me clients will dutifully put their clients in a subdirectory of your home directory called .profiles (making them hidden). Not only that, but net use /home will also work because of a feature in Windows 9x/Me. It removes any directory stuff off the end of the home directory area and only uses the server and share portion. That is, it looks like you specified \\%L\%U for logon home . 23.2.1.3 Mixed Windows 9x/Me and Windows NT4/200x User ProfilesYou can support profiles for Windows 9x and Windows NT clients by setting both the logon home and logon path parameters. For example: logon home = \\%L\%u\.profiles logon path = \\%L\profiles\%u 23.2.1.4 Disabling Roaming Profile SupportA question often asked is: " How may I enforce use of local profiles? " or " How do I disable roaming profiles? " There are three ways of doing this: In smb.conf Affect the following settings and ALL clients will be forced to use a local profile: logon home and logon path MS Windows Registry By using the Microsoft Management Console gpedit.msc to instruct your MS Windows XP machine to use only a local profile. This, of course, modifies registry settings. The full path to the option is: Local Computer Policy\ Computer Configuration\ Administrative Templates\ System\ User Profiles\ Disable: Only Allow Local User Profiles Disable: Prevent Roaming Profile Change from Propagating to the Server Change of Profile Type: From the start menu right-click on My Computer icon , select Properties , click on the User Profiles tab, select the profile you wish to change from Roaming type to Local , and click on Change Type . Consult the MS Windows registry guide for your particular MS Windows version for more information about which registry keys to change to enforce use of only local user profiles.
23.2.2 Windows Client Profile Configuration Information23.2.2.1 Windows 9x/Me Profile SetupWhen a user first logs in on Windows 9X, the file user.DAT is created, as are folders Start Menu , Desktop , Programs , and Nethood . These directories and their contents will be merged with the local versions stored in c:\windows\profiles\username on subsequent logins, taking the most recent from each. You will need to use the [global] options preserve case = yes, short preserve case = yes and case sensitive = no in order to maintain capital letters in shortcuts in any of the profile folders. The user.DAT file contains all the user's preferences. If you wish to enforce a set of preferences, rename their user.DAT file to user.MAN , and deny them write access to this file.
Under Windows 9x/ME, profiles are downloaded from the Primary Logon. If you have the Primary Logon as " Client for Novell Networks ", then the profiles and logon script will be downloaded from your Novell Server. If you have the Primary Logon as " Windows Logon ", then the profiles will be loaded from the local machine a bit against the concept of roaming profiles, it would seem! You will now find that the Microsoft Networks Login box contains [user, password, domain] instead of just [user, password] . Type in the Samba server's domain name (or any other domain known to exist, but bear in mind that the user will be authenticated against this domain and profiles downloaded from it, if that domain logon server supports it), user name and user's password. Once the user has been successfully validated , the Windows 9x/Me machine will inform you that The user has not logged on before and asks you Do you wish to save the user's preferences? Select Yes . Once the Windows 9x/Me client comes up with the desktop, you should be able to examine the contents of the directory specified in the logon path on the Samba server and verify that the Desktop , Start Menu , Programs and Nethood folders have been created. These folders will be cached locally on the client, and updated when the user logs off (if you haven't made them read-only by then). You will find that if the user creates further folders or shortcut, that the client will merge the profile contents downloaded with the contents of the profile directory already on the local client, taking the newest folders and shortcut from each set. If you have made the folders/files read-only on the Samba server, then you will get errors from the Windows 9x/Me machine on logon and logout as it attempts to merge the local and remote profile. Basically, if you have any errors reported by the Windows 9x/Me machine, check the UNIX file permissions and ownership rights on the profile directory contents, on the Samba server. If you have problems creating user profiles, you can reset the user's local desktop cache, as shown below. When this user next logs in, the user will be told that he/she is logging in " for the first time ".
If all else fails, increase Samba's debug log levels to between 3 and 10, and/or run a packet sniffer program such as ethereal or netmon.exe , and look for error messages. If you have access to an Windows NT4/200x server, then first set up roaming profiles and/or netlogons on the Windows NT4/200x server. Make a packet trace, or examine the example packet traces provided with Windows NT4/200x server, and see what the differences are with the equivalent Samba trace. 23.2.2.2 Windows NT4 WorkstationWhen a user first logs in to a Windows NT Workstation, the profile NTuser.DAT is created. The profile location can be now specified through the logon path parameter. There is a parameter that is now available for use with NT Profiles: logon drive . This should be set to H: or any other drive, and should be used in conjunction with the new logon home parameter. The entry for the NT4 profile is a directory not a file. The NT help on Profiles mentions that a directory is also created with a .PDS extension. The user, while logging in, must have write permission to create the full profile path (and the folder with the .PDS extension for those situations where it might be created.) In the profile directory, Windows NT4 creates more folders than Windows 9x/Me. It creates Application Data and others, as well as Desktop , Nethood , Start Menu , and Programs . The profile itself is stored in a file NTuser.DAT . Nothing appears to be stored in the .PDS directory, and its purpose is currently unknown. You can use the System Control Panel to copy a local profile onto a Samba server (see NT Help on Profiles; it is also capable of firing up the correct location in the System Control Panel for you). The NT Help file also mentions that renaming NTuser.DAT to NTuser.MAN turns a profile into a mandatory one. The case of the profile is significant. The file must be called NTuser.DAT or, for a mandatory profile, NTuser.MAN . 23.2.2.3 Windows 2000/XP ProfessionalYou must first convert the profile from a local profile to a domain profile on the MS Windows workstation as follows :
Done. You now have a profile that can be edited using the Samba profiles tool.
Windows XP Service Pack 1 There is a security check new to Windows XP (or maybe only Windows XP service pack 1). It can be disabled via a group policy in the Active Directory. The policy is called: Computer Configuration\Administrative Templates\System\User Profiles\ Do not check for user ownership of Roaming Profile Foldersi This should be set to Enabled . Does the new version of Samba have an Active Directory analogue? If so, then you may be able to set the policy through this. If you cannot set group policies in Samba, then you may be able to set the policy locally on each machine. If you want to try this, then do the following (N.B. I do not know for sure that this will work in the same way as a domain group policy):
23.2.3 Sharing Profiles between W9x/Me and NT4/200x/XP WorkstationsSharing of desktop profiles between Windows versions is not recommended. Desktop profiles are an evolving phenomenon and profiles for later versions of MS Windows clients add features that may interfere with earlier versions of MS Windows clients. Probably the more salient reason to not mix profiles is that when logging off an earlier version of MS Windows, the older format of profile contents may overwrite information that belongs to the newer version resulting in loss of profile information content when that user logs on again with the newer version of MS Windows. If you then want to share the same Start Menu/Desktop with W9x/Me, you will need to specify a common location for the profiles. The smb.conf parameters that need to be common are logon path and logon home . If you have this set up correctly, you will find separate user.DAT and NTuser.DAT files in the same profile directory. 23.2.4 Profile Migration from Windows NT4/200x Server to SambaThere is nothing to stop you from specifying any path that you like for the location of users' profiles. Therefore, you could specify that the profile be stored on a Samba server, or any other SMB server, as long as that SMB server supports encrypted passwords. 23.2.4.1 Windows NT4 Profile Management ToolsUnfortunately, the Resource Kit information is specific to the version of MS Windows NT4/200x. The correct resource kit is required for each platform. Here is a quick guide:
Follow the above for every profile you need to migrate. 23.2.4.2 Side Bar NotesYou should obtain the SID of your NT4 domain. You can use smbpasswd to do this. Read the man page. 23.2.4.3 moveuser.exeThe Windows 200x professional resource kit has moveuser.exe. moveuser.exe changes the security of a profile from one user to another. This allows the account domain to change, and/or the user name to change. This command is like the Samba profiles tool. 23.2.4.4 Get SIDYou can identify the SID by using GetSID.exe from the Windows NT Server 4.0 Resource Kit. Windows NT 4.0 stores the local profile information in the registry under the following key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList Under the ProfileList key, there will be subkeys named with the SIDs of the users who have logged on to this computer. (To find the profile information for the user whose locally cached profile you want to move, find the SID for the user with the GetSID.exe utility.) Inside the appropriate user's subkey , you will see a string value named ProfileImagePath . |