[Samba] Windows 98 Netlogon Script
jay at metran.cx
Thu Apr 25 17:39:02 GMT 2002
> Hi - was wondering if Windows 98 Netlogon script generation was possible
> with samba - so as to be able to create custom netlogon scripts for users
> at boot time - as can be done with WinNT.
Using Samba as the PDC, you need to define a [netlogon] share, like this
path = /usr/local/samba/lib/netlogon
writable = no
browsable = no
and you need this in your [global] section:
; logon script used for all users,
; relative to [netlogon] share directory
logon script = logon.bat
(If you want different scripts for different users/computers/etc., you
can use the %variables to point to different logon scripts.) Then, create
the logon.bat script, using CRLF newlines (either use vi with the :se ff=dos
command, or create a standart Unix text file, and convert it with unix2dos).
If you want to use the script on Win 95/98/Me, you must use a .bat
extension. Not a .cmd extension, which only works on Win NT/2000/XP.
That's pretty much it. When Windows boots, you will see a MS-DOS
window pop open for a moment and run the script.
> So far I've been unsuccessful in getting 98 to use these.
> While we're at it - will 2000 or XP use them?
It works with all of Windows 95/98/Me and Windows NT/2000/XP. I have
them all running here, using the same logon script. Just as an example,
here is the script:
net use H: /home
net use T: \\toltec\test
net time \\toltec /set /yes
net use J: \\mixtec\jay
net use K: \\mixtec\d
The first line maps my home directory on the toltec Samba PDC as my home
directory. Line 3 performs network time synchronization with the PDC.
For that to work, you need the line
time server = yes
in your smb.conf [global] section. The other lines map shared directories
on my Samba servers to drive letters.
author, Using Samba (O'Reilly), 2nd edition
jayts at iname.com
More information about the samba