Integrating Win95 and Samba in detail (long)

Louis Mandelstam lma at
Mon Oct 6 08:18:24 GMT 1997

On 5 Oct 1997, Joerg Lenneis wrote:

> Make all the printers available on the Samba server and make sure they
> all have correct "printer driver = .." entries (these tell Windows
> what printer driver to install automatically if that printer is accessed). 

I've been thinking of trying to make this work using a PRINTER$ share -
i.e. manually - I didn't even know Samba had an option for this.

I don't run any NT here, but I can report that if you share a printer with
drivers not from the Win95 CD, other Win95 machines connecting to that
printer share will pick up the driver from it, so it is possible.

They seem to be getting the driver using the PRINTER$ share which points
to the windows\system directory, which is where the printer drivers live. 
(There are some security-related consequences which I wrote about in a
post to the Samba list several months ago).

Perhaps by putting all the printer drivers into a directory on the Samba
server, and sharing that directory as PRINTER$, will allow clients to get
the driver for printers not included on the Win95 CD.  Allmost all the
printers I need to support fall into this category - HP LaserJet 5Ns.

Presumably the Win95 client tries the PRINTER$ share on the printer's
server first, then it's Win95 install dir second.  (Or perhaps its own
SYSTEM directory between those two)

> As soon as a user doubleclicks on the name of a printer in the
> browsing window (assuming the printer has not been installed yet) a
> prompt window is shown with the question, if that printer should be
> installed on the system. After pressing "OK" the rest of the install
> is done without any more user intervention and the printer is available
> on that workstation from then onwards.

If I could automate this step, I'd be very pleased.

Another correspondent has posted details on the method I suggested
regarding letting all the clients connect to the same printer share, and
letting the server sort out what to do with the jobs (haven't read the
post properly yet - but I'm assuming this is the case)

For me, this seems to be the best way forward - it lets me do things at a
very convenient granularity.

> >  3. User profiles are in their home directories, allowing roaming.  Still
> >    have some work to do here, such as disabling the "You have not logged
> >    into this computer before...." message, and forcing a "Yes" instead,
> There is a way to do this. It is a hack not worth seeing the light of
> the high quality discussion going on here, but mail me anyway for
> details if you are interested.

Right now I'm interested in anything I can get - please ;-)

What I really need is to change the behaviour from comparing the registry
on the hard drive with the profile on the server, and using the newest one
(and creating one on the hard drive if none existed there) to always using
the profile, and paying no attention to a hard drive copy, or even whether
one exists or not.

> > 4. The desktop is the user's home directory itself.  It works here because
> >    these users only use Win95, so there aren't any non-PC/Win95 files in
> >    their homedirs.
> Did you actually get all the relevant entries in the registry to point
> at the users home directory as the desktop? Or does this work in the
> "ususal" way that the desktop is copied from/to the server at
> login/logout? If the former, I would be very interested how you did
> it.

Perhaps there are some problems I still have to run into, but I've done
some extensive testing with this and the applications we have here over
the last few months, and it seems to be working fine, and I didn't have a
hard time doing it at all.

I'm using system policies, and the default template provided with
poledit.exe has a user policy which lets you set the location of the
desktop, programs menu, start menu etc.  That's all I used.  What problems
are you experiencing?

Up to Friday, I'd been setting all system registry settings, as well as
user default settings by setting them in my install tree archive.  This is
proving to problematic because:

a) is very time consuming - I'm tuning registry entries, and every time I
   want to try something I need to test it, then update the registry on my
   "mastering" PC, create a new archive, and test it on another machine.
   Takes about 15 minutes and I loose state info from my thoughts while

b) Making changes later on, when the distributions is running on
   end-users' machines, will require a re-install - which I already have
   automated, but it's overkill for just changing registry entries.

I played a bit with setting an appropriate .REG file which is loaded after
login by feeding it to regedit during the login script.  Would have solved
my problem nicely, but I've found to my dismay that it doesn't work

Under some circumstances, I get an error box claiming the .reg file I'm
trying to import could not be found (no problem with path or permissions
etc and since it's in the netlogon share which is where the logon script
itself sits, this doesn't make sense).   Also, the login process sometimes
hangs (mprexe is reported not to be responding, and I have to hard reboot)

Now, from some very frustrating and time-consuming experimentation, it
would appear is if the above problems only occur if the user logging into
the machine is doing so for the first time, and/or doesn't already have a
profile stored on the server.  The problems don't occur reliably, but do
more often than not - in 100% identical cirumstances (well, you know what
I mean..)   This is driving me insane, so insane in fact that I'm actually
willing to consider using Microsoft's method of updating registry entries
from the server at login time - system policies.

I am in fact already using system policies to set things like control
panel restrictions, however to control the whole registry as I need, I
require a lot more than the default poledit.exe template offers, so on
Friday night I found myself once again reading the Win95 Resource Kit in
order to learn the tample format.  Add one more file format to the
collection :-(

It certainly looks like I'll be able to do what I need using the system
policies (i.e. setting an entire registry to be the way I need at login
time) but it does not seem as if the system was designed to handle static
registry entries, such as, say, Netscape's 'viewers' section.  Besides,
converting the .REG master I have now into a .POL I can't do directly
since .POL is a binary format, and I can only seem to write it using
poledit.exe, which I can only customize using .ADM template files.  It
would seem that my best chance would be to write a Unix script to convert
a .REG file into a .ADM file, using "DEFAULT" keywords to set values, then
using poledit.exe to convert it into a .POL file to save onto the server

I would really appreciate hints or comments on this, since no matter which
way I turn, it would seem that I have several work hours to wade through
before even knowing if that approach will work as hoped.


Louis Mandelstam              Tel +27 83 227-0712   Symphony  /|\   /|\
Linux systems integration       Research {   } {   }
Johannesburg, South Africa    mailto:louis at (Pty)Ltd {___} {___}

More information about the samba mailing list