Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Documentation For cmd.run regarding Windows runas argument #57949

Open
JacobSweeten opened this issue Jul 15, 2020 · 2 comments
Open

Update Documentation For cmd.run regarding Windows runas argument #57949

JacobSweeten opened this issue Jul 15, 2020 · 2 comments
Labels
doc-request net new docs requested Documentation Relates to Salt documentation severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around time-estimate-sprint
Milestone

Comments

@JacobSweeten
Copy link

The following code snippet is the only place where there is any mention of using the password field:

salt/salt/states/cmd.py

Lines 869 to 873 in 53cc103

runas
Specify an alternate user to run the command. The default
behavior is to run as the user under which Salt is running. If running
on a Windows minion you must also use the ``password`` argument, and
the target user account must be in the Administrators group.

The documentation should warn of this as well.

Also, the error that I get when this is omitted (On 2019.2) is "embedded null character". There should be better error detection for a lack of password input on Windows.

The state code to reproduce the issue is relatively simple:

   cmd.run:
    - name: |
        my commands here
    - shell: powershell
    - runas: Administrator
@sagetherage sagetherage added doc-request net new docs requested Documentation Relates to Salt documentation labels Jul 15, 2020
@sagetherage
Copy link
Contributor

@JacobSweeten this looks like two issues, yes? One to update the docs and one to make the error message be more descriptive. Separating them into two issues/tickets, as I may have one person work on each piece, but would want them linked for referencing and testing. Let me know if you see a problem with that process.

@sagetherage sagetherage added this to the Approved milestone Jul 15, 2020
@sagetherage
Copy link
Contributor

great, here is the error message issue: #57951

@barbaricyawps barbaricyawps added time-estimate-sprint severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around labels Mar 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc-request net new docs requested Documentation Relates to Salt documentation severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around time-estimate-sprint
Projects
None yet
Development

No branches or pull requests

3 participants