none
CUPS Printer added using command prompt is not working with authentication RRS feed

  • Question

  • Hi,

          I have a CUPS server setup in Linux.I want to add this printer to my windows programmatically. Manually I am able to add.By searching various forums I found the following command:

    rundll32 printui.dll,PrintUIEntry  /if /b "TestPrinter_With_Auth" /f %windir%\inf\ntprint.inf /r "https://username:pasword@ipp.devCups.com/printers/Printer" /m "HP Color LaserJet 2500 PCL6 Class Driver"

    I could install Printer using this command. But I couldn't Print to CUPS as it is not recognizing the credentials. I get access denied.

    Any suggestion to achieve this programmatically. 

    Thanks in Advance 

    Matt

    • Moved by Hart Wang Friday, November 24, 2017 1:16 AM
    Friday, November 17, 2017 5:21 AM

All replies

  • Hi Matt,

    Thank you for posting here.

    As far as I know that the CUPS is a modular printing system for Unix-like computer operating systems which allows a computer to act as a print server .  I think that the issue hasn't belonged the scope of current forum.

    Here is article about how to share printers between systems, be it between two GNU/Linux systems or between a GNU/Linux system and Microsoft Windows.

    About windows platform, please see Linux server - Windows client .

    Best Regards,

    Hart

    Note: This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; Therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there.


    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    • Edited by Hart Wang Friday, November 17, 2017 7:43 AM
    Friday, November 17, 2017 7:42 AM
  • Hi Hart and other experts,

     To add to my above condition after a lot of research and manually "Add Printer" I see that a registry entry is happening under [HKEY_CURRENT_USER\Printers\Inetnet Print Provider\Ports\https://username:pasword@ipp.devCups.com/printers/Printer].

    1. I export these registry details.

    2. I uninstall printer. This removed the port from above registry path as well.

    3. Now I use 'run32dll' command to install the internet printer.

    4. I didn't find an entry in the registry.

    5. I manually created port, username & password.

    6. This worked on my pc.

    Now When I tried the same on another PC, I could register port but when I print I get the same old issue(Access denied). Basically, there is an algorithm Microsoft is using to encrypt credentials. If anyone can guide me with this my 2 weeks problem can be solved. These binary credentials change each time when I do manual printer install.But this works only on the same pc. I believe there is an association with the machine in the encrypted algorithm. If I could create a similar entry in registry my issue gets resolved is what I am thinking.

    

    Thanks in Advance

    Matt





    • Edited by matnoy Tuesday, November 21, 2017 1:30 PM
    Tuesday, November 21, 2017 1:21 PM
  • Hi,

    Thank you for your feedback.

    Since the binary credentials cause the issue, I suggest that you should consult the author who generate the credential.

    Here is relevant document about how to create credential.

    How to: Create a Class Representing a Custom Binary Security Token

    Introduction to Code Signing

    I will move the case to off-topic forum.

    Best Regards,

    Hart


    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, November 22, 2017 8:35 AM
  • Hi Hart,

               Microsoft is encrypting the credentials & saving in the registry. 

    https://answers.microsoft.com/en-us/windows/forum/windows_10-security-winpc/ipp-printer-setting-configure-internet-port/887e9ce7-b489-45fa-80b0-eead50a8003a?rtAction=1512482665532

                In this case, author of credential has nothing to do. Microsoft is creating the registry entry.

    Regards

    Matt


    • Edited by matnoy Wednesday, December 6, 2017 10:29 AM grammerly
    Wednesday, December 6, 2017 10:28 AM
  • Any experts there who can guide me ?

    Thanks

    Matt

    Friday, December 8, 2017 6:38 AM