Robocopy – network path asking for username and password

Question : Robocopy – network path asking for username and password

i use robocopy for running backups.  for one particular path, it’s asking for a username and password.  here is the command in the batch file:
Rem Backup to duplicate MAS database
robocopy x:DBServerMon \qm_itMas90_on_qm_it /MIR /r:1 /w:1 >> c:logmon.txt

here is the result in the log:
Source : x:DBServerMon
Dest : \qm_itMas90_on_qm_it
Files : *.*
Options : *.* /S /E /PURGE /MIR /R:1 /W:1
ERROR 1326 (0x0000052E) Accessing Destination Directory \qm_itMas90_on_qm_it
Logon failure: unknown user name or bad password.

on the computer called qm_it, i have a folder called MAS90 which is set for sharing with Everyone (full permissions).  i named the share MAS90_on_qm_it so that it is not confused (there are other MAS90 folders on the network).  i dont think there’s a problem with the share because i can access it with the proper username and password.

do i need to set up a local account on qm_it that has the same username and password for the account on the computer that runs the backup?  or can i put something in the batch script which has the username and password?  other ideas?

thanks


Solution: Robocopy – network path asking for username and password

If the two aren’t in the same domain then I suggest you either.

1. Create a username / password same as the backup one on the other computer or
2. Connect in your script to the server first, i.e.

REM Authenticate to server
net use \serveripc$ /user:username password
robocopy …
REM Disconnect from server
net use \serveripc$ /delete