it's possible to run as non-root user with pam_unix

Bug #907483 reported by Kenny Gryp
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
percona-pam-for-mysql
Fix Released
High
Hrvoje Matijakovic

Bug Description

The documentation states that if you want to use pam_unix, you need to run mysql as root.

That's not really necessary.

You can just add the mysql user to the shadow group. This shadow group at least exists in ubuntu:

root@lucid64:/var/lib/mysql# getent group shadow
shadow:x:42:mysql

root@lucid64:/var/lib/mysql# ls -alhs /etc/shadow
4.0K -rw-r----- 1 root shadow 912 Dec 21 10:39 /etc/shadow

pam_unix Authentication just works then

Related branches

Revision history for this message
Kenny Gryp (gryp) wrote :

Note: you need to restart mysql for the group changes to have effect

Changed in percona-pam-for-mysql:
status: New → Triaged
importance: Undecided → High
milestone: none → percona-full-pam
Changed in percona-pam-for-mysql:
assignee: nobody → Hrvoje Matijakovic (hrvojem)
Changed in percona-pam-for-mysql:
status: Triaged → Fix Committed
Changed in percona-pam-for-mysql:
status: Fix Committed → Fix Released
Revision history for this message
Raghavendra D Prabhu (raghavendra-prabhu) wrote :

Providing group access to shadow file to mysql's group is also
bad since a mysql vulnerability can lead to entire system being
compromised.

The right way is to use unix_chkpwd helper, however, it is
currently not working, hence I have raised https://bugs.launchpad.net/percona-pam-for-mysql/+bug/1086795 for the same.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.