- Code: Select all
%sudo ALL=(ALL:ALL) ALL
user ALL=(ALL) NOPASSWD: ALL
Another possible way for the installer to handle sudo is give the user simple choices:
1) disable sudo (recommended, default): Installer could parse these two lines and (in the installation) comment them automatically, using grep|sed
2) enable sudo (optional, maybe with security warning): Just leave "%sudo ALL= (ALL:ALL) ALL" and add $newuser to sudoers group. (IMO) we should not directly support password-less sudo at all, that line should be gone.
3) user edits manually, same as before. Or not, since a user who want custom sudo configs can do so post-install and should already know how to.
That could suit everyone, whether you find doing visudo manually confusing or simply tedious.