mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
set default session for preexisting users
This commit is contained in:
7
salt/desktop/files/session.jinja
Normal file
7
salt/desktop/files/session.jinja
Normal file
@@ -0,0 +1,7 @@
|
||||
# This file is managed by Salt in the desktop.xwindows state
|
||||
# It will not be overwritten if it already exists
|
||||
|
||||
[User]
|
||||
Session=gnome-classic
|
||||
Icon=/home/{{USERNAME}}/.face
|
||||
SystemAccount=false
|
||||
@@ -18,6 +18,23 @@ convert_gnome_classic:
|
||||
cmd.script:
|
||||
- name: salt://desktop/scripts/convert-gnome-classic.sh
|
||||
|
||||
{% for username in salt['file.find'](path='/home/',mindepth=1,maxdepth=1,type='d') %}
|
||||
{% set username = username.split('/')[2] %}
|
||||
{% if username != 'zeek' %}
|
||||
{% if not salt['file.file_exists']('/var/lib/AccountsService/users/' ~ username) %}
|
||||
|
||||
{{username}}_session:
|
||||
file.managed:
|
||||
- name: /var/lib/AccountsService/users/{{username}}
|
||||
- source: salt://desktop/files/session.jinja
|
||||
- template: jinja
|
||||
- defaults:
|
||||
USERNAME: {{username}}
|
||||
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% else %}
|
||||
|
||||
desktop_xwindows_os_fail:
|
||||
|
||||
Reference in New Issue
Block a user