To escape special character, we just add a \ (backslash) before it. Instead of:
grep '.' /etc/login.defs
grep '\.' /etc/login.defs