LPT1 Access is Denied

Posted on 2013-10-17
Medium Priority
Last Modified: 2013-10-24
I have a windows 7 client computer with a printer that uses lpt1. The client computer connects to a remote desktop server to run applications. The remote desktop server has an lpt1 mapping created via a login script with the below line.

net use lpt1 \\clientsystem\printer /persistent:yes

the lpt1 port is established and I know this by running net use by itself.

the server is windows server 2008R2

when attempting to print I receive the error message "Access Is Denied"

The client system is in a different network than  the server. If I connect my computer to the rdp server with a different lpt printer it works and the job prints. I would use a command such as

net use lpt1 \\mylaptop\myprinter

The only difference is the networks.

I have verified that firewalls are off on all computers. I can ping in any direction. I have turned off all antivirus. the LPT printer is shared the same on way on both computers with the same security settings.

Please help with your suggestions.
Question by:kwoznica732
LVL 18

Assisted Solution

by:Emmanuel Adebayo
Emmanuel Adebayo earned 1500 total points
ID: 39581405
Is the use in the Print Operators group.?

You can disable the LPT1 in Device Manager makes it a logical port (such as LPT2 and LPT3) instead of a physical port.

Also, it might be caused by smb authentication
LVL 12

Expert Comment

ID: 39584030
You do NOT want to make this user a member of the Print Operators group, unless they are a designated IT Administrator within your organization.

Members of this group, among other things, are able to log in to any server or Domain Controller on your network and shut them down.


Expert Comment

ID: 39584151
The steps below will allow the Windows 2008 server to have a printer defined on it to print to the Windows 7 PC's attached printer via Windows apps or LPT1.

There will be 5 basic steps to resolve the issue
    1- Setup the printer on the Windows 7 PC
    2- Install LPD print service on the Windows 7 PC hosting the printer
    3- Install LPR port monitor on the RDP Server from which you want to print
    4- Setup a Windows printer on the same RDP Server from step 3, but use LPR printing.
    5- Enable printer pooling on the newly created printer from Step 4 (Allows LPT1 printing to the new printer)

Step 1 - Setup the printer on the Windows 7 workstation and make sure it prints successfully - Done

Step 2 - Enable LPD on a Windows 7 PC hosting the printer (This will allow you to have another way to get the jobs into the print queue)
    a- GoTo Start and type appwiz.cpl in the search box and hit Enter
    b- Click on Turn Windows features on and off in the left pane
    c- Click the + sign next to Print and Document Services
    d- Enable the feature for LPD Print Service
    e- Click OK
    f- You may be prompted to Restart

Step 3 - Enable LPR port monitor on the Windows 2008 server
  If Server Manager loads after logging in, jump to item b, otherwise...
    a- GoTo Start and type servermanager.msc in the search box and hit Enter
    b- Highlight "Features" in the left pane
    c- Click on Add Features on the right
    d- Enable the LPR Port Monitor
    e- Click on Next
    f- Click Install
    g- Click Close

Step 4 - Setup a printer to use LPR on the Windows 2008 server
    a- GoTo Start | Devices and Printers
    b- Add a Printer
    c- Add a Local Printer or network printer as Administrator
    d- Add a local printer
    e- Select Create a new Port
    f- Select LPR Port from the drop down menu
    g- Click Next
    h- In the top field ("Name or address of server providing LPD"), enter the TCP/IP address of the Windows 7 PC hosting the printer  
    i- In the bottom field ("Name of printer or print queue on that server"), enter the name of the desired Windows printer on the Windows 7 PC
    j- Click OK
    k- Continue onward with a normal Windows printer setup by picking the desired print driver and naming the printer until finished
         Note: Sharing the printer is not necessary during the setup process
    l- Open the newly created printer's properties
    m- GoTo the Ports tab
    n- Uncheck Enable Bidirectional support if it's enabled
    o- Click Apply
    p- Click on the General tab
    q- Send a test page
    r- Click OK to close
Step 5 - Enable printer pooling for LPT1 on the new printer on the Windows 2008 server   ***(Delete the persistent mapping of LPT1 if you have not already done so, then continue)***
  1) Go to the Properties of the Windows printer created in Step 4
  2) Click on the Ports tab
  3) Click the box next to Enable Printer Pooling at the bottom left
  4) Look back up to the available port selection window at the top and scroll up to the top (Do not uncheck your existing port)
  5) When you see LPT1, click the box to the left of it
  6) Click on Apply
  7) Click on Ok to exit

    1- This methodology will allow the desired Windows Server to print to the printer on the Windows 7 PC without having to modify the permissions or use a guest account.
    2- LPR uses 11 ports by default so if a sending server needs to send more than 11 print jobs within a minute or two, let me know and I can explain how to increase the # of available ports. Without the change there would be a delay on the 12th print job of a couple minutes, but it would still print.  I only mention this because if you need to print lots of small jobs in a short period of time, it will be necessary.  I have found that this is not necessary for 97% of all of the setups that I have encountered.
    3- Printer Pooling overview - If the printer is setup in Windows, you can also use it in DOS.  We just enable printer pooling on that printer to add LPT1. Anything sent to LPT1 in DOS will go through the Windows printer to the destination, regardless of whether that destination is local or networked.

Accepted Solution

kwoznica732 earned 0 total points
ID: 39585058
It turned out to be SMB. I disabled SMB version 2 on both the server and client in the registry which forces SMB version 1.
Why LPT1 needs SMB v1 when both win7 and server 2008R2 support SMBv2, I have no idea. Thanks all for your suggestions.

Using the Regedit to disable SMB2 on the server (I used this one).
        1.Run "regedit" on Windows Server 2008 based computer.
        2.Expand and locate the sub tree as follows.
        3.Add a new REG_DWORD key with the name of "Smb2" (without quotation mark)
        Value name: Smb2
        Value type: REG_DWORD
            0 = disabled
            1 = enabled
        4.Set the value to 0 to disable SMB 2.0, or set it to 1 to re-enable SMB 2.0.
        5.Reboot the server.

Author Closing Comment

ID: 39596600
I discovered the solution before the experts started posting.

Featured Post

Train for your Pen Testing Engineer Certification

Enroll today in this bundle of courses to gain experience in the logistics of pen testing, Linux fundamentals, vulnerability assessments, detecting live systems, and more! This series, valued at $3,000, is free for Premium members, Team Accounts, and Qualified Experts.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

When you try to share a printer , you may receive one of the following error messages. Error message when you use the Add Printer Wizard to share a printer: Windows could not share your printer. Operation could not be completed (Error 0x000006…
For anyone that has accidentally used newSID with Server 2008 R2 (like I did) and hasn't been able to get the server running again because you were unlucky (as I was) and had no backups - I was able to get things working by doing a Registry Hive rec…
This Micro Tutorial will teach you the basics of configuring your computer to improve its speed. It will also teach you how to disable programs that are running in the background simultaneously. This will be demonstrated using Windows 7 operating…
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…

619 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question