Getting the real user who printed a document to an IPP printer
Asked Answered
C

1

11

Currently, I'm trying to programmatically get the name of the user that started a printing job to a mapped IPP printer.

I'm struggeling with the fact that the JOB_INFO_2 structure's member pUserName contains the name of the user that is being used to connect to the IPP printer and not the user that started the print job locally.

To illustrate:

enter image description here

Looking at both, the Microsoft's PrintMon tool and the printer queue they both show the same:

enter image description here

and

enter image description here

They show "uwe_keim" as the user that is the owner, although another user started the print job.

This seems to come from the connecting credentials of the user that is being used to authenticate with the IPP printer:

enter image description here

I'm really clueless on how/whether there is a chance to get the actual user that started a print job (I need this for an app that runs in a multi-user terminal environment).

So to summarize my question:

How to get the name of the user who started a print job? (in contrast to the name of the user who owns a print job)

Caralie answered 15/3, 2012 at 7:38 Comment(3)
To the voters to close: In my opinion this is a programming question, although the screenshots are from end-user applications. I want to know the functions/methods to call to get the user.Caralie
Just be clear that whoever is on the other end has complete control over that machine, ouside of your view. They could be lying through their teeth about who is doing the printing.Convulsive
I assume all users have the same printer setup using a generic print-server account for the same printer. It looks like the PrintMon can only access ipp authentication data. So I guess your setup should be changed. Each user should authenticate separately at the level of the ipp print server. Then you should get different usernames.Disaffiliate
S
0

Check out the field pNotifyName.

Sharma answered 18/3, 2012 at 8:24 Comment(1)
Thanks, I've just tried this. Unfortunately this value is always NULL in my scenario.Caralie

© 2022 - 2024 — McMap. All rights reserved.