Dirname: invalid option -- 'b'

“MOTD” is short for “message of the day”, and is the traditional method for displaying a message to users on login.

But now that I glanced at the screenshot a second time, the error warning appears after the “Last login” message. That means it’s not the motd, but from some login scripts (like /etc/profile, ~/.bash_profile)