[PLUG] Samba: Map "My Documents" to Linux home directory?

Matt Alexander m at phxlinux.org
Wed Mar 10 11:33:02 UTC 2004


On Wed, 10 Mar 2004, Bill Barry wrote:

> > I was hoping Samba could setup this association automatically in their
> > domain profile so I didn't have to visit each desktop...
> 
> I have done this when the Samba machine is the domain controller.
> This may be more elaborate than is necessary, but it works.
> 
> in smb.conf general section you put
> logon script = logon.bat
> 
> the logon.bat file on the server in the netlogon share looks like
> c:\windows\wscript  \\mypdcserver\netlogon\RegChange.VBS
> 
> and the RegChange.VBS looks like
> -------------
> Dim WSHShell
> Set WSHShell = WScript.CreateObject("WScript.Shell")
> WSHShell.RegWrite "HKCU\Software\Microsoft\Internet Explorer\Main\Start Page","http://www.google.com","REG_SZ"
> -------------
> 
> You just have to substitute the correct registry key for the location of the "My Documents" folder
> I think it will be this, 
> WSHSHell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders","\\server\share","REG_SZ"
> but I have not tested it.
> 
> Then as each user logs on, their folder location gets changed.
> 
> You should make the file permissions on the RegChange.VBS and the logon.bat pretty tight.

Sweet!  Thanks Bill!








More information about the PLUG mailing list