is there a possibility to use a (mysql) Database to manage SSH login credentials instead of /etc/passwd ?
I know I could use ldap but I only want simple user management and ldap seems a little bit overpowered for this job.
Yes. Linux authentication is based around the pluggable authentication modules (PAM) which allows for easy switching from one authentication backend to another. Simply install and configure a PAM MySQL module, with a corresponding user database in MySQL.
Pre-compiled packages are available in the EPEL archive for RHEL/CentOS as
While PAM-MySQL can manage login credentials, it is an incomplete solution, since it only handles the authentication portion. It does not create a user account on the system. For example:
In other words, PAM-MySQL is a replacement for
LDAP is indeed the better tool for the job, as you will be able to centralize the user account information in one place. I don't believe it is overpowered. Rather it's a kind of database that is specially designed to manage user accounts, so best practice would be to just use LDAP as a standard solution rather than hacking together a non-standard system with MySQL. Either OpenLDAP or 389 Directory Server would be a more appropriate user database than MySQL. (Both of them can be configured to use an SQL back-end, if you insist.)