When adding to the sudoers file a newline is not added at the end of the file and if you are using amazon userdata scripts to make additional changes to the sudoers file it will break unless you know to prepend the additional changes w/ a newline.
I basically ended up with a sudoers file that ended w/
%foxpass-sudo ALL=(ALL:ALL) NOPASSWD:ALL%Ops ALL = NOPASSWD: ALL
Luckily I caught this on a newly provisioned server before it started to spread to the rest of the infrastructure.
A few takeaways from this:
- I'm not sure if I like the idea of Foxpass deciding what groups are going to be given sudo rights automatically, perhaps it should configurable in the web interface if anything
- I should have pinned the version of the setup script in my userdata script instead of using
https://raw.githubusercontent.com/foxpass/foxpass-setup/master/linux/ubuntu/16.04/foxpass_setup.py which has the possibility of changing between server provisioning
When adding to the sudoers file a newline is not added at the end of the file and if you are using amazon userdata scripts to make additional changes to the sudoers file it will break unless you know to prepend the additional changes w/ a newline.
I basically ended up with a sudoers file that ended w/
%foxpass-sudo ALL=(ALL:ALL) NOPASSWD:ALL%Ops ALL = NOPASSWD: ALLLuckily I caught this on a newly provisioned server before it started to spread to the rest of the infrastructure.
A few takeaways from this:
https://raw.githubusercontent.com/foxpass/foxpass-setup/master/linux/ubuntu/16.04/foxpass_setup.pywhich has the possibility of changing between server provisioning