PAM-Modules |
|
A Collection of Modules for PAM |
Sergey Poznyakoff |
The examples subdirectory of the pam-modules
distribution contains a program usergitconfig
which
is designed to customize user’s .gitconfig file using
attributes from his LDAP entry.
The command reads the .gitconfig file and replaces any occurrence of ‘${attr}’ with the value of the LDAP attribute attr. Not defined attributes are replaced with empty strings.
To use this utility with pam_ldaphome
, first make sure
you have Perl Net::LDAP
module installed. Copy
usergitconfig
to some location of preference (say,
/usr/libexec), and add the following to pam_ldaphome
configuration file:
skel /etc/skel initrc-command /usr/libexec/usergitconfig
The /etc/skel directory should contain the file .gitconfig. Suppose its contents is as follows:
[user] name = ${cn} email = ${mail}
Then, after successful completion of pam_ldaphome
, the
user’s .gitconfig file will contain his real name and email
set properly from the database.
For the gituserconfig
LDAP configuration options, see
ldap.conf statements.
This document was generated on August 11, 2021 using makeinfo.
Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.