Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3768505
D2135.id5383.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
4 KB
Referenced Files
None
Subscribers
None
D2135.id5383.diff
View Options
diff --git a/_tests/pillar/core/test_users.py b/_tests/pillar/core/test_users.py
--- a/_tests/pillar/core/test_users.py
+++ b/_tests/pillar/core/test_users.py
@@ -6,6 +6,7 @@
USER_PROPERTIES_MANDATORY = set(["fullname", "ssh_keys", "uid"])
USER_PROPERTIES_OPTIONAL = set([
+ "class",
"shell",
"yubico_keys",
"deploy_dotfiles_to_devserver"
diff --git a/roles/core/init.sls b/roles/core/init.sls
--- a/roles/core/init.sls
+++ b/roles/core/init.sls
@@ -8,6 +8,7 @@
include:
- .rc
- .hostname
+ - .login
- .network
- .motd
- .rsyslog
diff --git a/roles/core/login/files/login.conf b/roles/core/login/files/login.conf
new file mode 100644
--- /dev/null
+++ b/roles/core/login/files/login.conf
@@ -0,0 +1,97 @@
+# -------------------------------------------------------------
+# Login class capabilities database
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# Created: 2020-01-20
+# License: Trivial work, not eligible to copyright
+# Based on: FreeBSD releng/12.1/usr.bin/login/login.conf
+# VCS info: 338399 2018-08-30 15:52:03Z brd
+# Source file: roles/core/login/files/login.conf
+# -------------------------------------------------------------
+#
+# <auto-generated>
+# This file is managed by our rOPS SaltStack repository.
+#
+# Changes to this file may cause incorrect behavior
+# and will be lost if the state is redeployed.
+# </auto-generated>
+
+# -------------------------------------------------------------
+# Default settings
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+default:\
+ :passwd_format=sha512:\
+ :copyright=/etc/COPYRIGHT:\
+ :welcome=/etc/motd:\
+ :setenv=MAIL=/var/mail/$,BLOCKSIZE=K:\
+ :path=/sbin /bin /usr/sbin /usr/bin /usr/local/sbin /usr/local/bin ~/bin:\
+ :nologin=/var/run/nologin:\
+ :cputime=unlimited:\
+ :datasize=unlimited:\
+ :stacksize=unlimited:\
+ :memorylocked=64K:\
+ :memoryuse=unlimited:\
+ :filesize=unlimited:\
+ :coredumpsize=unlimited:\
+ :openfiles=unlimited:\
+ :maxproc=unlimited:\
+ :sbsize=unlimited:\
+ :vmemoryuse=unlimited:\
+ :swapuse=unlimited:\
+ :pseudoterminals=unlimited:\
+ :kqueues=unlimited:\
+ :umtxp=unlimited:\
+ :priority=0:\
+ :ignoretime@:\
+ :umask=022:
+
+# -------------------------------------------------------------
+# Common class names to forward to 'default'
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+standard:\
+ :tc=default:
+xuser:\
+ :tc=default:
+staff:\
+ :tc=default:
+daemon:\
+ :memorylocked=128M:\
+ :tc=default:
+news:\
+ :tc=default:
+dialer:\
+ :tc=default:
+
+# -------------------------------------------------------------
+# Root class
+#
+# Root can always login.
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+root:\
+ :ignorenologin:\
+ :memorylocked=unlimited:\
+ :tc=default:
+
+# -------------------------------------------------------------
+# Users classes
+#
+# Provide proper UTF-8 environment
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+english|English Users Accounts:\
+ :charset=UTF-8:\
+ :lang=en_US.UTF-8:\
+ :tc=default:
+
+french|French Users Accounts:\
+ :charset=UTF-8:\
+ :lang=fr_FR.UTF-8:\
+ :tc=default:
+
+russian|Russian Users Accounts:\
+ :charset=UTF-8:\
+ :lang=ru_RU.UTF-8:\
+ :tc=default:
diff --git a/roles/core/login/init.sls b/roles/core/login/init.sls
new file mode 100644
--- /dev/null
+++ b/roles/core/login/init.sls
@@ -0,0 +1,22 @@
+# -------------------------------------------------------------
+# Set login capabilities
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# Created: 2020-01-20
+# License: Trivial work, not eligible to copyright
+# -------------------------------------------------------------
+
+{% if grains['os'] == 'FreeBSD' %}
+
+/etc/login.conf:
+ file.managed:
+ - source: salt://roles/core/login/files/login.conf
+ - mode: 644
+
+compile_login_db:
+ cmd.run:
+ - name: cap_mkdb /etc/login.conf
+ - onchanges:
+ - file: /etc/login.conf
+
+{% endif %}
diff --git a/roles/core/users/init.sls b/roles/core/users/init.sls
--- a/roles/core/users/init.sls
+++ b/roles/core/users/init.sls
@@ -87,6 +87,7 @@
- fullname: {{ user['fullname'] }}
- shell: {{ shells[user['shell']|default('bash')] }}
- uid: {{ user['uid'] }}
+ - loginclass: {{ user['class']|default('english') }}
{% endfor %}
# -------------------------------------------------------------
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 24, 08:23 (9 h, 35 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2259835
Default Alt Text
D2135.id5383.diff (4 KB)
Attached To
Mode
D2135: Configure login capabilities on FreeBSD
Attached
Detach File
Event Timeline
Log In to Comment