Has anyone solved the double-hop issue with Ansible and Windows clients?Useful Command-line Commands on Windowsansible: why is the file module skipping?How to encrypt binary files in Ansible?How to fetch multiple files from remote machine to local with AnsibleBest practice for creating Ansible usersWhere does ansible package module search for given package name?Deploying a windows machine with ansible and sysprepIssue with Ansible wait_for module - how to reliably check if the VM is up and running?How to copy a 1 GB file using ansible to remote machine as different remote user and passwordWhat does Ansible push to the remote host?
What is the olden name for sideburns?
Do we or do we not observe (measure) superpositions all the time?
How to convert object fill in to fine lines?
Can a US President have someone sent to prison?
Does the UK have a written constitution?
How should I behave to assure my friends that I am not after their money?
In F1 classification, what is ON?
can’t run a function against EXEC
How was film developed in the late 1920s?
Do I have to roll to maintain concentration if a target other than me who is affected by my concentration spell takes damage?
How can I check type T is among parameter pack Ts... in C++?
Can I use the PWM pins as regular digital input/output pins?
Drawing game tree - Tikz or Forest?
Transitive action of a discrete group on a compact space
Bash echo $-1 prints hb1. Why?
In the context of a differentiator circuit, what is a “current-sensing resistor”?
Math PhD in US vs Master + PhD in Europe
When is it ok to add filler to a story?
How would a order of Monks that renounce their names communicate effectively?
Generate and graph the Recamán Sequence
Why is Madam Hooch not a professor?
Does a centaur PC also count as being mounted?
How do accents of a whole town drift?
How well known and how commonly used was Huffman coding in 1979?
Has anyone solved the double-hop issue with Ansible and Windows clients?
Useful Command-line Commands on Windowsansible: why is the file module skipping?How to encrypt binary files in Ansible?How to fetch multiple files from remote machine to local with AnsibleBest practice for creating Ansible usersWhere does ansible package module search for given package name?Deploying a windows machine with ansible and sysprepIssue with Ansible wait_for module - how to reliably check if the VM is up and running?How to copy a 1 GB file using ansible to remote machine as different remote user and passwordWhat does Ansible push to the remote host?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
My situation: I have an Ansible server, a Tower server, a Windows file server, and a Windows client. Through Ansible, I want to tell the Windows client to copy some files from the Windows file server. After having trouble finding a playbook module that would allow me to copy files from a remote host to a client machine, I decided to try a series of different Powershell scripts and cmdlets to perform the simple file copy.
I appear to be running into the double hop problem and since an Ansible / Linux server is the originating machine in this scenario- and I don't have control of that machine- I was wondering if anyone has solved this problem and managed to get scripts to get past the double hop. Alternatively, if anyone knows of an Ansible module that can copy files from a remote host to a client host, that would be of interest, too. If I need to submit a ticket for the Ansible owners to do something, or if I need to do something, or if I should give up, whatever the case, thanks for your time!
windows powershell ansible winrm
|
show 2 more comments
My situation: I have an Ansible server, a Tower server, a Windows file server, and a Windows client. Through Ansible, I want to tell the Windows client to copy some files from the Windows file server. After having trouble finding a playbook module that would allow me to copy files from a remote host to a client machine, I decided to try a series of different Powershell scripts and cmdlets to perform the simple file copy.
I appear to be running into the double hop problem and since an Ansible / Linux server is the originating machine in this scenario- and I don't have control of that machine- I was wondering if anyone has solved this problem and managed to get scripts to get past the double hop. Alternatively, if anyone knows of an Ansible module that can copy files from a remote host to a client host, that would be of interest, too. If I need to submit a ticket for the Ansible owners to do something, or if I need to do something, or if I should give up, whatever the case, thanks for your time!
windows powershell ansible winrm
have you tried enabling kerberos delegation on the windows client computer? is everyone a domain joined machine? what about ansible...do you use kerberos or password authentication to winrm?
– Jacob Evans
Mar 22 '17 at 0:11
Why don't you mount the a file share from the file server on the target system and usewin_copy?
– Henrik Pingel
Mar 22 '17 at 6:58
@JacobEvans, I knew I left out an important detail: In this scenario, I don't have any AD member machines; only workgroup machines. The file share mount idea... I will definitely try right now.
– DrewJenseric
Mar 22 '17 at 17:33
Looks like attempting to mount a share still requires that credentials be provided.
– DrewJenseric
Mar 22 '17 at 17:57
You don't have to mount the share to use it in PowerShell. You can access it directly through UNC path.copy-item \serversharefile.ext $destinationHowever, the account doing the copying needs permissions. Not sure if this helps, so that's why it's a comment instead of an answer.
– Xalorous
Apr 28 '17 at 22:37
|
show 2 more comments
My situation: I have an Ansible server, a Tower server, a Windows file server, and a Windows client. Through Ansible, I want to tell the Windows client to copy some files from the Windows file server. After having trouble finding a playbook module that would allow me to copy files from a remote host to a client machine, I decided to try a series of different Powershell scripts and cmdlets to perform the simple file copy.
I appear to be running into the double hop problem and since an Ansible / Linux server is the originating machine in this scenario- and I don't have control of that machine- I was wondering if anyone has solved this problem and managed to get scripts to get past the double hop. Alternatively, if anyone knows of an Ansible module that can copy files from a remote host to a client host, that would be of interest, too. If I need to submit a ticket for the Ansible owners to do something, or if I need to do something, or if I should give up, whatever the case, thanks for your time!
windows powershell ansible winrm
My situation: I have an Ansible server, a Tower server, a Windows file server, and a Windows client. Through Ansible, I want to tell the Windows client to copy some files from the Windows file server. After having trouble finding a playbook module that would allow me to copy files from a remote host to a client machine, I decided to try a series of different Powershell scripts and cmdlets to perform the simple file copy.
I appear to be running into the double hop problem and since an Ansible / Linux server is the originating machine in this scenario- and I don't have control of that machine- I was wondering if anyone has solved this problem and managed to get scripts to get past the double hop. Alternatively, if anyone knows of an Ansible module that can copy files from a remote host to a client host, that would be of interest, too. If I need to submit a ticket for the Ansible owners to do something, or if I need to do something, or if I should give up, whatever the case, thanks for your time!
windows powershell ansible winrm
windows powershell ansible winrm
asked Mar 21 '17 at 21:53
DrewJensericDrewJenseric
83 bronze badges
83 bronze badges
have you tried enabling kerberos delegation on the windows client computer? is everyone a domain joined machine? what about ansible...do you use kerberos or password authentication to winrm?
– Jacob Evans
Mar 22 '17 at 0:11
Why don't you mount the a file share from the file server on the target system and usewin_copy?
– Henrik Pingel
Mar 22 '17 at 6:58
@JacobEvans, I knew I left out an important detail: In this scenario, I don't have any AD member machines; only workgroup machines. The file share mount idea... I will definitely try right now.
– DrewJenseric
Mar 22 '17 at 17:33
Looks like attempting to mount a share still requires that credentials be provided.
– DrewJenseric
Mar 22 '17 at 17:57
You don't have to mount the share to use it in PowerShell. You can access it directly through UNC path.copy-item \serversharefile.ext $destinationHowever, the account doing the copying needs permissions. Not sure if this helps, so that's why it's a comment instead of an answer.
– Xalorous
Apr 28 '17 at 22:37
|
show 2 more comments
have you tried enabling kerberos delegation on the windows client computer? is everyone a domain joined machine? what about ansible...do you use kerberos or password authentication to winrm?
– Jacob Evans
Mar 22 '17 at 0:11
Why don't you mount the a file share from the file server on the target system and usewin_copy?
– Henrik Pingel
Mar 22 '17 at 6:58
@JacobEvans, I knew I left out an important detail: In this scenario, I don't have any AD member machines; only workgroup machines. The file share mount idea... I will definitely try right now.
– DrewJenseric
Mar 22 '17 at 17:33
Looks like attempting to mount a share still requires that credentials be provided.
– DrewJenseric
Mar 22 '17 at 17:57
You don't have to mount the share to use it in PowerShell. You can access it directly through UNC path.copy-item \serversharefile.ext $destinationHowever, the account doing the copying needs permissions. Not sure if this helps, so that's why it's a comment instead of an answer.
– Xalorous
Apr 28 '17 at 22:37
have you tried enabling kerberos delegation on the windows client computer? is everyone a domain joined machine? what about ansible...do you use kerberos or password authentication to winrm?
– Jacob Evans
Mar 22 '17 at 0:11
have you tried enabling kerberos delegation on the windows client computer? is everyone a domain joined machine? what about ansible...do you use kerberos or password authentication to winrm?
– Jacob Evans
Mar 22 '17 at 0:11
Why don't you mount the a file share from the file server on the target system and use
win_copy?– Henrik Pingel
Mar 22 '17 at 6:58
Why don't you mount the a file share from the file server on the target system and use
win_copy?– Henrik Pingel
Mar 22 '17 at 6:58
@JacobEvans, I knew I left out an important detail: In this scenario, I don't have any AD member machines; only workgroup machines. The file share mount idea... I will definitely try right now.
– DrewJenseric
Mar 22 '17 at 17:33
@JacobEvans, I knew I left out an important detail: In this scenario, I don't have any AD member machines; only workgroup machines. The file share mount idea... I will definitely try right now.
– DrewJenseric
Mar 22 '17 at 17:33
Looks like attempting to mount a share still requires that credentials be provided.
– DrewJenseric
Mar 22 '17 at 17:57
Looks like attempting to mount a share still requires that credentials be provided.
– DrewJenseric
Mar 22 '17 at 17:57
You don't have to mount the share to use it in PowerShell. You can access it directly through UNC path.
copy-item \serversharefile.ext $destination However, the account doing the copying needs permissions. Not sure if this helps, so that's why it's a comment instead of an answer.– Xalorous
Apr 28 '17 at 22:37
You don't have to mount the share to use it in PowerShell. You can access it directly through UNC path.
copy-item \serversharefile.ext $destination However, the account doing the copying needs permissions. Not sure if this helps, so that's why it's a comment instead of an answer.– Xalorous
Apr 28 '17 at 22:37
|
show 2 more comments
2 Answers
2
active
oldest
votes
While this is an absolute hack, and I'm sure you've already moved on from this problem, one workaround is to create a scheduled task (using the Windows schtasks command) and execute it immediately to perform the copy. The scheduled task will run in the proper context and be able to copy from the server without encountering the double-hop issue, because it originates from the client machine. I'm sure there's an actual Ansible-level solution to this problem, but this is my current workaround.
Your higher level script can use psutil or something similar to monitor the task and not return until the scheduled task has completed.
Here's an helper script I wrote in Python for accomplishing this:
# run_as_scheduled_task.py
import psutil
import subprocess
import time
import sys
to_match = sys.argv[1]
to_run = ' '.join(sys.argv[2:])
print("Running the following command as immediate scheduled task:")
print(to_run)
print("Will return only once process matching wildcard "0" is no longer found".format(to_match))
subprocess.call('C:\Windows\System32\schtasks /delete /f /tn "QUICKSCHTASK"', stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
subprocess.call('C:\Windows\System32\schtasks /create /tn "QUICKSCHTASK" /tr "0" /sc ONCE /st 00:00'.format(to_run), stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
subprocess.call('C:\Windows\System32\schtasks /run /tn "QUICKSCHTASK"', stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
time.sleep(0.1)
def processDead(proc):
print("Process is now dead - 0".format(proc))
subprocess.call('C:\Windows\System32\schtasks /delete /f /tn "QUICKSCHTASK"', stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
process = None
for proc in psutil.process_iter():
if to_match in proc.name():
gone, still_alive = psutil.wait_procs([proc], None, processDead)
break
You can call this from a higher level script to perform operations and circumvent the double hop. Very hacky, but it works. Example usage of script would be:
start /wait py -3 run_as_scheduled_task.py 'robocopy' 'robocopy SOURCE DEST'
An alternative method is to call psexec on the target machine with the -s flag to use the System account. More information on that here: https://stackoverflow.com/questions/15242248/double-hop-access-to-copy-files-without-credssp
1
I have indeed moved on- turns out the server admin team found they can enable CredSSP on the Ansible server- but this solution is brilliant. Thank you.
– DrewJenseric
Apr 26 '17 at 22:58
add a comment |
system account will access only resource inside local system with highest privileges. How can it access another server in UNC.
And if we create Sch taks with a different user and run it from ansible....it is creating with ansible account and sch tasks doesn't run as "the option selected by default is RUN only when user logged in"
I tried with the above options in my case and noe of them worked...I think only Credssp at ansible config level is the solution.
– srinivas
Jun 10 at 7:41
Can you please let me know if I am miossing anything
– srinivas
Jun 10 at 7:42
it's not clear what you answered here. Please put more effort into making it clear.
– asdmin
Jun 10 at 11:54
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "2"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f839761%2fhas-anyone-solved-the-double-hop-issue-with-ansible-and-windows-clients%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
While this is an absolute hack, and I'm sure you've already moved on from this problem, one workaround is to create a scheduled task (using the Windows schtasks command) and execute it immediately to perform the copy. The scheduled task will run in the proper context and be able to copy from the server without encountering the double-hop issue, because it originates from the client machine. I'm sure there's an actual Ansible-level solution to this problem, but this is my current workaround.
Your higher level script can use psutil or something similar to monitor the task and not return until the scheduled task has completed.
Here's an helper script I wrote in Python for accomplishing this:
# run_as_scheduled_task.py
import psutil
import subprocess
import time
import sys
to_match = sys.argv[1]
to_run = ' '.join(sys.argv[2:])
print("Running the following command as immediate scheduled task:")
print(to_run)
print("Will return only once process matching wildcard "0" is no longer found".format(to_match))
subprocess.call('C:\Windows\System32\schtasks /delete /f /tn "QUICKSCHTASK"', stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
subprocess.call('C:\Windows\System32\schtasks /create /tn "QUICKSCHTASK" /tr "0" /sc ONCE /st 00:00'.format(to_run), stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
subprocess.call('C:\Windows\System32\schtasks /run /tn "QUICKSCHTASK"', stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
time.sleep(0.1)
def processDead(proc):
print("Process is now dead - 0".format(proc))
subprocess.call('C:\Windows\System32\schtasks /delete /f /tn "QUICKSCHTASK"', stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
process = None
for proc in psutil.process_iter():
if to_match in proc.name():
gone, still_alive = psutil.wait_procs([proc], None, processDead)
break
You can call this from a higher level script to perform operations and circumvent the double hop. Very hacky, but it works. Example usage of script would be:
start /wait py -3 run_as_scheduled_task.py 'robocopy' 'robocopy SOURCE DEST'
An alternative method is to call psexec on the target machine with the -s flag to use the System account. More information on that here: https://stackoverflow.com/questions/15242248/double-hop-access-to-copy-files-without-credssp
1
I have indeed moved on- turns out the server admin team found they can enable CredSSP on the Ansible server- but this solution is brilliant. Thank you.
– DrewJenseric
Apr 26 '17 at 22:58
add a comment |
While this is an absolute hack, and I'm sure you've already moved on from this problem, one workaround is to create a scheduled task (using the Windows schtasks command) and execute it immediately to perform the copy. The scheduled task will run in the proper context and be able to copy from the server without encountering the double-hop issue, because it originates from the client machine. I'm sure there's an actual Ansible-level solution to this problem, but this is my current workaround.
Your higher level script can use psutil or something similar to monitor the task and not return until the scheduled task has completed.
Here's an helper script I wrote in Python for accomplishing this:
# run_as_scheduled_task.py
import psutil
import subprocess
import time
import sys
to_match = sys.argv[1]
to_run = ' '.join(sys.argv[2:])
print("Running the following command as immediate scheduled task:")
print(to_run)
print("Will return only once process matching wildcard "0" is no longer found".format(to_match))
subprocess.call('C:\Windows\System32\schtasks /delete /f /tn "QUICKSCHTASK"', stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
subprocess.call('C:\Windows\System32\schtasks /create /tn "QUICKSCHTASK" /tr "0" /sc ONCE /st 00:00'.format(to_run), stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
subprocess.call('C:\Windows\System32\schtasks /run /tn "QUICKSCHTASK"', stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
time.sleep(0.1)
def processDead(proc):
print("Process is now dead - 0".format(proc))
subprocess.call('C:\Windows\System32\schtasks /delete /f /tn "QUICKSCHTASK"', stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
process = None
for proc in psutil.process_iter():
if to_match in proc.name():
gone, still_alive = psutil.wait_procs([proc], None, processDead)
break
You can call this from a higher level script to perform operations and circumvent the double hop. Very hacky, but it works. Example usage of script would be:
start /wait py -3 run_as_scheduled_task.py 'robocopy' 'robocopy SOURCE DEST'
An alternative method is to call psexec on the target machine with the -s flag to use the System account. More information on that here: https://stackoverflow.com/questions/15242248/double-hop-access-to-copy-files-without-credssp
1
I have indeed moved on- turns out the server admin team found they can enable CredSSP on the Ansible server- but this solution is brilliant. Thank you.
– DrewJenseric
Apr 26 '17 at 22:58
add a comment |
While this is an absolute hack, and I'm sure you've already moved on from this problem, one workaround is to create a scheduled task (using the Windows schtasks command) and execute it immediately to perform the copy. The scheduled task will run in the proper context and be able to copy from the server without encountering the double-hop issue, because it originates from the client machine. I'm sure there's an actual Ansible-level solution to this problem, but this is my current workaround.
Your higher level script can use psutil or something similar to monitor the task and not return until the scheduled task has completed.
Here's an helper script I wrote in Python for accomplishing this:
# run_as_scheduled_task.py
import psutil
import subprocess
import time
import sys
to_match = sys.argv[1]
to_run = ' '.join(sys.argv[2:])
print("Running the following command as immediate scheduled task:")
print(to_run)
print("Will return only once process matching wildcard "0" is no longer found".format(to_match))
subprocess.call('C:\Windows\System32\schtasks /delete /f /tn "QUICKSCHTASK"', stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
subprocess.call('C:\Windows\System32\schtasks /create /tn "QUICKSCHTASK" /tr "0" /sc ONCE /st 00:00'.format(to_run), stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
subprocess.call('C:\Windows\System32\schtasks /run /tn "QUICKSCHTASK"', stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
time.sleep(0.1)
def processDead(proc):
print("Process is now dead - 0".format(proc))
subprocess.call('C:\Windows\System32\schtasks /delete /f /tn "QUICKSCHTASK"', stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
process = None
for proc in psutil.process_iter():
if to_match in proc.name():
gone, still_alive = psutil.wait_procs([proc], None, processDead)
break
You can call this from a higher level script to perform operations and circumvent the double hop. Very hacky, but it works. Example usage of script would be:
start /wait py -3 run_as_scheduled_task.py 'robocopy' 'robocopy SOURCE DEST'
An alternative method is to call psexec on the target machine with the -s flag to use the System account. More information on that here: https://stackoverflow.com/questions/15242248/double-hop-access-to-copy-files-without-credssp
While this is an absolute hack, and I'm sure you've already moved on from this problem, one workaround is to create a scheduled task (using the Windows schtasks command) and execute it immediately to perform the copy. The scheduled task will run in the proper context and be able to copy from the server without encountering the double-hop issue, because it originates from the client machine. I'm sure there's an actual Ansible-level solution to this problem, but this is my current workaround.
Your higher level script can use psutil or something similar to monitor the task and not return until the scheduled task has completed.
Here's an helper script I wrote in Python for accomplishing this:
# run_as_scheduled_task.py
import psutil
import subprocess
import time
import sys
to_match = sys.argv[1]
to_run = ' '.join(sys.argv[2:])
print("Running the following command as immediate scheduled task:")
print(to_run)
print("Will return only once process matching wildcard "0" is no longer found".format(to_match))
subprocess.call('C:\Windows\System32\schtasks /delete /f /tn "QUICKSCHTASK"', stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
subprocess.call('C:\Windows\System32\schtasks /create /tn "QUICKSCHTASK" /tr "0" /sc ONCE /st 00:00'.format(to_run), stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
subprocess.call('C:\Windows\System32\schtasks /run /tn "QUICKSCHTASK"', stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
time.sleep(0.1)
def processDead(proc):
print("Process is now dead - 0".format(proc))
subprocess.call('C:\Windows\System32\schtasks /delete /f /tn "QUICKSCHTASK"', stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
process = None
for proc in psutil.process_iter():
if to_match in proc.name():
gone, still_alive = psutil.wait_procs([proc], None, processDead)
break
You can call this from a higher level script to perform operations and circumvent the double hop. Very hacky, but it works. Example usage of script would be:
start /wait py -3 run_as_scheduled_task.py 'robocopy' 'robocopy SOURCE DEST'
An alternative method is to call psexec on the target machine with the -s flag to use the System account. More information on that here: https://stackoverflow.com/questions/15242248/double-hop-access-to-copy-files-without-credssp
edited May 23 '17 at 12:41
Community♦
1
1
answered Apr 26 '17 at 19:08
Robert KellyRobert Kelly
1262 bronze badges
1262 bronze badges
1
I have indeed moved on- turns out the server admin team found they can enable CredSSP on the Ansible server- but this solution is brilliant. Thank you.
– DrewJenseric
Apr 26 '17 at 22:58
add a comment |
1
I have indeed moved on- turns out the server admin team found they can enable CredSSP on the Ansible server- but this solution is brilliant. Thank you.
– DrewJenseric
Apr 26 '17 at 22:58
1
1
I have indeed moved on- turns out the server admin team found they can enable CredSSP on the Ansible server- but this solution is brilliant. Thank you.
– DrewJenseric
Apr 26 '17 at 22:58
I have indeed moved on- turns out the server admin team found they can enable CredSSP on the Ansible server- but this solution is brilliant. Thank you.
– DrewJenseric
Apr 26 '17 at 22:58
add a comment |
system account will access only resource inside local system with highest privileges. How can it access another server in UNC.
And if we create Sch taks with a different user and run it from ansible....it is creating with ansible account and sch tasks doesn't run as "the option selected by default is RUN only when user logged in"
I tried with the above options in my case and noe of them worked...I think only Credssp at ansible config level is the solution.
– srinivas
Jun 10 at 7:41
Can you please let me know if I am miossing anything
– srinivas
Jun 10 at 7:42
it's not clear what you answered here. Please put more effort into making it clear.
– asdmin
Jun 10 at 11:54
add a comment |
system account will access only resource inside local system with highest privileges. How can it access another server in UNC.
And if we create Sch taks with a different user and run it from ansible....it is creating with ansible account and sch tasks doesn't run as "the option selected by default is RUN only when user logged in"
I tried with the above options in my case and noe of them worked...I think only Credssp at ansible config level is the solution.
– srinivas
Jun 10 at 7:41
Can you please let me know if I am miossing anything
– srinivas
Jun 10 at 7:42
it's not clear what you answered here. Please put more effort into making it clear.
– asdmin
Jun 10 at 11:54
add a comment |
system account will access only resource inside local system with highest privileges. How can it access another server in UNC.
And if we create Sch taks with a different user and run it from ansible....it is creating with ansible account and sch tasks doesn't run as "the option selected by default is RUN only when user logged in"
system account will access only resource inside local system with highest privileges. How can it access another server in UNC.
And if we create Sch taks with a different user and run it from ansible....it is creating with ansible account and sch tasks doesn't run as "the option selected by default is RUN only when user logged in"
answered Jun 10 at 7:41
srinivassrinivas
1
1
I tried with the above options in my case and noe of them worked...I think only Credssp at ansible config level is the solution.
– srinivas
Jun 10 at 7:41
Can you please let me know if I am miossing anything
– srinivas
Jun 10 at 7:42
it's not clear what you answered here. Please put more effort into making it clear.
– asdmin
Jun 10 at 11:54
add a comment |
I tried with the above options in my case and noe of them worked...I think only Credssp at ansible config level is the solution.
– srinivas
Jun 10 at 7:41
Can you please let me know if I am miossing anything
– srinivas
Jun 10 at 7:42
it's not clear what you answered here. Please put more effort into making it clear.
– asdmin
Jun 10 at 11:54
I tried with the above options in my case and noe of them worked...I think only Credssp at ansible config level is the solution.
– srinivas
Jun 10 at 7:41
I tried with the above options in my case and noe of them worked...I think only Credssp at ansible config level is the solution.
– srinivas
Jun 10 at 7:41
Can you please let me know if I am miossing anything
– srinivas
Jun 10 at 7:42
Can you please let me know if I am miossing anything
– srinivas
Jun 10 at 7:42
it's not clear what you answered here. Please put more effort into making it clear.
– asdmin
Jun 10 at 11:54
it's not clear what you answered here. Please put more effort into making it clear.
– asdmin
Jun 10 at 11:54
add a comment |
Thanks for contributing an answer to Server Fault!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f839761%2fhas-anyone-solved-the-double-hop-issue-with-ansible-and-windows-clients%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
have you tried enabling kerberos delegation on the windows client computer? is everyone a domain joined machine? what about ansible...do you use kerberos or password authentication to winrm?
– Jacob Evans
Mar 22 '17 at 0:11
Why don't you mount the a file share from the file server on the target system and use
win_copy?– Henrik Pingel
Mar 22 '17 at 6:58
@JacobEvans, I knew I left out an important detail: In this scenario, I don't have any AD member machines; only workgroup machines. The file share mount idea... I will definitely try right now.
– DrewJenseric
Mar 22 '17 at 17:33
Looks like attempting to mount a share still requires that credentials be provided.
– DrewJenseric
Mar 22 '17 at 17:57
You don't have to mount the share to use it in PowerShell. You can access it directly through UNC path.
copy-item \serversharefile.ext $destinationHowever, the account doing the copying needs permissions. Not sure if this helps, so that's why it's a comment instead of an answer.– Xalorous
Apr 28 '17 at 22:37