V8.00.000.2025.06.17
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 1m7s
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 1m7s
Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
@@ -54,6 +54,7 @@ accounts_setup() {
|
||||
install -d -m 0700 -o root -g root "${TARGET}/root/.ssh"
|
||||
install -m 0600 -o root -g root /dev/null "${TARGET}/root/.ssh/authorized_keys"
|
||||
install -m 0600 -o root -g root "${VAR_SETUP_PATH}/includes/target/etc/skel/.bashrc" "${TARGET}/root/"
|
||||
install -m 0600 -o root -g root "${VAR_SETUP_PATH}/includes/target/etc/skel/.ciss/theme_eza_ciss.yml" "${TARGET}/root/.ciss/"
|
||||
|
||||
if [[ "${user_root_shell}" == "/bin/zsh" ]]; then
|
||||
|
||||
@@ -189,7 +190,18 @@ EOF
|
||||
|
||||
[[ "${user_root_authentication_2fa_tty}" == "true" ]] && pam_access_totp_enable "root" "login"
|
||||
|
||||
### 7) Final status logging.
|
||||
### 7) Install eza themes.
|
||||
eza_installer "root"
|
||||
|
||||
### 8) Double check permissions.
|
||||
### Directories: 0700
|
||||
find "${TARGET}/root" -type d -exec chmod 0700 {} +
|
||||
### Executable files: 0700 (any x-bit set)
|
||||
find "${TARGET}/root" -type f -perm /111 -exec chmod 0700 {} +
|
||||
### Non-executable files: 0600
|
||||
find "${TARGET}/root" -type f ! -perm /111 -exec chmod 0600 {} +
|
||||
|
||||
### 9) Final status logging.
|
||||
do_log "info" "file_only" "4520() User: 'root' updated."
|
||||
|
||||
|
||||
@@ -247,6 +259,7 @@ EOF
|
||||
--shell "${var_shell}" \
|
||||
--uid "${var_uid}" \
|
||||
"${var_username}"
|
||||
eza_installer "${var_username}"
|
||||
;;
|
||||
|
||||
true:false)
|
||||
@@ -427,6 +440,34 @@ EOF
|
||||
guard_dir && return 0
|
||||
}
|
||||
|
||||
#######################################
|
||||
# Install eza CISS theme for the respective user.
|
||||
# Globals:
|
||||
# TARGET
|
||||
# Arguments:
|
||||
# 1: Username
|
||||
# Returns:
|
||||
# 0: on success
|
||||
#######################################
|
||||
eza_installer() {
|
||||
### Declare Arrays, HashMaps, and Variables.
|
||||
declare var_user="${1}"
|
||||
case "${1}" in
|
||||
root) declare var_base="/root" ;;
|
||||
*) declare var_base="/home/${var_user}" ;;
|
||||
esac
|
||||
|
||||
chroot_script "${TARGET}" "
|
||||
cd ${var_base}
|
||||
git clone https://github.com/eza-community/eza-themes.git
|
||||
mkdir -p ${var_base}/.config/eza
|
||||
"
|
||||
|
||||
ln -sf "${TARGET}${var_base}/.ciss/theme_eza_ciss.yml" "${TARGET}${var_base}/.config/eza/theme.yml"
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
#######################################
|
||||
# Generates a deterministic TOTP secret based on:
|
||||
# Username, FQDN, MFA salt, MFA master seed
|
||||
|
||||
Reference in New Issue
Block a user