Fix user creation message and secure sudoers file

This commit is contained in:
deadcxap
2025-08-25 11:00:33 +03:00
parent 1768a58344
commit d77414f9bc
+2 -2
View File
@@ -151,8 +151,8 @@ EOF"
}
create_user() {
run "Creating user $" bash -c "id '$USERNAME' >/dev/null 2>&1 || adduser --disabled-password --gecos '' '$USERNAME'"
run "Granting sudo privileges to $USERNAME" bash -c "usermod -aG sudo '$USERNAME' && printf '%s ALL=(ALL) NOPASSWD:ALL\\n' '$USERNAME' >/etc/sudoers.d/90-$USERNAME"
run "Creating user $USERNAME" bash -c "id '$USERNAME' >/dev/null 2>&1 || adduser --disabled-password --gecos '' '$USERNAME'"
run "Granting sudo privileges to $USERNAME" bash -c "usermod -aG sudo '$USERNAME' && printf '%s ALL=(ALL) NOPASSWD:ALL\\n' '$USERNAME' >/etc/sudoers.d/90-$USERNAME && chmod 0440 /etc/sudoers.d/90-$USERNAME"
}
configure_ssh() {