I will tell you how to become rich. Close the doors. Be fearful when others are greedy. Be greedy when others are fearful.
Attribution checked
Quothly found supporting evidence for this attribution.
Wikiquote documents the wording and cites Buffett using the line in interviews and shareholder letters (e.g., Charlie Rose interview and Berkshire Hathaway letters).
Wikiquote — Warren Buffett