Hi, I have a problem with logon script. I will at first disconnect all connected drives from last Windows run, and the connect home dir. My smb.conf : [Global] logon script = STARTUP.BAT logon drive = m: logon home = \\sapo\%U logon path = \\sapo\%U\setting\%m\profile domain logons = Yes [homes] comment = Home Directories read only = No browseable = No valid users = %U [netlogon] path = /home/netlogon comment = Network Logon Directory guest ok = Yes browseable = No share modes = No And my STARTUP.BAT script : net use * /delete /yes^M net use m: /home^M net time \\sapo /set /yes^M If run "net use * /delete /yes", then disconnect all connections and script no go next. Thanks for help ...
Martin, Look at the PERSISTENT switch to the NET USE command. It will accomplish what you want without your logon script trying to disconnect all shares while it's running. Doug> -----Original Message----- > From: samba-admin@lists.samba.org [mailto:samba-admin@lists.samba.org]On > Behalf Of Martin Gabauer > Sent: Monday, December 03, 2001 4:14 AM > To: samba@lists.samba.org > Subject: Problem with logon script > > > Hi, > I have a problem with logon script. > I will at first disconnect all connected drives from last Windows run, and > the connect home dir. > My smb.conf : > [Global] > logon script = STARTUP.BAT > logon drive = m: > logon home = \\sapo\%U > logon path = \\sapo\%U\setting\%m\profile > domain logons = Yes > > > [homes] > comment = Home Directories > read only = No > browseable = No > valid users = %U > > [netlogon] > path = /home/netlogon > comment = Network Logon Directory > guest ok = Yes > browseable = No > share modes = No > > And my STARTUP.BAT script : > net use * /delete /yes^M > net use m: /home^M > net time \\sapo /set /yes^M > > If run "net use * /delete /yes", then disconnect all connections > and script no go next. > > Thanks for help ... > > > -- > To unsubscribe from this list go to the following URL and read the > instructions: http://lists.samba.org/mailman/listinfo/samba >
Hi, i'm having a little problem with the logon-script feature. I work with a Winxx-network with Win2k and Win98-Clients. The fileserver is samba 2.2.4 on LINUX,Kernel 2.4.18. For debuging-purposes i wrote a pause command into the logon-script. A realized that there is an error message (in german, i try to translate) : ----------------------------------------------------------- The local device is already used System error 85 . Help is available with the command NET HELPMSG 2250 . ----------------------------------------------------------- Here is the part from my script : ------------------------------------------------------------------------ @SET SERVER=MYSERVER :Win2k rem echo In Win2k @NET TIME \\%Server% /SET /YES > nul @net use u: \\%Server%\homepages > nul @net use v: \\%Server%\homes > nul @net use w: \\%Server%\fax > nul @net use x: \\%Server%\data > nul @if not "%USEROFCURRENTSERVICE%" == "Administrator" goto win2kend @net use y: \\%Server%\rootdir$ > nul :win2kend rem @net use /PERSISTENT:NO > nul @net use z: /delete > nul @goto end ------------------------------------------------------------------------- The client-OS on which the error occurs is Win2k. Windows seems to mount the drives itself befor the logon script is started. How can i solute this problem ? thanks Harry By the way , the logon-script is generated with a shell-script using the root preexec statement. So i can parse each statevar like USEROFCURRENTSERVICE ( %u) to the logon-script. This works and has nothing to do with the problem, just an information for you ..
Harry Rüter <harry_rueter@gmx.de> wrote on 23.05.2002 13:02:10:> >Hi, > >i'm having a little problem with the logon-script feature. > >I work with a Winxx-network with Win2k and Win98-Clients. >The fileserver is samba 2.2.4 on LINUX,Kernel 2.4.18. > >For debuging-purposes i wrote a pause command into the >logon-script. > >A realized that there is an error message (in german, i try >to translate) : > >----------------------------------------------------------- >The local device is already used > >System error 85 . >Help is available with the command NET HELPMSG 2250 . >----------------------------------------------------------- > >Here is the part from my script : > >------------------------------------------------------------------------ >@SET SERVER=MYSERVER > >:Win2k >rem echo In Win2k >@NET TIME \\%Server% /SET /YES > nul >@net use u: \\%Server%\homepages > nul >@net use v: \\%Server%\homes > nul >@net use w: \\%Server%\fax > nul >@net use x: \\%Server%\data > nul >@if not "%USEROFCURRENTSERVICE%" == "Administrator" goto >win2kend >@net use y: \\%Server%\rootdir$ > nul >:win2kend >rem @net use /PERSISTENT:NO > nul >@net use z: /delete > nul >@goto end >------------------------------------------------------------------------- > >The client-OS on which the error occurs is Win2k. > >Windows seems to mount the drives itself befor the >logon script is started. > >How can i solute this problem ? > > >thanks Harry > > >By the way , the logon-script is generated with a >shell-script using the >root preexec statement. > >So i can parse each statevar like USEROFCURRENTSERVICE ( >%u) to the logon-script. >This works and has nothing to do with the problem, >just an information for you .. > >-- >To unsubscribe from this list go to the following URL and read the >instructions: http://lists.samba.org/mailman/listinfo/sambaHi Harry, AFAIK: windows maps drive y: or z: to the logon service to execute the logon script. Ciao Oliver -- Good programming is 40% experience, 30% skill, 20% RTFM, 10% caffeine, and 5% attention to detail. Oliver Six, CEO CAHOS GmbH, Cimbernstr. 51, Germany 81377 Muenchen Phone +49 89 71 01 93 41, Fax +49 89 71 01 93 42
Harry Rüter <harry_rueter@gmx.de> wrote on 23.05.2002 14:36:27:> >Hi, > >Oliver Six wrote: >> >> Harry Rüter <harry_rueter@gmx.de> wrote on 23.05.2002 13:02:10: >> >> > >> >Hi, >> > >> >i'm having a little problem with the logon-script feature. >> > >> >I work with a Winxx-network with Win2k and Win98-Clients. >> >The fileserver is samba 2.2.4 on LINUX,Kernel 2.4.18. >> > >> >For debuging-purposes i wrote a pause command into the >> >logon-script. >> > >> >A realized that there is an error message (in german, i try >> >to translate) : >> > >> >----------------------------------------------------------- >> >The local device is already used >> > >> >System error 85 . >> >Help is available with the command NET HELPMSG 2250 . >> >----------------------------------------------------------- >> > >> >Here is the part from my script : >> > >> >------------------------------------------------------------------------ >> >@SET SERVER=MYSERVER >> > >> >:Win2k >> >rem echo In Win2k >> >@NET TIME \\%Server% /SET /YES > nul >> >@net use u: \\%Server%\homepages > nul >> >@net use v: \\%Server%\homes > nul >> >@net use w: \\%Server%\fax > nul >> >@net use x: \\%Server%\data > nul >> >@if not "%USEROFCURRENTSERVICE%" == "Administrator" goto >> >win2kend >> >@net use y: \\%Server%\rootdir$ > nul >> >:win2kend >> >rem @net use /PERSISTENT:NO > nul >> >@net use z: /delete > nul >> >@goto end >> >------------------------------------------------------------------------- >> > >> >The client-OS on which the error occurs is Win2k. >> > >> >Windows seems to mount the drives itself befor the >> >logon script is started. >> > >> >How can i solute this problem ? >> > >> > >> >thanks Harry >> > >> > >> >By the way , the logon-script is generated with a >> >shell-script using the >> >root preexec statement. >> > >> >So i can parse each statevar like USEROFCURRENTSERVICE ( >> >%u) to the logon-script. >> >This works and has nothing to do with the problem, >> >just an information for you .. >> > >> >-- >> >To unsubscribe from this list go to the following URL and read the >> >instructions: http://lists.samba.org/mailman/listinfo/samba >> >> Hi Harry, >> >> AFAIK: windows maps drive y: or z: to the logon service to execute the logon >> script. >> >> Ciao Oliver >> -- > >I dont think so. > >Here's an output which shows, that Windows doesn't have >to map it, as it could and (afaik) does it with the >following syntax ( \\SERVER\share ) : > >---------------------snipp--------------------- > >D:\>dir \\486dx66\netlogon > Datenträger in Laufwerk \\486dx66\netlogon: ist netlogon > Datenträgernummer: 0F7C-24C4 > > Verzeichnis von \\486dx66\netlogon > >23.05.2002 14:31 <DIR> . >05.04.2002 13:10 <DIR> .. >11.05.2002 16:17 194 logon.bat >23.05.2002 14:31 2.345 logonsmb.bat >14.05.2002 14:57 140 delme.bat >11.05.2002 16:17 194 logon.cmd >16.05.2002 10:51 3.470 netlogon.sh >09.05.2002 22:37 617 welcome.sh >23.05.2002 14:31 112 arc >11.05.2002 10:03 3.021 test.bat >07.04.2002 14:51 6.341 netlogon.sh.old >11.05.2002 11:58 661 bye.sh >22.05.2002 16:37 1.598 os_logon.bat >16.05.2002 10:57 2.366 logonsmb.cmd > 12 Datei(en) 21.059 Bytes > 2 Verzeichnis(se), 86.474.752 Bytes frei > >D:\> >---------------------snipp--------------------- > >You see, no drive necessary. >Your answer wouldn't match the drives u,v,w too. > >Hoping for an answer and thanks > >Harry > >-- >To unsubscribe from this list go to the following URL and read the >instructions: http://lists.samba.org/mailman/listinfo/sambaHi Harry, you're right; but *AFAIK* windows will map the drive. Try to put a "net use>c:\bla.txt" in your logon script to see which drives are mapped during >execution of logon script. In a thread last year I saw a problem when >disconnecting y: or z: in the logon script.Ciao Oliver -- Good programming is 40% experience, 30% skill, 20% RTFM, 10% caffeine, and 5% attention to detail. Oliver Six, CEO CAHOS GmbH, Cimbernstr. 51, Germany 81377 Muenchen Phone +49 89 71 01 93 41, Fax +49 89 71 01 93 42
Hi! I am a newbie trying out Samba 2.2.4 on FreeBSD 4.6 In my smb.conf, I have the following entries [netlogon] comment = Network Logon Service path = /usr/local/samba/lib/netlogon guest ok = yes writeable = no share modes = no # run a specific logon batch file per username logon script = %U.bat where the logon batch file is within in the above netlogon durectory a user login script as : \\starship /yes echo Mapping Drives ... net use H: /home net use K: \\starship\klasse10 /yes Upon logging on as the user (in WIN98SE), none of the drive mapping within the logon script has taken place. However manual mapping via the File explorer works fine Strange??? Thanks in advance for any advice. Regards Chee Seng __________________________________________________ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com