~hrvojem/percona-pam-for-mysql/theme-makefile

« back to all changes in this revision

Viewing changes to doc/source/manual.rst

  • Committer: Laurynas Biveinis
  • Date: 2011-11-14 13:59:59 UTC
  • mfrom: (13.1.3 docs)
  • Revision ID: laurynas.biveinis@percona.com-20111114135959-4jxfjsd0yynvlyy6
MergeĀ lp:~stewart/percona-pam-for-mysql/basic-docs

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
   :maxdepth: 1
9
9
   :hidden:
10
10
 
11
 
Manual goes here.
 
11
Configuring PAM for MySQL
 
12
=========================
 
13
 
 
14
You will need to configure PAM on your system for how it should authenticate for MySQL. A simple setup can be to use the standard UNIX authentication method.
 
15
 
 
16
*NOTE:* Using pam_unix means the MySQL Server needs to read the `/etc/shadow` file, which usually means it has to be run as `root` - usually not a recommended configuration.
 
17
 
 
18
A sample `/etc/pam.d/mysqld` file: ::
 
19
 
 
20
  auth       required     pam_unix.so
 
21
  account    required     pam_unix.so
 
22
 
 
23
For added information in the system log, you can expand it to be: ::
 
24
 
 
25
  auth       required     pam_warn.so
 
26
  auth       required     pam_unix.so audit
 
27
  account    required     pam_unix.so audit
 
28
 
 
29
 
 
30
Creating A User
 
31
===============
 
32
 
 
33
You will need to execute `CREATE USER` with specifying the PAM plugin. For example: ::
 
34
 
 
35
  CREATE USER 'username'@'host' IDENTIFIED WITH auth_pam_server;
 
36
 
 
37
This creates a user `username` that can connect from `host` and will be authenticated using the PAM plugin. If you are using the `pam_unix` method in PAM (or similar) you will need to have an account for `username` existing on the system.