[CentOS] Why does 'mysql' user has /bin/bash shell?

Fri Jan 10 20:41:14 UTC 2014
Warren Young <warren at etr-usa.com>

On 1/10/2014 00:40, Luigi Rosa wrote:
>
> I checked in my CentOS 6 installations.
>
> Only one (the latest) has this issue, so it could be something added/modified
> in the lastest months.

I don't see how that can be.  I've checked the spec file in the 
mysql.src.rpm for every 6.x point release from 6.0 through 6.5, and they 
*all* have this command:

/usr/sbin/useradd -M -o -r -d /var/lib/mysql -s /bin/bash \
     -c "MySQL Server" -u 27 mysql > /dev/null 2>&1 || :

Actually, later versions add "-N -g mysql" to this, which as far as I 
can tell is basically pointless.  It tells useradd to do exactly what it 
would have done by default anyway.  It should have no bearing on this issue.

> Other installations starting from June 2013 (included) does NOT have this
> issue and the shell of mysql user is /sbin/nologin

I have one from March 2013, and it *does* have /bin/bash as user mysql's 
shell.