net use /user:domain\username password? doesn't work when i add the password in the net use line...
#1
Posted 03 April 2006 - 07:41 PM
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
Posted 03 April 2006 - 08:26 PM
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
Posted 04 April 2006 - 07:42 AM
-John
#4
Posted 06 April 2006 - 09:46 PM
#5
Posted 10 April 2006 - 02:28 PM
#6
Posted 10 April 2006 - 04:53 PM
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
Posted 13 February 2008 - 10:25 AM
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
Posted 18 June 2008 - 02:00 PM
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
Posted 18 June 2008 - 08:13 PM
@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
Posted 07 August 2009 - 12:02 PM
BillB, on Jun 18 2008, 03:00 PM, said:
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
Posted 07 August 2009 - 01:42 PM
r0ckz, on Aug 7 2009, 02:02 PM, said:
BillB, on Jun 18 2008, 03:00 PM, said:
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.



Help
Back to top









