Skip to content

Commit 6260bb8

Browse files
committed
Draft - corrections , documentation.
1 parent 0743d65 commit 6260bb8

File tree

3 files changed

+205
-33
lines changed

3 files changed

+205
-33
lines changed

_prog/core-micro.sh

+91-7
Original file line numberDiff line numberDiff line change
@@ -155,16 +155,73 @@ _create_ingredientVM_image() {
155155
#_createVMfstab
156156

157157
_messagePlain_nominal 'os: globalVirtFS: write: fs'
158-
cat << CZXWXcRMTo8EmM8i4d | sudo -n tee -a "$globalVirtFS"/etc/sudoers > /dev/null
158+
# ATTENTION: Unusual. A complete sudoers file is written here largely for formality, in case 'sudo' has somehow already been installed and may somehow be needed. Later, before sudo is deliberately installed, the sudoers file is deleted, then after sudo is deliberately installed, only the necessary additions are appended.
159+
#sudo -n rm -f "$globalVirtFS"/etc/sudoers
160+
#tee -a
161+
cat << CZXWXcRMTo8EmM8i4d | sudo -n tee "$globalVirtFS"/etc/sudoers > /dev/null
162+
#
163+
# This file MUST be edited with the 'visudo' command as root.
164+
#
165+
# Please consider adding local content in /etc/sudoers.d/ instead of
166+
# directly modifying this file.
167+
#
168+
# See the man page for details on how to write a sudoers file.
169+
#
170+
Defaults env_reset
171+
Defaults mail_badpass
172+
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
173+
174+
# This fixes CVE-2005-4890 and possibly breaks some versions of kdesu
175+
# (#1011624, https://bugs.kde.org/show_bug.cgi?id=452532)
176+
Defaults use_pty
177+
178+
# This preserves proxy settings from user environments of root
179+
# equivalent users (group sudo)
180+
#Defaults:%sudo env_keep += "http_proxy https_proxy ftp_proxy all_proxy no_proxy"
181+
182+
# This allows running arbitrary commands, but so does ALL, and it means
183+
# different sudoers have their choice of editor respected.
184+
#Defaults:%sudo env_keep += "EDITOR"
185+
186+
# Completely harmless preservation of a user preference.
187+
#Defaults:%sudo env_keep += "GREP_COLOR"
188+
189+
# While you shouldn't normally run git as root, you need to with etckeeper
190+
#Defaults:%sudo env_keep += "GIT_AUTHOR_* GIT_COMMITTER_*"
191+
192+
# Per-user preferences; root won't have sensible values for them.
193+
#Defaults:%sudo env_keep += "EMAIL DEBEMAIL DEBFULLNAME"
194+
195+
# "sudo scp" or "sudo rsync" should be able to use your SSH agent.
196+
#Defaults:%sudo env_keep += "SSH_AGENT_PID SSH_AUTH_SOCK"
197+
198+
# Ditto for GPG agent
199+
#Defaults:%sudo env_keep += "GPG_AGENT_INFO"
200+
201+
# Host alias specification
202+
203+
# User alias specification
204+
205+
# Cmnd alias specification
206+
207+
# User privilege specification
208+
root ALL=(ALL:ALL) ALL
209+
210+
# Allow members of group sudo to execute any command
211+
%sudo ALL=(ALL:ALL) ALL
212+
213+
# See sudoers(5) for more information on "@include" directives:
214+
215+
@includedir /etc/sudoers.d
159216
#_____
160-
#Defaults env_reset
161-
#Defaults mail_badpass
162-
#Defaults secure_path="/root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
217+
#Defaults env_reset
218+
#Defaults mail_badpass
219+
#Defaults secure_path="/root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
163220
164221
Defaults env_keep += "currentChroot"
165222
Defaults env_keep += "chrootName"
166223
167-
root ALL=(ALL:ALL) ALL
224+
root ALL=(ALL:ALL) ALL
168225
#user ALL=(ALL:ALL) NOPASSWD: ALL
169226
#pi ALL=(ALL:ALL) NOPASSWD: ALL
170227
@@ -173,9 +230,10 @@ user ALL=(ALL:ALL) NOPASSWD: ALL
173230
%admin ALL=(ALL:ALL) NOPASSWD: ALL
174231
%sudo ALL=(ALL:ALL) NOPASSWD: ALL
175232
%wheel ALL=(ALL:ALL) NOPASSWD: ALL
176-
#%sudo ALL=(ALL:ALL) ALL
233+
#%sudo ALL=(ALL:ALL) ALL
177234
178235
# Important. Prevents possibility of appending to sudoers again by 'rotten_install.sh' .
236+
# End users may delete this long after dist/OS install is done.
179237
#noMoreRotten
180238
181239
CZXWXcRMTo8EmM8i4d
@@ -233,8 +291,34 @@ CZXWXcRMTo8EmM8i4d
233291
_getMost_backend_aptGetInstall btrfs-compsize
234292
_getMost_backend_aptGetInstall zstd
235293

294+
# ATTENTION: Debian Bookworm sudoers default correctly changes the PATH for root user. Without this, 'cmd.sh', 'bootOnce', etc, will all FAIL - such commands as 'sudo -n poweroff' will FAIL .
295+
sudo -n rm -f "$globalVirtFS"/etc/sudoers
236296
_getMost_backend_aptGetInstall sudo
237-
297+
cat << CZXWXcRMTo8EmM8i4d | sudo -n tee -a "$globalVirtFS"/etc/sudoers > /dev/null
298+
#_____
299+
#Defaults env_reset
300+
#Defaults mail_badpass
301+
#Defaults secure_path="/root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
302+
303+
Defaults env_keep += "currentChroot"
304+
Defaults env_keep += "chrootName"
305+
306+
root ALL=(ALL:ALL) ALL
307+
#user ALL=(ALL:ALL) NOPASSWD: ALL
308+
#pi ALL=(ALL:ALL) NOPASSWD: ALL
309+
310+
user ALL=(ALL:ALL) NOPASSWD: ALL
311+
312+
%admin ALL=(ALL:ALL) NOPASSWD: ALL
313+
%sudo ALL=(ALL:ALL) NOPASSWD: ALL
314+
%wheel ALL=(ALL:ALL) NOPASSWD: ALL
315+
#%sudo ALL=(ALL:ALL) ALL
316+
317+
# Important. Prevents possibility of appending to sudoers again by 'rotten_install.sh' .
318+
# End users may delete this long after dist/OS install is done.
319+
#noMoreRotten
320+
321+
CZXWXcRMTo8EmM8i4d
238322

239323
_messagePlain_nominal 'hostnamectl'
240324
_getMost_backend_aptGetInstall hostnamectl

_prog/core.sh

+11-9
Original file line numberDiff line numberDiff line change
@@ -1836,6 +1836,8 @@ _create_ubDistBuild-bootOnce-qemu_sequence() {
18361836

18371837
# Up to 700s per kernel (ie. modules), plus 500s, total of 1147s for one kernel, 1749s to wait for three kernels.
18381838
#6200s ... had a track record of a few years
1839+
# Prefer 6200s, as this is normally sufficient for both the apparent ~1900s without compiling vbox kernel modules, and longer times if compiling under qemu virtualizaton.
1840+
# The longer 13500s wait is mostly only beneficial ONLY to make the exit status a clearly unambigious statement that FAIL actually happened, not merely timeout before compiling could complete.
18391841
_messagePlain_nominal 'wait: 13500s'
18401842
local currentIterationWait
18411843
currentIterationWait=0
@@ -2894,7 +2896,7 @@ _zSpecial_qemu_sequence_prog() {
28942896
echo '#!/usr/bin/env bash' >> "$hostToGuestFiles"/cmd.sh
28952897
echo 'date +"%Y-%m-%d" | sudo -n tee /var/log/bootOnce.log' >> "$hostToGuestFiles"/cmd.sh
28962898
echo 'sudo -n update-grub' >> "$hostToGuestFiles"/cmd.sh
2897-
echo 'echo done: update-grub | sudo -n tee -a /var/log/bootOnce.log' >> "$hostToGuestFiles"/cmd.sh
2899+
echo 'echo "done: update-grub" | sudo -n tee -a /var/log/bootOnce.log' >> "$hostToGuestFiles"/cmd.sh
28982900
echo '_detect_process_compile() {
28992901
pgrep cc1 && return 0
29002902
pgrep apt && return 0
@@ -2908,29 +2910,29 @@ _zSpecial_qemu_sequence_prog() {
29082910
# If uncommented, any indefinite delay in '_detect_process_compile' may cause failure.
29092911
#echo 'while _detect_process_compile && sleep 27 && _detect_process_compile && sleep 27 && _detect_process_compile ; do sleep 27 ; done' >> "$hostToGuestFiles"/cmd.sh
29102912

2911-
echo 'echo done: _detect_process_compile (if uncommented) | sudo -n tee -a /var/log/bootOnce.log' >> "$hostToGuestFiles"/cmd.sh
2913+
echo 'echo done: "_detect_process_compile (if uncommented)" | sudo -n tee -a /var/log/bootOnce.log' >> "$hostToGuestFiles"/cmd.sh
29122914
echo 'sleep 15' >> "$hostToGuestFiles"/cmd.sh
29132915
echo '! sudo -n lsmod | grep -i vboxdrv && sudo -n /sbin/vboxconfig' >> "$hostToGuestFiles"/cmd.sh
2914-
echo 'echo done: vboxconfig | sudo -n tee -a /var/log/bootOnce.log' >> "$hostToGuestFiles"/cmd.sh
2916+
echo 'echo "done: vboxconfig" | sudo -n tee -a /var/log/bootOnce.log' >> "$hostToGuestFiles"/cmd.sh
29152917
echo 'sleep 75' >> "$hostToGuestFiles"/cmd.sh
29162918
echo 'sudo -n lsmod | cut -f1 -d\ | sudo -n tee /lsmodReport' >> "$hostToGuestFiles"/cmd.sh
29172919
echo 'cat /lsmodReport | sudo -n tee -a /var/log/bootOnce.log' >> "$hostToGuestFiles"/cmd.sh
2918-
echo 'echo done: lsmodReport | sudo -n tee -a /var/log/bootOnce.log' >> "$hostToGuestFiles"/cmd.sh
2920+
echo 'echo "done: lsmodReport" | sudo -n tee -a /var/log/bootOnce.log' >> "$hostToGuestFiles"/cmd.sh
29192921
echo '[[ ! -e /kded5-done ]] && kded5 --check' >> "$hostToGuestFiles"/cmd.sh
2920-
echo 'echo done: kded5 --check (1 of 2) | sudo -n tee -a /var/log/bootOnce.log' >> "$hostToGuestFiles"/cmd.sh
2922+
echo 'echo "done: kded5 --check (1 of 2)" | sudo -n tee -a /var/log/bootOnce.log' >> "$hostToGuestFiles"/cmd.sh
29212923
echo '[[ ! -e /kded5-done ]] && sleep 90' >> "$hostToGuestFiles"/cmd.sh
29222924

29232925
echo '[[ ! -e /FW-done ]] && cd /home/user/.ubcore/ubiquitous_bash ; ./ubiquitous_bash.sh _cfgFW-desktop | sudo -n tee /cfgFW.log ; cd' >> "$hostToGuestFiles"/cmd.sh
2924-
echo 'echo done: cfgFW-desktop (1 of 2) | sudo -n tee -a /var/log/bootOnce.log' >> "$hostToGuestFiles"/cmd.sh
2926+
echo 'echo "done: cfgFW-desktop (1 of 2)" | sudo -n tee -a /var/log/bootOnce.log' >> "$hostToGuestFiles"/cmd.sh
29252927
echo '[[ ! -e /FW-done ]] && cd /home/user/.ubcore/ubiquitous_bash ; ./ubiquitous_bash.sh _cfgFW-desktop | sudo -n tee /cfgFW.log ; cd' >> "$hostToGuestFiles"/cmd.sh
2926-
echo 'echo done: cfgFW-desktop (2 of 2) | sudo -n tee -a /var/log/bootOnce.log' >> "$hostToGuestFiles"/cmd.sh
2928+
echo 'echo "done: cfgFW-desktop (2 of 2)" | sudo -n tee -a /var/log/bootOnce.log' >> "$hostToGuestFiles"/cmd.sh
29272929

29282930
echo '[[ ! -e /kded5-done ]] && kded5 --check' >> "$hostToGuestFiles"/cmd.sh
2929-
echo 'echo done: kded5 --check (2 of 2) | sudo -n tee -a /var/log/bootOnce.log' >> "$hostToGuestFiles"/cmd.sh
2931+
echo 'echo "done: kded5 --check (2 of 2)" | sudo -n tee -a /var/log/bootOnce.log' >> "$hostToGuestFiles"/cmd.sh
29302932
echo '( [[ ! -e /kded5-done ]] || [[ ! -e /FW-done ]] ) && sleep 420' >> "$hostToGuestFiles"/cmd.sh
29312933
echo 'echo | sudo -n tee /kded5-done' >> "$hostToGuestFiles"/cmd.sh
29322934
echo 'echo | sudo -n tee /FW-done' >> "$hostToGuestFiles"/cmd.sh
2933-
echo 'echo done: sleep , /kded5-done , /FW-done | sudo -n tee -a /var/log/bootOnce.log' >> "$hostToGuestFiles"/cmd.sh
2935+
echo 'echo "done: sleep , /kded5-done , /FW-done" | sudo -n tee -a /var/log/bootOnce.log' >> "$hostToGuestFiles"/cmd.sh
29342936
echo 'sudo -n poweroff' >> "$hostToGuestFiles"/cmd.sh
29352937
}
29362938

ubiquitous_bash.sh

+103-17
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ _ub_cksum_special_derivativeScripts_contents() {
3636
#export ub_setScriptChecksum_disable='true'
3737
( [[ -e "$0".nck ]] || [[ "${BASH_SOURCE[0]}" != "${0}" ]] || [[ "$1" == '--profile' ]] || [[ "$1" == '--script' ]] || [[ "$1" == '--call' ]] || [[ "$1" == '--return' ]] || [[ "$1" == '--devenv' ]] || [[ "$1" == '--shell' ]] || [[ "$1" == '--bypass' ]] || [[ "$1" == '--parent' ]] || [[ "$1" == '--embed' ]] || [[ "$1" == '--compressed' ]] || [[ "$0" == "/bin/bash" ]] || [[ "$0" == "-bash" ]] || [[ "$0" == "/usr/bin/bash" ]] || [[ "$0" == "bash" ]] ) && export ub_setScriptChecksum_disable='true'
3838
export ub_setScriptChecksum_header='2591634041'
39-
export ub_setScriptChecksum_contents='3362015300'
39+
export ub_setScriptChecksum_contents='1053505133'
4040

4141
# CAUTION: Symlinks may cause problems. Disable this test for such cases if necessary.
4242
# WARNING: Performance may be crucial here.
@@ -50166,6 +50166,8 @@ _create_ubDistBuild-bootOnce-qemu_sequence() {
5016650166

5016750167
# Up to 700s per kernel (ie. modules), plus 500s, total of 1147s for one kernel, 1749s to wait for three kernels.
5016850168
#6200s ... had a track record of a few years
50169+
# Prefer 6200s, as this is normally sufficient for both the apparent ~1900s without compiling vbox kernel modules, and longer times if compiling under qemu virtualizaton.
50170+
# The longer 13500s wait is mostly only beneficial ONLY to make the exit status a clearly unambigious statement that FAIL actually happened, not merely timeout before compiling could complete.
5016950171
_messagePlain_nominal 'wait: 13500s'
5017050172
local currentIterationWait
5017150173
currentIterationWait=0
@@ -51224,7 +51226,7 @@ _zSpecial_qemu_sequence_prog() {
5122451226
echo '#!/usr/bin/env bash' >> "$hostToGuestFiles"/cmd.sh
5122551227
echo 'date +"%Y-%m-%d" | sudo -n tee /var/log/bootOnce.log' >> "$hostToGuestFiles"/cmd.sh
5122651228
echo 'sudo -n update-grub' >> "$hostToGuestFiles"/cmd.sh
51227-
echo 'echo done: update-grub | sudo -n tee -a /var/log/bootOnce.log' >> "$hostToGuestFiles"/cmd.sh
51229+
echo 'echo "done: update-grub" | sudo -n tee -a /var/log/bootOnce.log' >> "$hostToGuestFiles"/cmd.sh
5122851230
echo '_detect_process_compile() {
5122951231
pgrep cc1 && return 0
5123051232
pgrep apt && return 0
@@ -51238,29 +51240,29 @@ _zSpecial_qemu_sequence_prog() {
5123851240
# If uncommented, any indefinite delay in '_detect_process_compile' may cause failure.
5123951241
#echo 'while _detect_process_compile && sleep 27 && _detect_process_compile && sleep 27 && _detect_process_compile ; do sleep 27 ; done' >> "$hostToGuestFiles"/cmd.sh
5124051242

51241-
echo 'echo done: _detect_process_compile (if uncommented) | sudo -n tee -a /var/log/bootOnce.log' >> "$hostToGuestFiles"/cmd.sh
51243+
echo 'echo done: "_detect_process_compile (if uncommented)" | sudo -n tee -a /var/log/bootOnce.log' >> "$hostToGuestFiles"/cmd.sh
5124251244
echo 'sleep 15' >> "$hostToGuestFiles"/cmd.sh
5124351245
echo '! sudo -n lsmod | grep -i vboxdrv && sudo -n /sbin/vboxconfig' >> "$hostToGuestFiles"/cmd.sh
51244-
echo 'echo done: vboxconfig | sudo -n tee -a /var/log/bootOnce.log' >> "$hostToGuestFiles"/cmd.sh
51246+
echo 'echo "done: vboxconfig" | sudo -n tee -a /var/log/bootOnce.log' >> "$hostToGuestFiles"/cmd.sh
5124551247
echo 'sleep 75' >> "$hostToGuestFiles"/cmd.sh
5124651248
echo 'sudo -n lsmod | cut -f1 -d\ | sudo -n tee /lsmodReport' >> "$hostToGuestFiles"/cmd.sh
5124751249
echo 'cat /lsmodReport | sudo -n tee -a /var/log/bootOnce.log' >> "$hostToGuestFiles"/cmd.sh
51248-
echo 'echo done: lsmodReport | sudo -n tee -a /var/log/bootOnce.log' >> "$hostToGuestFiles"/cmd.sh
51250+
echo 'echo "done: lsmodReport" | sudo -n tee -a /var/log/bootOnce.log' >> "$hostToGuestFiles"/cmd.sh
5124951251
echo '[[ ! -e /kded5-done ]] && kded5 --check' >> "$hostToGuestFiles"/cmd.sh
51250-
echo 'echo done: kded5 --check (1 of 2) | sudo -n tee -a /var/log/bootOnce.log' >> "$hostToGuestFiles"/cmd.sh
51252+
echo 'echo "done: kded5 --check (1 of 2)" | sudo -n tee -a /var/log/bootOnce.log' >> "$hostToGuestFiles"/cmd.sh
5125151253
echo '[[ ! -e /kded5-done ]] && sleep 90' >> "$hostToGuestFiles"/cmd.sh
5125251254

5125351255
echo '[[ ! -e /FW-done ]] && cd /home/user/.ubcore/ubiquitous_bash ; ./ubiquitous_bash.sh _cfgFW-desktop | sudo -n tee /cfgFW.log ; cd' >> "$hostToGuestFiles"/cmd.sh
51254-
echo 'echo done: cfgFW-desktop (1 of 2) | sudo -n tee -a /var/log/bootOnce.log' >> "$hostToGuestFiles"/cmd.sh
51256+
echo 'echo "done: cfgFW-desktop (1 of 2)" | sudo -n tee -a /var/log/bootOnce.log' >> "$hostToGuestFiles"/cmd.sh
5125551257
echo '[[ ! -e /FW-done ]] && cd /home/user/.ubcore/ubiquitous_bash ; ./ubiquitous_bash.sh _cfgFW-desktop | sudo -n tee /cfgFW.log ; cd' >> "$hostToGuestFiles"/cmd.sh
51256-
echo 'echo done: cfgFW-desktop (2 of 2) | sudo -n tee -a /var/log/bootOnce.log' >> "$hostToGuestFiles"/cmd.sh
51258+
echo 'echo "done: cfgFW-desktop (2 of 2)" | sudo -n tee -a /var/log/bootOnce.log' >> "$hostToGuestFiles"/cmd.sh
5125751259

5125851260
echo '[[ ! -e /kded5-done ]] && kded5 --check' >> "$hostToGuestFiles"/cmd.sh
51259-
echo 'echo done: kded5 --check (2 of 2) | sudo -n tee -a /var/log/bootOnce.log' >> "$hostToGuestFiles"/cmd.sh
51261+
echo 'echo "done: kded5 --check (2 of 2)" | sudo -n tee -a /var/log/bootOnce.log' >> "$hostToGuestFiles"/cmd.sh
5126051262
echo '( [[ ! -e /kded5-done ]] || [[ ! -e /FW-done ]] ) && sleep 420' >> "$hostToGuestFiles"/cmd.sh
5126151263
echo 'echo | sudo -n tee /kded5-done' >> "$hostToGuestFiles"/cmd.sh
5126251264
echo 'echo | sudo -n tee /FW-done' >> "$hostToGuestFiles"/cmd.sh
51263-
echo 'echo done: sleep , /kded5-done , /FW-done | sudo -n tee -a /var/log/bootOnce.log' >> "$hostToGuestFiles"/cmd.sh
51265+
echo 'echo "done: sleep , /kded5-done , /FW-done" | sudo -n tee -a /var/log/bootOnce.log' >> "$hostToGuestFiles"/cmd.sh
5126451266
echo 'sudo -n poweroff' >> "$hostToGuestFiles"/cmd.sh
5126551267
}
5126651268

@@ -55707,16 +55709,73 @@ _create_ingredientVM_image() {
5570755709
#_createVMfstab
5570855710

5570955711
_messagePlain_nominal 'os: globalVirtFS: write: fs'
55710-
cat << CZXWXcRMTo8EmM8i4d | sudo -n tee -a "$globalVirtFS"/etc/sudoers > /dev/null
55712+
# ATTENTION: Unusual. A complete sudoers file is written here largely for formality, in case 'sudo' has somehow already been installed and may somehow be needed. Later, before sudo is deliberately installed, the sudoers file is deleted, then after sudo is deliberately installed, only the necessary additions are appended.
55713+
#sudo -n rm -f "$globalVirtFS"/etc/sudoers
55714+
#tee -a
55715+
cat << CZXWXcRMTo8EmM8i4d | sudo -n tee "$globalVirtFS"/etc/sudoers > /dev/null
55716+
#
55717+
# This file MUST be edited with the 'visudo' command as root.
55718+
#
55719+
# Please consider adding local content in /etc/sudoers.d/ instead of
55720+
# directly modifying this file.
55721+
#
55722+
# See the man page for details on how to write a sudoers file.
55723+
#
55724+
Defaults env_reset
55725+
Defaults mail_badpass
55726+
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
55727+
55728+
# This fixes CVE-2005-4890 and possibly breaks some versions of kdesu
55729+
# (#1011624, https://bugs.kde.org/show_bug.cgi?id=452532)
55730+
Defaults use_pty
55731+
55732+
# This preserves proxy settings from user environments of root
55733+
# equivalent users (group sudo)
55734+
#Defaults:%sudo env_keep += "http_proxy https_proxy ftp_proxy all_proxy no_proxy"
55735+
55736+
# This allows running arbitrary commands, but so does ALL, and it means
55737+
# different sudoers have their choice of editor respected.
55738+
#Defaults:%sudo env_keep += "EDITOR"
55739+
55740+
# Completely harmless preservation of a user preference.
55741+
#Defaults:%sudo env_keep += "GREP_COLOR"
55742+
55743+
# While you shouldn't normally run git as root, you need to with etckeeper
55744+
#Defaults:%sudo env_keep += "GIT_AUTHOR_* GIT_COMMITTER_*"
55745+
55746+
# Per-user preferences; root won't have sensible values for them.
55747+
#Defaults:%sudo env_keep += "EMAIL DEBEMAIL DEBFULLNAME"
55748+
55749+
# "sudo scp" or "sudo rsync" should be able to use your SSH agent.
55750+
#Defaults:%sudo env_keep += "SSH_AGENT_PID SSH_AUTH_SOCK"
55751+
55752+
# Ditto for GPG agent
55753+
#Defaults:%sudo env_keep += "GPG_AGENT_INFO"
55754+
55755+
# Host alias specification
55756+
55757+
# User alias specification
55758+
55759+
# Cmnd alias specification
55760+
55761+
# User privilege specification
55762+
root ALL=(ALL:ALL) ALL
55763+
55764+
# Allow members of group sudo to execute any command
55765+
%sudo ALL=(ALL:ALL) ALL
55766+
55767+
# See sudoers(5) for more information on "@include" directives:
55768+
55769+
@includedir /etc/sudoers.d
5571155770
#_____
55712-
#Defaults env_reset
55713-
#Defaults mail_badpass
55714-
#Defaults secure_path="/root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
55771+
#Defaults env_reset
55772+
#Defaults mail_badpass
55773+
#Defaults secure_path="/root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
5571555774

5571655775
Defaults env_keep += "currentChroot"
5571755776
Defaults env_keep += "chrootName"
5571855777

55719-
root ALL=(ALL:ALL) ALL
55778+
root ALL=(ALL:ALL) ALL
5572055779
#user ALL=(ALL:ALL) NOPASSWD: ALL
5572155780
#pi ALL=(ALL:ALL) NOPASSWD: ALL
5572255781

@@ -55725,9 +55784,10 @@ user ALL=(ALL:ALL) NOPASSWD: ALL
5572555784
%admin ALL=(ALL:ALL) NOPASSWD: ALL
5572655785
%sudo ALL=(ALL:ALL) NOPASSWD: ALL
5572755786
%wheel ALL=(ALL:ALL) NOPASSWD: ALL
55728-
#%sudo ALL=(ALL:ALL) ALL
55787+
#%sudo ALL=(ALL:ALL) ALL
5572955788

5573055789
# Important. Prevents possibility of appending to sudoers again by 'rotten_install.sh' .
55790+
# End users may delete this long after dist/OS install is done.
5573155791
#noMoreRotten
5573255792

5573355793
CZXWXcRMTo8EmM8i4d
@@ -55785,8 +55845,34 @@ CZXWXcRMTo8EmM8i4d
5578555845
_getMost_backend_aptGetInstall btrfs-compsize
5578655846
_getMost_backend_aptGetInstall zstd
5578755847

55848+
# ATTENTION: Debian Bookworm sudoers default correctly changes the PATH for root user. Without this, 'cmd.sh', 'bootOnce', etc, will all FAIL - such commands as 'sudo -n poweroff' will FAIL .
55849+
sudo -n rm -f "$globalVirtFS"/etc/sudoers
5578855850
_getMost_backend_aptGetInstall sudo
55789-
55851+
cat << CZXWXcRMTo8EmM8i4d | sudo -n tee -a "$globalVirtFS"/etc/sudoers > /dev/null
55852+
#_____
55853+
#Defaults env_reset
55854+
#Defaults mail_badpass
55855+
#Defaults secure_path="/root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
55856+
55857+
Defaults env_keep += "currentChroot"
55858+
Defaults env_keep += "chrootName"
55859+
55860+
root ALL=(ALL:ALL) ALL
55861+
#user ALL=(ALL:ALL) NOPASSWD: ALL
55862+
#pi ALL=(ALL:ALL) NOPASSWD: ALL
55863+
55864+
user ALL=(ALL:ALL) NOPASSWD: ALL
55865+
55866+
%admin ALL=(ALL:ALL) NOPASSWD: ALL
55867+
%sudo ALL=(ALL:ALL) NOPASSWD: ALL
55868+
%wheel ALL=(ALL:ALL) NOPASSWD: ALL
55869+
#%sudo ALL=(ALL:ALL) ALL
55870+
55871+
# Important. Prevents possibility of appending to sudoers again by 'rotten_install.sh' .
55872+
# End users may delete this long after dist/OS install is done.
55873+
#noMoreRotten
55874+
55875+
CZXWXcRMTo8EmM8i4d
5579055876

5579155877
_messagePlain_nominal 'hostnamectl'
5579255878
_getMost_backend_aptGetInstall hostnamectl

0 commit comments

Comments
 (0)