6

I'm trying to connect to a remote WebDAV server by mapping it as a drive using NET USE command.

NET USE * <domain> /user:<username> <password>

Executing this command gives the following error:

System error 1244 has occurred.

The operation being requested was not performed because the user has not been authenticated.

But when I execute just

NET USE * <domain>

It asks for username and then password.

Enter the user name for <domain>: 
Enter the password for <domain>:

Upon entering this I can now connect to the remote location and the drive is mapped.

What is causing this error? And how can I resolve it?

These commands will be automated, so I would like to pass the credentials as parameters instead of entering when prompted.

Nikhil
  • 163
  • 1
  • 5

1 Answers1

7

Two things: the password should precede the username, and the username should include the users domain name.

NET USE * <link> <password> /USER:<userdomain>\<user>
Larryc
  • 305
  • 1
  • 5
  • 1
    Thank you very much. I wasn't including the user domain name. I included it and it worked. I didn't have to change the order of username and password though. – Nikhil May 14 '19 at 05:35