su apache: "This account is currently not available"

When trying to switch user to apache and you get the following: "This account is currently not available". You need to set a shell for the apache user. Let's say we want to use bash.

# chsh -s /bin/bash apache

You should get this prompt:

Changing shell for apache.
Shell changed.

Done! Now you should be able to su as apache.

Tagged under: apache, bash, shell, su, chsh