How to I comment a line in /etc/sudoers file using Chef Recipe? : I want to comment **"Defaults    requiretty"** line present in ***/etc/sudoers*** file using Chef. If it is already commented, the ruby code should skip commenting it. I'm using CentOS 6.7 operating system.