Windows vagrant breaks sudoerc

Running vagrant on windows I bumped in the following issue doing sudo:

sudo: >>> /etc/sudoers.d/logreaders: syntax error near line 5 <<<

sudo: >>> /etc/sudoers.d/logreaders: syntax error near line 6 <<<

sudo: >>> /etc/sudoers.d/logreaders: syntax error near line 7 <<<

sudo: >>> /etc/sudoers.d/logreaders: syntax error near line 8 <<<

...

After some investigation I discovered that

/etc/sudoers.d/logreaders

got windows line endings.

Fixed by running:

sed -i 's/\r//g' /etc/sudoers.d/logreaders

 

Advertisements

About andrewosipenko

Java dev. Groovy dev. Grails dev. Project man.
This entry was posted in Linux. Bookmark the permalink.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s