[Samba] adding printers from netlogon script

John H Terpstra jht at samba.org
Tue Jan 13 19:32:30 GMT 2004


On Tue, 13 Jan 2004 juanjo.carel at ono.com wrote:

> I don't know the final answer BUT if you have something simmilar to a
> cyber-cafe LAN (I mean, users use all the computers, and maybe some
> users come back to login with the same name) then you have to install a
> printer only once in a computer, loging as the administrator and
> installing drivers. Then what users will have to do is JUST add the
> printer without installing. I know that it's possible to add a printer
> (already installed) in this kind of LAN, because I've seen it (not
> because of any Micro$oft KB). SO if you have the printer already
> installed you would have only got to put something like this line:
> net use \\printerserver\printer
> but not this one because I've not really tried and I know it's not this
> exact command for sure.

Correct. So long as the drive is already installed users can map printers
on logon.

- John T.


>
> > John H Terpstra wrote:
> > > On Tue, 13 Jan 2004, Andrew Gaffney wrote:
> > >
> > >
> > >>John H Terpstra wrote:
> > >>
> > >>>On Tue, 13 Jan 2004, Andrew Gaffney wrote:
> > >>>
> > >>>
> > >>>
> > >>>>John H Terpstra wrote:
> > >>>>
> > >>>>
> > >>>>>On Tue, 13 Jan 2004, Andrew Gaffney wrote:
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>>>Kurt Pfeifle wrote:
> > >>>>>>
> > >>>>>>
> > >>>>>>
> > >>>>>>>>[Samba] adding printers from netlogon script
> > >>>>>>>>Andrew Gaffney agaffney at technaut.darktalker.net
> > >>>>>>>>Tue Dec 9 20:10:07 GMT 2003
> > >>>>>>>>
> > >>>>>>>>
> > >>>>>>>>While this doesn't relate specifically to Samba, I need to
> > do this in
> > >>>>>>>>a netlogon .bat file in a Samba domain. In my network, I
> > have a
> > >>>>>>>>printer hooked to a JetDirect so that it is a TCP/IP
> > printer. Is there
> > >>>>>>>>a way I can automatically have this printer
> > mappe>>>>>>>>is logged on?
> > >>>>>>>>
> > >>>>>>>
> > >>>>>>>Test this command from a "DOS box":
> > >>>>>>>
> > >>>>>>> rundll32 printui.dll,PrintUIEntry /in /n
> > >>>>>>>\\printerserver\printersharename
> > >>>>>>>
> > >>>>>>>If it works, it can go into the logon script. (Of course
> > "printersharename">>>>>>>needs to exist on "printerserver" and
> > must have printer driver deposited on
> > >>>>>>>the server's [print$]-share for "point'n'print"
> > download...). And:
> > >>>>>>>
> > >>>>>>> rundll32 printui.dll,PrintUIEntriy /?
> > >>>>>>>
> > >>>>>>>will show up a full "man page" (hehe...)
> > >>>>>>>
> > >>>>>>>See also
> > >>>>>>>
> > >>>>>>> http://de.samba.org/samba/docs/man/printing.html#id2931140
> > >>>>>>
> > >>>>>>I used the above and some other references and pieced
> > togethere a few commands to auto-map
> > >>>>>>network printers at logon:
> > >>>>>>
> > >>>>>>REM rundll32 printui.dll,PrintUIEntry /ia /m "Ricoh Aficio
> > 200/250 PCL" /h "Intel" /v
> > >>>>>>"Windows 2000" /f %windir%\inf\ntprint.inf
> > >>>>>>rundll32 printui.dll,PrintUIEntry /if /b "Hallway Printer"
> > /f %windir%\inf\ntprint.inf /r
> > >>>>>>"\\skyline\jetdirect" /m "Ricoh Aficio 200/250 PCL"
> > >>>>>>
> > >>>>>>These work just fine...as long as the user is an
> > administrator. If the user logging on is
> > >>>>>>a regular user, which most are, it give me "Access denied"
> > when trying to map the printer,
> > >>>>>>on the same computer. These commands are being run from the
> > netlogon.bat script that runs
> > >>>>>>at logon. Am I missing something?
> > >>>>>
> > >>>>>
> > >>>>>Indeed you are. Windows NT/200x/XP requires you to explicitly
> > give the
> > >>>>>user the rights to make changes. If I am not mistaken, you
> > can get around
> > >>>>>this by adding the Domain Users group to the Local Power
> > Users group on
> > >>>>>each workstation.
> > >>>>
> > >>>>What rights does a normal user have by default? Can they map a
> > network drive?
> > >>>
> > >>>
> > >>>Default rights do not permit the user to change any system
> > settings, not
> > >>>even the time.
> > >>>
> > >>>Once logged in an authenticated network user can map a drive if
> > he/she has
> > >>>access to the target resouce. Since printers require
> > installation of
> > >>>driver files, this is not permitted by default user settings.
> > >>
> > >>Is there no way to add printers from a netlogon script without
> > the user being a Power User
> > >>or higher?
> > >
> > >
> > > That question is best answered by Microsoft. Have you checked the
> > > Microsoft Knowledge Base?
> > >
> > > My interpretation of your question is, "Is there no way to give
> > users a
> > > privilege they do not have without giving them the privilege
> > they need?"
> > >
> > > Logically, my answer is - No. No way. But my logic is flawed, so
> > do not
> > > take my answer as gospel.
> >
> > I hadn't even thought about consulting the MS KB, even though this
> > problem isn't
> > technically Samba related and is definately MS related and
> > involves using their tools ;)
> >
> > --
> > Andrew Gaffney
> > System Administrator
> > Skyline Aeronautics, LLC.
> > 776 North Bell Avenue
> > Chesterfield, MO 63005
> > 636-357-1548
> >
> > --
> > To unsubscribe from this list go to the following URL and read the
> > instructions:  http://lists.samba.org/mailman/listinfo/samba
> >
>
>

-- 
John H Terpstra
Email: jht at samba.org


More information about the samba mailing list