NET USE in login script Windows server 2003

Posted on 2004-12-01
Last Modified: 2008-01-09
I'm trying to troubleshoot problems with login script windows server 2003.  Script is as follows:

REM Login Script PL Jacques Dec 1, 2004
echo on

net use F: /DELETE
net use F: \\IHR_SERVER\FRS

ifmember fd_grp
if errorlevel 1 goto fd_grp

ifmember sales_grp
if errorlevel 1 goto sales_grp

ifmember acct_grp
if errorlevel 1 goto acct_grp

goto end

net use lpt1 /delete
net use lpt2 /delete
net use lpt1: \\nightaudit\fdlaser
goto end

net use lpt1 /delete
net use lpt2 /delete
net use lpt1: \\conferencesvc\reslaser
net use lpt2: \\nightaudit\fdlaser
goto end

net use lpt1 /delete
net use lpt2 /delete
net use lpt1: \\acct\acctlaser
net use lpt2: \\nightaudit\fdlaser
goto end


We're running a DOS app that only prints to LPT1 or LPT2 so I have to do net use command to redirect printing in different departments.  I have two problems.  First I'm getting an error about IFMEMBER not being recognized as and internal or external command.  I downloaded the Server 2003 resource kit and installed it on the server 2003 machine.  Is there more?

Secondly the net use command map drives works OK.  But, when I try to do net use to redirect some the shared printer on one of the computers, it asks me to authenticate to that computer.  Let me reiterate, it asks me to authenticate to the computer not to the domain.  No matter what I enter, it does not work.  If I log out and log back in as Administrator with local and domain administrative rights it works.  What rights are required for this to work?
Question by:dbldiamond
    1 Comment
    LVL 82

    Accepted Solution

    For the ifmember.exe to work, you'll have to copy it from the installation folder into the netlogon share; it should work then (assuming this is a "profile" logon script).
    As for the "net use lpt" problem, I'm assuming you're using XP clients? Then you're fighting against XP's tightened security; by default, users can't map over an existing hardware port:
    Non-Administrators Cannot Remap an LPT Port to a Network Printer

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Suggested Solutions

    FIPS stands for the Federal Information Processing Standardisation and FIPS 140-2 is a collection of standards that are generically associated with hardware and software cryptography. In most cases, people can refer to this as the method of encrypti…
    Downtime reduced, data recovered by utilizing an Experts Exchange Business Account Challenge The United States Marine Corps employs more than 200,000 active-duty Marines with operations in four continents, all requiring complex networking system…
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    760 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

    Need Help in Real-Time?

    Connect with top rated Experts

    6 Experts available now in Live!

    Get 1:1 Help Now