Link to home
Start Free TrialLog in
Avatar of jeffmsas
jeffmsas

asked on

Net use command prompting for a username and password

We've got a dos based program that we use to print reports from.  The program prints to LPT1 and we've got an XP machine that we are using as a print server.  The same XP machine is also used by our shipping/receiving clerk.  She is a member of our domain and has to login in each morning with her username angela, password:*****.

When I use the net use command in dos to capture the printer port, it prompts me for a username and password.  Here, I have to enter username: angela and password:***** to be able to capture the printer port.

I'm using the /persistent:yes command which tells dos to keep this mapping even after rebooting which it does, but it's not keeping the username and password entries.

Is there another way to capture the printer port without having to enter a username and password or does anyone know how to write a batch file that I can run at startup to capture the printer port and enter the username and password automatically?

Thanks in advance for any help!!!
Avatar of Chris Phillips
Chris Phillips
Flag of United Kingdom of Great Britain and Northern Ireland image

try this

net use whatever you use here /user:angela password
Avatar of jeffmsas
jeffmsas

ASKER

Doing something wrong.  I'm getting a system error 1326 (login failure: unknown username or bad password.  Here's what I'm using:

net use lpt1: \\print_2\fujitsu /persistent:yes /user:angela password:angelaf

Is this correct?
ASKER CERTIFIED SOLUTION
Avatar of Chris Phillips
Chris Phillips
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Sweet.  That worked!!!  Thanks a ton for the help!!!