[Samba] Samba Windows 7 and logon scripts

Tony Molloy tony.molloy at ul.ie
Tue Sep 14 03:06:39 MDT 2010


On Monday 13 September 2010 10:31:30 Moray Henderson wrote:
> Tony Molloy wrote:
> >On Thursday 09 September 2010 18:11:38 c grassu wrote:
> >> You can try this. It works for me on vista and win7:
> >> 
> >> net use m: /HOME
> >
> >The [homes] share is working fine.
> >
> >The problem is not with the actual script. The problem is that the
> 
> script
> 
> >is
> >not being run at login on Windows 7 wheras it is on WindowsXP
> >
> >Thanks,
> >
> >Tony
> 
> Which versions of Windows 7 and Windows XP are you working with?
> "Professional" should work, but "Home" may have trouble.

We have just migrated our labs from Windows Xp to Windows 7 Professional. So 
the "home" edition is not a problem

> 
> I found (with samba3-3.4.8-42.el5, anyway) that XP would automatically
> map H: to the home drive, but 7 would not; I had to add a line to the
> logon script:
> 
>   if not exist H: net use H: \\LINUX\HOMES > nul

We're running samba3x-3.3.8-0.52.el5_5.x86_64 on CentOS 5.

Funny that, In our case the "homes" share is being mapped ok at login from the 
parameters in the smb.conf file. 

> 
> Your "net time" line will only work for an Administrator.
> 
Yep.

> Remove the "del X" line at the end of your script, and see if you're
> getting error messages logged in X when you log in from 7.

I'll try that and see if I get any errors.


Thanks,

Tony
> 
> 
> Moray.
> "To err is human.  To purr, feline"
> 
> >> On Thu, Sep 9, 2010 at 12:04 PM, Tony Molloy <tony.molloy at ul.ie>
> 
> wrote:
> >> > Hi,
> >> > 
> >> > I'm trying to get Windows 7 to run a logon script which mounts a
> 
> share
> 
> >at
> >
> >> > login. This works fine for Windows XP
> >> > 
> >> > In my smb.conf I have the following
> >> > 
> >> >        logon script = %G.cmd
> >> >        logon path = \\%L\profiles\%U
> >> >        logon drive = H:
> >> >        logon home = \\YOUNGMUNSTER\homes
> >> > 
> >> > The script is
> >> > 
> >> >        @echo
> >> >        @echo            Setting System Policies:  Please Wait.
> >> >        @echo off
> >> >        NET TIME \\janus /SET /YES > X
> >> >        net use M: \\youngmunster\ug2010 /persistent:no > X
> >> >        del X
> >> > 
> >> > The homes share works fine but the logon script does not seem to be
> >> > executed. Any ideas how to get this working.
> >> > 
> >> > Thanks
> >> > 
> >> > Tony
> >> > --
> >> > To unsubscribe from this list go to the following URL and read the
> >> > instructions:  https://lists.samba.org/mailman/options/samba


More information about the samba mailing list