MSFN Forum: net use /user:domain\username password? - MSFN Forum

Jump to content


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

net use /user:domain\username password? doesn't work when i add the password in the net use line... Rate Topic: -----

#1 User is offline   realized 

  • Junior
  • Pip
  • Group: Members
  • Posts: 95
  • Joined: 04-August 05

Posted 03 April 2006 - 07:41 PM

When i "net use l: \\ip\share /user:domain\username" and press the enter key, it asks for my password, and i type it.. it works fine..

when i try to "net use l: \\ip\share /user:domain\username mypassword" or "net use l: \\ip\share mypassword /user:domain\username" i get an error.

The goal of this would be to map the drive in 1 line so i can use it in a batch script.

If i can do it in two lines via a batch script that would work also but i am not sure how.

Any help would be great!


#2 User is offline   fizban2 

  • MSFN Addict
  • Group: Super Moderator
  • Posts: 1,900
  • Joined: 14-April 05
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 03 April 2006 - 08:26 PM

what is the error it gives you? "bad username or password?"
net use Z: \\ip\share /user:domain\username password

that will work fine, just tested it in a batch with 3 shares, how about using the UNC equivelent of the IP?

#3 User is offline   jftuga 

  • Member
  • PipPip
  • Group: Members
  • Posts: 283
  • Joined: 27-October 05

Posted 04 April 2006 - 07:42 AM

Try putting you password inside of double-quotes. If that still dows not work, change the password to only be a combination of upper & lowercase letters and numbers.

-John

#4 User is offline   gpctexas 

  • Newbie
  • Group: Members
  • Posts: 14
  • Joined: 25-May 04

Posted 06 April 2006 - 09:46 PM

net use drvletter: \\share password /user:... is what I use and it works

#5 User is offline   Mordac85 

  • Jack of all trades, master of none
  • PipPipPip
  • Group: Members
  • Posts: 374
  • Joined: 26-January 04
  • OS:XP Pro x86
  • Country: Country Flag

Posted 10 April 2006 - 02:28 PM

I ran into the same problem when I had a caret (^) in my password. I recommend trying jftuga's suggestion to see if it's related to a special character being interpreted as something other than a string character.

#6 User is offline   eyeball 

  • Have you tried turning it off and on again?
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 1,150
  • Joined: 28-October 05

Posted 10 April 2006 - 04:53 PM

is this being used in a login script in a domain? or just a workgroup?

net use l: \\192.168.x.x /user:domain\administrator "password"

should work perfect for domain situations



and net use l: \\192.168.x.x /user\administrator "password"
that should work for workgroups
(assuming that the local admin password on the one you are mapping the drive from is the word "password")

let us know any errors you get
thanks

This post has been edited by eyeball: 10 April 2006 - 04:56 PM


#7 User is offline   joseluiscirelli 

  • Group: Members
  • Posts: 1
  • Joined: 13-February 08

Posted 13 February 2008 - 10:25 AM

Hi Mordac
the following is right:

net use l: \\192.168.x.x /user:domain\administrator "password"

if the password however contains a special character, try typing it twice, for example:

pw: "tr45#tr" should be "tr45##tr"

let us know

#8 User is offline   BillB 

  • Group: Members
  • Posts: 1
  • Joined: 18-June 08

Posted 18 June 2008 - 02:00 PM

I am trying to access a resource (map a hidden share) as a different user and password. I've tried all iterations including * of

net use Z: \\server\share$ /user:domain\username password

and get
System error 1219 has occurred.
Multiple connections to a server or shared resource by the same user, using more
than one user name, are not allowed. Disconnect all previous connections to the
server or shared resource and try again..


When I use net use without any password, it maps the drive, but I can't access it because I have no rights.

Is it significant that my password is password?

#9 User is offline   Scr1ptW1zard 

  • Junior
  • Pip
  • Group: Members
  • Posts: 67
  • Joined: 05-July 07

Posted 18 June 2008 - 08:13 PM

From the error message you provided, it sounds like you are already connected to the server under alternate credentials. Try disconnecting from the server prior to attempting to map a drive under the other credentials. The following batch file will disconnect all mapped drives, that are not in use, then perform the drive mapping under the given credentials.

 
@echo off

set "svrname=server"
set "share=share$"
set "usr=administrator"
set "pwd=password"

for /f "tokens=2" %%# in ('net use^|find /i "\\%svrname%"') do net use %%# /delete>nul

net use l: \\%svrname%\%share% /user:%usr% "%pwd%">nul
 


#10 User is offline   r0ckz 

  • Group: Members
  • Posts: 1
  • Joined: 07-August 09

Posted 07 August 2009 - 12:02 PM

View PostBillB, on Jun 18 2008, 03:00 PM, said:

I am trying to access a resource (map a hidden share) as a different user and password. I've tried all iterations including * of

net use Z: \\server\share$ /user:domain\username password

and get
System error 1219 has occurred.
Multiple connections to a server or shared resource by the same user, using more
than one user name, are not allowed. Disconnect all previous connections to the
server or shared resource and try again..


When I use net use without any password, it maps the drive, but I can't access it because I have no rights.

Is it significant that my password is password?


disconnect (Z) before:
net use Z: /delete

make mapping:
net use Z: \\server\folder$ /user:user@domain password

P.S: this command displays the password on the screen.

att,

#11 User is offline   Tripredacus 

  • K-Mart-ian Legend
  • Group: Super Moderator
  • Posts: 8,690
  • Joined: 28-April 06
  • OS:Server 2012
  • Country: Country Flag

Posted 07 August 2009 - 01:42 PM

View Postr0ckz, on Aug 7 2009, 02:02 PM, said:

View PostBillB, on Jun 18 2008, 03:00 PM, said:

I am trying to access a resource (map a hidden share) as a different user and password. I've tried all iterations including * of

net use Z: \\server\share$ /user:domain\username password

and get
System error 1219 has occurred.
Multiple connections to a server or shared resource by the same user, using more
than one user name, are not allowed. Disconnect all previous connections to the
server or shared resource and try again..


When I use net use without any password, it maps the drive, but I can't access it because I have no rights.

Is it significant that my password is password?


disconnect (Z) before:
net use Z: /delete

make mapping:
net use Z: \\server\folder$ /user:user@domain password

P.S: this command displays the password on the screen.

att,


Yes you will get this error if you try to make 2 different connections to a single resource using two different logins. There isn't any reason why you would need two logins. If you can't add the correct permissions to the first account or the second, create a new account that can access both items.

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2013 msfn.org
Privacy Policy