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)

Uwe Keim
  • 39,551
  • 56
  • 175
  • 291
  • 1
    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. – Uwe Keim Mar 15 '12 at 08:36
  • 1
    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. – vonbrand Mar 05 '14 at 18:32
  • 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. – IPP Nerd Nov 29 '17 at 19:04

1 Answers1

0

Check out the field pNotifyName.

Uwe Keim
  • 39,551
  • 56
  • 175
  • 291
abRao
  • 2,787
  • 1
  • 25
  • 37