GNU grep なら

$ grep -Po '^.+?(?=:.+:/bin/bash$)' /etc/passwd