Skip to content

Commit

Permalink
feat: get GUI user with salt modules
Browse files Browse the repository at this point in the history
  • Loading branch information
ben-grande committed Jun 28, 2024
1 parent 077b21d commit f903c0e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions salt/dom0/gui-user.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ SPDX-FileCopyrightText: 2024 Benjamin Grande M. S. <[email protected]>
SPDX-License-Identifier: AGPL-3.0-or-later
#}

{% set gui_user = salt['cmd.shell']("getent group qubes | awk -F '[:,]' '{print $4}'") -%}
{% set gui_user_id = salt['cmd.shell']("getent passwd " ~ gui_user ~ " | awk -F ':' '{print $3}'") -%}
{% set gui_user_home = salt['cmd.shell']("getent passwd " ~ gui_user ~ " | awk -F ':' '{print $6}'") -%}
{% set gui_user = salt["group.info"]("qubes").get("members")[0] -%}
{% set gui_user_id = salt["user.info"](gui_user).get("uid") -%}
{% set gui_user_home = salt["user.info"](gui_user).get("home") -%}

0 comments on commit f903c0e

Please sign in to comment.