Browse Source

fix(osfamilymap): use `whoami` for Windows `rootuser`

Fix #495
tags/v1.8.1
Imran Iqbal 4 years ago
parent
commit
69d598138e
No account linked to committer's email address
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      salt/osfamilymap.yaml

+ 1
- 1
salt/osfamilymap.yaml View File

@@ -20,7 +20,7 @@
{%- set rootuser = salt['cmd.run']("stat -f '%Su' /dev/console") %}
{%- set rootgroup = salt['cmd.run']("stat -f '%Sg' /dev/console") %}
{%- elif grains.os_family == 'Windows' %}
{%- set rootuser = salt['cmd.run']("id -un") %}
{%- set rootuser = salt['cmd.run']("whoami").split("\\")[1] %}
{%- endif %}



Loading…
Cancel
Save