zephyr_hex (Megan)
asked on
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:\DBServer\Mon \\qm_it\Mas90_on_qm_it /MIR /r:1 /w:1 >> c:\log\mon.txt
here is the result in the log:
Source : x:\DBServer\Mon\
Dest : \\qm_it\Mas90_on_qm_it\
Files : *.*
Options : *.* /S /E /PURGE /MIR /R:1 /W:1
ERROR 1326 (0x0000052E) Accessing Destination Directory \\qm_it\Mas90_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
Rem Backup to duplicate MAS database
robocopy x:\DBServer\Mon \\qm_it\Mas90_on_qm_it /MIR /r:1 /w:1 >> c:\log\mon.txt
here is the result in the log:
Source : x:\DBServer\Mon\
Dest : \\qm_it\Mas90_on_qm_it\
Files : *.*
Options : *.* /S /E /PURGE /MIR /R:1 /W:1
ERROR 1326 (0x0000052E) Accessing Destination Directory \\qm_it\Mas90_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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
actually, i did not have Security set for Everyone (permissions were set for Everyone) ... i just did that. backup is set to attempt to run again tonight. will post results.
Zephyr,
Did you try using the local adminstrator account of the target system?
Did you try using the local adminstrator account of the target system?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
well here is what i would use
first of map the drive and then execute the code
Rem Mapping X
net use x: \\servername\c$ password /user:admin
robocopy x:\DBServer\Mon \qm_it\Mas90_on_qm_it /MIR /r:1 /w:1 >> c:\log\mon.txt
Rem Disconnect drive
net use x: /d
Also i was looking at you script
robocopy x:\DBServer\Mon \\qm_it\Mas90_on_qm_it /MIR /r:1 /w:1 >> c:\log\mon.txt
i think that you got a double \\ i dont that think it works if you do that but i could be wrong.
Let us know how that goes.
first of map the drive and then execute the code
Rem Mapping X
net use x: \\servername\c$ password /user:admin
robocopy x:\DBServer\Mon \qm_it\Mas90_on_qm_it /MIR /r:1 /w:1 >> c:\log\mon.txt
Rem Disconnect drive
net use x: /d
Also i was looking at you script
robocopy x:\DBServer\Mon \\qm_it\Mas90_on_qm_it /MIR /r:1 /w:1 >> c:\log\mon.txt
i think that you got a double \\ i dont that think it works if you do that but i could be wrong.
Let us know how that goes.
using ipc$ works regardless of admin rights which is why I use it
Steve
Steve
I imagine the \\ is because he is trying to copy to a server called qm_it , share called Mas90_on_qm_it. In any case authentication is probably all that is needed. See my post.
ASKER
yes dragon-it ... you are correct about the \\
changing the Security so that Everyone has access worked (i had added sharing/permissions but that wasn't enough)
dragon-it's suggestion also works.
changing the Security so that Everyone has access worked (i had added sharing/permissions but that wasn't enough)
dragon-it's suggestion also works.
ASKER
i have also set security so that Everyone has Full Control
what else needs to be done for permissions on the share?