[Samba] Logon script change failure

Wendell Dingus wendell at BISonline.com
Wed Mar 28 12:08:25 GMT 2007

Thanks, I've got basically the same type of thing configured now but the PCs were initially joined to the domain and have been signing on and receiving login scripts in the form of %U.bat for years.
Now though I modify smb.conf to point them to logon.bat and for some reason they continue to look for %U.bat and fail to process the logon.bat file. I've patched around this via symlinking all
possible usernames as {username}.bat to logon.bat in the netlogon directory. Frustrating to have to do this. I've tried stopping samba and removing .tdb files with no luck as well.

The other thing I had asked about, upgrading RedHat9 machines from Samba2 to Samba3 we've approached again. We've been successful in doing so, but not without some pain.

The section titled "Linux clients printing to Windows XP machine" at the end of this article is relevant: http://www.wlug.org.nz/SambaPrinting

The symlink of smb -> smbspool had to be made. Afterwards we could not add a printer pointing to a WinXP share via the graphical system-config-printer GUI tool but could using the text version,
system-config-printer-tui. Strange...

Also, we discovered that even if Samba was set to pass on print data raw, configuring the printer in CUPS with a printer driver appeared to cause the data received from the PC to have print driver
rules applied to it twice. We setup the printer as RAW in CUPS and it's working now. Also strange...

>Hi Wendel,
>I've this in my smb.conf, and it works for any M$ windows in my domain
>        logon path =
>        logon home =
>        logon script = logon.bat
>#       logon path = \\%L\profiles\%U
>#       logon home = \\%L\%U\.9xprofile
>#       logon drive = H:
>        comment = NLService
>        path = /var/lib/samba/netlogon/%U
>        valid users = %U
>        browseable = no
>        writeable = no
>In this configuration, each user will have their own logon.bat,  but of
>course you can change it to suit your needs.
>On 3/20/07, Wendell Dingus <wendell at bisonline.com> wrote:
>> I've got a bunch of servers which for a long time now have provided
>> domain logon scripts of the form %u.bat or %m.bat   I've recently
>> created a more capable logon script in Kixtart and have changed smb.conf
>> to launch it for all users as just logon.bat  So no more per-machine or
>> per-user scripts, everybody runs the same one, and inside it it does
>> per-machine and/or per-user things. At maybe 2/3rds of the sites this
>> works fine. For the others I'm getting errors in logs where the PC is
>> trying to find {machinename}.bat or {username}.bat and failing and
>> thusly *not* processing the logon script at all. As if the change in
>> smb.conf is being totally ignored. I've restarted samba, rebooted, etc..
>> In a few cases I've even tried renaming the entire /var/cache/samba/
>> directory and restarting samba so that it creates new copies of all the
>> .tdb's. I'm not certain that *all* instances of this are Samba2 but am
>> kind of suspecting they are. We've still got a bunch of customers with
>> RH9 and Samba 2.2.12  Hey it's doing what we ask and besides this latest
>> problem is working fine.
>> So, any suggestions how to get a bunch of WinXP PCs to start looking for
>> "logon.bat" instead of "%u.bat"? In testing I've simply symlinked
>> logon.bat to all the usernames in netlogon and that works, as a band-aid.
>> If Samba2 turns out to be the issue and an upgrade to Samba3 is to be
>> suggested, something else that's been a problem for me I could ask
>> about. I've tried the Samba3 RPMs provided at samba.org and they worked
>> great, except... The ability to define a printer in cups pointing to a
>> shared printer on a PC as  \\{PCNAME}\{SHARENAME} ceased to work and I
>> ended up having to revert back to Samba2. I'd love to resolve this one
>> as well and breathe a bit more life into the RH9 boxes we may not get
>> upgraded for a long time still. They're all stock RH9 with the Fedora
>> Legacy updates all applied.
>> # rpm -qa | grep -i 'samba\|cups' | sort
>> cups-1.1.17-
>> cups-devel-1.1.17-
>> cups-libs-1.1.17-
>> gimp-print-cups-4.2.4-5
>> qtcups-2.0-15
>> qtcups-devel-2.0-15
>> redhat-config-samba-1.0.4-1
>> samba-2.2.12-0.90.6.legacy
>> samba-client-2.2.12-0.90.6.legacy
>> samba-common-2.2.12-0.90.6.legacy
>> samba-swat-2.2.12-0.90.6.legacy
>> Thanks!
>> --
>> To unsubscribe from this list go to the following URL and read the
>> instructions:  https://lists.samba.org/mailman/listinfo/samba

More information about the samba mailing list