52 lines
2.2 KiB
Diff
52 lines
2.2 KiB
Diff
|
From 52c04e1a523a450dfce70bc441963eb6a026eb59 Mon Sep 17 00:00:00 2001
|
||
|
From: Ani Sinha <anisinha@redhat.com>
|
||
|
Date: Thu, 20 Jun 2024 11:18:40 +0530
|
||
|
Subject: [PATCH 3/6] doc: update examples to reflect alternative ways to
|
||
|
provide `sudo` option (#5418)
|
||
|
|
||
|
RH-Author: Ani Sinha <anisinha@redhat.com>
|
||
|
RH-MergeRequest: 90: fix(jsonschema): Add missing sudo definition (#5418)
|
||
|
RH-Jira: RHEL-44337
|
||
|
RH-Acked-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
|
||
|
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
|
||
|
RH-Commit: [2/2] 62eac6d731cb725c32cd0beac0219ecc2b407198 (anisinha/cloud-init)
|
||
|
|
||
|
For creating users and groups, it is possible to pass a `sudo` option to the
|
||
|
config file that accepts a sudo rule. The option can be a sudo rule string,
|
||
|
a list of sudo rule strings or `False` to explicitly deny sudo usage. Update
|
||
|
examples to show how a list of strings can be used with `sudo` option.
|
||
|
|
||
|
Signed-off-by: Ani Sinha <anisinha@redhat.com>
|
||
|
(cherry picked from commit cbcb05349e35023ee6e81ccaf13e79adb8f65f63)
|
||
|
---
|
||
|
doc/examples/cloud-config-user-groups.txt | 6 ++++++
|
||
|
1 file changed, 6 insertions(+)
|
||
|
|
||
|
diff --git a/doc/examples/cloud-config-user-groups.txt b/doc/examples/cloud-config-user-groups.txt
|
||
|
index 87fc52e8..56eb674f 100644
|
||
|
--- a/doc/examples/cloud-config-user-groups.txt
|
||
|
+++ b/doc/examples/cloud-config-user-groups.txt
|
||
|
@@ -35,6 +35,10 @@ users:
|
||
|
lock_passwd: true
|
||
|
ssh_authorized_keys:
|
||
|
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDSL7uWGj8cgWyIOaspgKdVy0cKJ+UTjfv7jBOjG2H/GN8bJVXy72XAvnhM0dUM+CCs8FOf0YlPX+Frvz2hKInrmRhZVwRSL129PasD12MlI3l44u6IwS1o/W86Q+tkQYEljtqDOo0a+cOsaZkvUNzUyEXUwz/lmYa6G4hMKZH4NBj7nbAAF96wsMCoyNwbWryBnDYUr6wMbjRR1J9Pw7Xh7WRC73wy4Va2YuOgbD3V/5ZrFPLbWZW/7TFXVrql04QVbyei4aiFR5n//GvoqwQDNe58LmbzX/xvxyKJYdny2zXmdAhMxbrpFQsfpkJ9E/H5w0yOdSvnWbUoG5xNGoOB csmith@fringe
|
||
|
+ - name: testuser
|
||
|
+ gecos: Mr. Test
|
||
|
+ homedir: /local/testdir
|
||
|
+ sudo: ["ALL=(ALL) NOPASSWD:ALL"]
|
||
|
- name: cloudy
|
||
|
gecos: Magic Cloud App Daemon User
|
||
|
inactive: '5'
|
||
|
@@ -100,6 +104,8 @@ users:
|
||
|
#
|
||
|
# Allow a user unrestricted sudo access.
|
||
|
# sudo: ALL=(ALL) NOPASSWD:ALL
|
||
|
+# or
|
||
|
+# sudo: ["ALL=(ALL) NOPASSWD:ALL"]
|
||
|
#
|
||
|
# Adding multiple sudo rule strings.
|
||
|
# sudo:
|
||
|
--
|
||
|
2.39.3
|
||
|
|