You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CreateProcessWithTokenW get Error code 2 ERROR_FILE_NOT_FOUND in windows 32 bit #54060
in windows2003(32bit)、windows2008(32bit) ,
when I want to create process with a different user such as ”system” user
to run simple command like “echo abc”,
the CreateProcessWithTokenW will get Error code 2 ERROR_FILE_NOT_FOUND ,
this only happen in in windows 32 bit system
Any one who knows what file not found ?
thanks you very much!
@thisnotfunny Hey, thanks for reporting this. I need some more information from you.
What version of Salt?
What user are you trying to run as? (System?)
Are you running a salt command or a salt-call command? Please paste the exact command you're running.
What are the permissions for the account under which the salt-minion service is running if it's running under something other than SYSTEM?
What are the permissions for the user you're trying to run as? (Administrator? User?)
What are the permissions for the account you're using to launch the command?
How was salt installed? (Using Salt's supplied packages? Installed manually in a python environment?)
@garethgreenaway@twangboy
thanks for help.
salt master in linux run as root (redhat 6.4)
salt minion windows version is Salt-Minion-2019.2.0-Py2-AMD64-Setup.exe
and also run as system(windows2008 32bit / windows 2012 32bit),
(myuser is not system user)
I use root to input this command :
salt ip cmd.run "echo aaa" runas="myuser"
The minion function caused an exception: Traceback (most recent call last):
File "C:\salt\bin\lib\site-packages\salt\minion.py", line 1660, in _thread_return
return_data = minion_instance.executors[fname](opts, data, func, args, kwargs)
File "C:\salt\bin\lib\site-packages\salt\executors\direct_call.py", line 12, in execute
return func(*args, **kwargs)
File "C:\salt\bin\lib\site-packages\salt\modules\cmdmod.py", line 1167, in run
**kwargs)
File "C:\salt\bin\lib\site-packages\salt\modules\cmdmod.py", line 407, in _run
return win_runas(cmd, runas, password, cwd)
File "C:\salt\bin\lib\site-packages\salt\utils\win_runas.py", line 185, in runas
environment=env,
File "C:\salt\bin\lib\site-packages\salt\platform\win.py", line 1055, in CreateProcessWithTokenW
raise exc
WindowsError: 操作成功完成。
ERROR: Minions returned with non-zero exit code
If I run 'salt ip cmd.run "echo aaa"' without runas, it work fine.
If I run 'salt ip cmd.run "echo aaa" runas="system", it will thow different error:
WindowsError:帐户名与安全标识间无任何映射完成。
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.
Activity
garethgreenaway commentedon Jul 30, 2019
@twangboy Any thoughts on this one?
twangboy commentedon Jul 30, 2019
@thisnotfunny Hey, thanks for reporting this. I need some more information from you.
What version of Salt?
What user are you trying to run as? (System?)
Are you running a salt command or a salt-call command? Please paste the exact command you're running.
What are the permissions for the account under which the salt-minion service is running if it's running under something other than SYSTEM?
What are the permissions for the user you're trying to run as? (Administrator? User?)
What are the permissions for the account you're using to launch the command?
How was salt installed? (Using Salt's supplied packages? Installed manually in a python environment?)
thisnotfunny commentedon Aug 5, 2019
@garethgreenaway @twangboy
thanks for help.
salt master in linux run as root (redhat 6.4)
salt minion windows version is Salt-Minion-2019.2.0-Py2-AMD64-Setup.exe
and also run as system(windows2008 32bit / windows 2012 32bit),
(myuser is not system user)
I use root to input this command :
salt ip cmd.run "echo aaa" runas="myuser"
ERROR: Minions returned with non-zero exit code
If I run 'salt ip cmd.run "echo aaa"' without runas, it work fine.
If I run 'salt ip cmd.run "echo aaa" runas="system", it will thow different error:
WindowsError:帐户名与安全标识间无任何映射完成。
stale commentedon Jan 7, 2020
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.