Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Is it possible to use folder redirection with Windows 7 on Samba 3.5 as a PDC of an NT4 domain? I want this to be able to redirect the My Documents folder for a small environment (~25 workstations) of Win7 machines.

It seems like the only way to redirect folders in Windows 7 is to use group policies in AD. Group Policy Objects seem to be the key.

But Samba 3.x doesn't support AD, so...

Is there some other way? E.g., running a script against the machines?

Editing the registry under HKCU won't help unless it can be done before the desktop is loaded. This is because the profiles may be used on any number of different machines, meaning HKCU would need to be modified on-the-fly as a user logs on.

Thanks,

More info: https://wiki.samba.org/index.php/Samba_%26_Windows_Profiles#Configuring_folder_redirection

share|improve this question
1  
Did you setup a Samba to act as a NT4.0 style domain controller? Or all these machines stand alone? –  Zoredache Aug 21 '13 at 19:37
    
As an NT4 domain controller. Currently, I'm testing the configuration, I would prefer to use Samba 3 because the distro support and existing docs are better, the primary admin won't be very experienced and the domain will not be growing significantly. –  mgjk Aug 21 '13 at 19:40
    
I think you could script the update of the registry to redirect to the network paths, but you would have to manually relocate the content. The script would have to be ran for each user profile on each machine. –  Zoredache Aug 21 '13 at 19:47
    
if users are occasionally moving from workstation to workstation, they'd have the problem again. –  mgjk Aug 21 '13 at 20:05
1  
Will enabling "Run logon scripts synchronously" overcome the problem of the desktop loading prior to folder redirection via login script? You may need to apply this policy manually since you're running Win7. –  Jonathan J Aug 26 '13 at 19:46

1 Answer 1

I believe you have a misconception about folder redirection. Folder redirection is typically used to get certain directories out of the user's profile and to a network storage. Either because it is a roaming profile and the directories tend to grow fast and increase profile load times or because it is (and has to stay) a local profile but the user needs to roam and take a subset of her files with her. In an overwhelming number of cases, this is a one-time per-user process - once the redirection has been set up and the files have been moved out of the profile to the destination directory, they stay there.

I personally know of no case where folder redirection settings are applied via a loopback policy to be valid only on a set of machines so users roaming out of this set would have the redirection settings reversed again. If I were to implement such a thing, I would raise concerns regarding stability and usability of the setup.

If you really need this however, you might to a degree simulate what group policies are doing in loopback processing mode by providing different policy files based on the host NetBIOS name:

  1. create different netlogon directories for each of your domain's hosts like /share/samba/netlogon/winws01 for the client named winws01, use symlinks to create sets of identical policy configurations and create links to logon scripts you might be using
  2. place pre-created ntconfig.pol files carrying different settings for folder redirection in those directories as desired
  3. set up the netlogon service in smb.conf to use a dynamic path depending on the client's NetBIOS name:
[netlogon]
path = /share/samba/netlogon/%m
read only = yes
guest ok = yes

the %m macro in the path specification would resolve to the client's NetBIOS name. This way, upon user logon, the Windows client connecting to netlogon and looking for the policy file (ntconfig.pol), would indeed be served from /share/samba/netlogon/<clientname>, allowing you to specify different policy files for different clients.

Note that "redirecting" by just re-setting the destinations in the registry as is being done by NT4-style policies would not move files - you would have to take care of this by yourself (typically through logon scripts). It also would not be easily reversible as previous values of the overwritten registry keys are not saved anywhere.

share|improve this answer
    
I think you misunderstand. I'm trying to use group policies in the most normal and boring way imaginable. "My Documents" on a network share 100% of the time. The problem with a previous commenter's suggestion to edit HKCU is that the user may use any of the 25 workstations. –  mgjk Aug 24 '13 at 13:54
    
I can't find any way to redirect folders on Windows 7 using a Samba 3.5 domain. Even the link you provided states "NT4 policies can only be applied to Windows NT4 up to XP machines." This doesn't appear to help with Windows 7. –  mgjk Aug 24 '13 at 13:55
    
@mgjk folder redirection is a user policy, in the end all it does is changing the corresponding value in HKCU. If you simply are redirecting "my documents" to a network location, it should not matter which workstation the user is logging on to - the network location would be available on any of them using the same path, right? –  the-wabbit Aug 24 '13 at 19:40
1  
@mgjk you are correct regarding ntconfig.pol - it would be ignored by Windows 7 stations, excuse my oversight –  the-wabbit Aug 24 '13 at 19:46

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.