Page 1 of 2 12>
Topic Options
#119519 - 2004-05-13 09:39 PM Printer permissions
burnsc Offline
Starting to like KiXtart

Registered: 2004-04-14
Posts: 171
Has anyone written a script to check the "print" permissions to a printer. I want to use this in a login script to install all the printers that a user has permissions to.

Thanks

Top
#119520 - 2004-05-13 09:46 PM Re: Printer permissions
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
well, if you have XP, you need to also check if the user has rights to install printers on local system.
_________________________
!

download KiXnet

Top
#119521 - 2004-05-13 09:52 PM Re: Printer permissions
burnsc Offline
Starting to like KiXtart

Registered: 2004-04-14
Posts: 171
Right now we are on NT. Which right would I check for this?

So far delploying printers by login script has not been a problem, but I have only done this on a limited user set. If it proves to be a problem, then I will begin deploying useing our main application deployment system(it has a user on the network that has full local admin rights it uses). Deploying this by Kixtart is easier though.

The print server is a Windows 2000 Server machine.


Edited by burnsc (2004-05-13 10:00 PM)

Top
#119522 - 2004-05-14 02:38 AM Re: Printer permissions
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11623
Loc: CA
Depends on how you're limiting access to the printers.

If you're using NT Groups you could use an If InGroup call to see if the user has rights to the printers.


Top
#119523 - 2004-05-14 03:09 AM Re: Printer permissions
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Sounds like an odd request. Why would you not know who has permission to what printers? Why would you want to map to EVERY printer a user has access to? Setup an INI file and use one of the printer mapping UDFs that read from the INI.

If you tried to map to a printer the user has no access to, would it not return an error? Would that then not tell you what printer the user has access to?
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#119524 - 2004-05-14 02:01 PM Re: Printer permissions
burnsc Offline
Starting to like KiXtart

Registered: 2004-04-14
Posts: 171
My original layout was to map useing ingroup and set permissions to that group rather than the user. Since we are looking at more of a group centric achitecture. I already have this method working.
BUT, just in case rights gets added by user in addition, what I wanted to do was truthfully resolver the rights and see if the user in question has 'print' level rights to the printer. I wanted to use that as the 'ultimate' mapping mechanism.

Top
#119525 - 2004-05-14 02:14 PM Re: Printer permissions
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
well, adding all the printers, should only add those to which the user has rights to.
like said...

but I wonder, you must have just a few printers or you are doing something weird.
I wouldn't like to add all of my printers to users.
and if some printers have restrictions, I do it via resource-groups
_________________________
!

download KiXnet

Top
#119526 - 2004-05-14 02:25 PM Re: Printer permissions
burnsc Offline
Starting to like KiXtart

Registered: 2004-04-14
Posts: 171
Well I am also makeing sure that my acl rights are proper for the printers.
Most of my users have access to no more than 3 printers. Except for engineers, they have access to around 10 printers.
Where is this add all printers option?

Top
#119527 - 2004-05-14 02:33 PM Re: Printer permissions
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
what add all printers option?
_________________________
!

download KiXnet

Top
#119528 - 2004-05-14 02:36 PM Re: Printer permissions
burnsc Offline
Starting to like KiXtart

Registered: 2004-04-14
Posts: 171
"well, adding all the printers, should only add those to which the user has rights to."
I was refering to that line from your reply. I was not sure if this was truely an option or a function. I did a search in the manual for "All Printers" and found nothing.

Top
#119529 - 2004-05-14 02:55 PM Re: Printer permissions
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
obviously, if you have printers you want to connect to and you said in your first post all, I refer to that same all.
well, now it looks like you haven't thought this through.

you still need to have the code to connect the printers.
so,
for each $printer in $whole_organization
$nul=addprinterconnection($printer)
next
_________________________
!

download KiXnet

Top
#119530 - 2004-05-14 02:58 PM Re: Printer permissions
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Couple of thoughts..

Maybe there is a switch in PrintMig.EXE?

Digging on MSDN, there maybe some light in Win32_Printer?

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/win32_printer.asp

Looking under Status, we some some mention of users, under status.

HTH,

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#119531 - 2004-05-14 03:05 PM Re: Printer permissions
burnsc Offline
Starting to like KiXtart

Registered: 2004-04-14
Posts: 171
Ok. I was thinking you was referring to a function somewhere that could read all the printers. My Bad.

All of the printers I am looking at are housed on one server. That is an important part that I forgot earlier. Sorry.

This is (psudocode), more like:
for each $printer on $server
If Print_priv($Printer)
$ret = addPrinterConnection($Printer)
EndIf
Next

Top
#119532 - 2004-05-14 03:18 PM Re: Printer permissions
burnsc Offline
Starting to like KiXtart

Registered: 2004-04-14
Posts: 171
Hmmm... I dont remember if there is a WMI client for WinNT. I will have to check that out.

Still looking for PrintMig.exe currently.

Top
#119533 - 2004-05-14 03:35 PM Re: Printer permissions
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
well, my pseudocode was what I ment.
well, not just pseudo but actually all you need.

like said, if you don't have access to the printer, it does not add it.
thus the permission check is not needed at all.
_________________________
!

download KiXnet

Top
#119534 - 2004-05-14 03:42 PM Re: Printer permissions
burnsc Offline
Starting to like KiXtart

Registered: 2004-04-14
Posts: 171
So, If I tried to add all the printers and the user did not have "print" access to that printer it would not add it. That is nice to know.

Thanks

Top
#119535 - 2004-05-14 06:33 PM Re: Printer permissions
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
PrintMig.EXE is part of the Resource Kit.

WMINT4.EXE is available from Microsoft for download.

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#119536 - 2004-05-14 07:08 PM Re: Printer permissions
burnsc Offline
Starting to like KiXtart

Registered: 2004-04-14
Posts: 171
Which resource kit? Windows 2000/XP?


Thanks

Top
#119537 - 2004-05-14 08:11 PM Re: Printer permissions
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
I see it in both 2000/2k3 Resource Kits.

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#119538 - 2004-05-15 11:12 PM Re: Printer permissions
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
Why even check the ACLs?

ADDPRINTERCONNECTION will fail if the user does not have access (e.g. print) rights on that printer, anyway.
_________________________
There are two types of vessels, submarines and targets.

Top
Page 1 of 2 12>


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 507 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.071 seconds in which 0.024 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org