Commit b44e6028 authored by Michael Shigorin's avatar Michael Shigorin

deflogin: added sudoers security note

/etc/sudoers is persistent with regard to userdel(8) so removing a LiveCD user isn't going to drop this kind of the added privilege and might result in an unintended grant of those by adding a user with the same name after permanent LiveCD installation. This has been spotted by Speccyfighter: https://bugzilla.altlinux.org/31071
parent 0dfab0ce
......@@ -18,6 +18,7 @@ set_password() { echo "$1:$2" | chpasswd; }
set_admin() { usermod -a --groups "wheel" "$1"; }
# NB: one must care to purge this from LiveCD if it's installed permanently
set_sudo() {
[ ! -w "/etc/sudoers" ] ||
echo "$1 ALL=(ALL) ALL" >> "/etc/sudoers"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment