Skip to content

Commit

Permalink
fix(osfamilymap): use whoami for Windows rootuser
Browse files Browse the repository at this point in the history
Fix #495
  • Loading branch information
myii committed Mar 30, 2021
1 parent ef1bc02 commit 69d5981
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion salt/osfamilymap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}


Expand Down

0 comments on commit 69d5981

Please sign in to comment.