iankelling.org
/
git
/
automated-distro-installer
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
set sudo group earlier to be safe
[automated-distro-installer]
/
fai
/
config
/
distro-install-common
/
end
diff --git
a/fai/config/distro-install-common/end
b/fai/config/distro-install-common/end
index 57b71159f62352228b8f53f28fb0b3ae89e138f8..b248bd31e7759b17a96c77ae1f33bee83db94c81 100755
(executable)
--- a/
fai/config/distro-install-common/end
+++ b/
fai/config/distro-install-common/end
@@
-80,6
+80,10
@@
echo "fs.inotify.max_user_watches = 50000" >> $f
# applies it. it would be also be applied after a reboot
$ROOTCMD sysctl --system
# applies it. it would be also be applied after a reboot
$ROOTCMD sysctl --system
+if getent group sudo >/dev/null; then
+ usermod -aG sudo iank
+fi
+
cat >$target/etc/sudoers.d/ianksudoers <<'EOF'
Defaults timestamp_timeout=1440
# used in bashrc
cat >$target/etc/sudoers.d/ianksudoers <<'EOF'
Defaults timestamp_timeout=1440
# used in bashrc
@@
-100,6
+104,14
@@
Defaults:root,iank !log_allowed, !pam_session
Defaults>root env_file=/etc/rootsudoenv
EOF
Defaults>root env_file=/etc/rootsudoenv
EOF
+case $HOSTNAME in
+ li|bk|je)
+ cat >>$target/etc/sudoers.d/ianksudoers <<'EOF'
+iank ALL=(ALL) NOPASSWD: ALL
+EOF
+ ;;
+esac
+
# remove old config line. can be removed eventually.
f=$target/etc/sudoers
line='iank ALL=(ALL) NOPASSWD: ALL'
# remove old config line. can be removed eventually.
f=$target/etc/sudoers
line='iank ALL=(ALL) NOPASSWD: ALL'