2001-05-14 11:23:58 +00:00
|
|
|
.\"
|
|
|
|
.\" $Id: pam_krb5.5,v 1.5 2000/01/05 00:59:56 fcusack Exp $
|
|
|
|
.\" $FreeBSD$
|
2001-06-13 21:52:07 +00:00
|
|
|
.Dd January 15, 1999
|
2001-07-06 07:29:59 +00:00
|
|
|
.Dt PAM_KRB5 8
|
|
|
|
.Os
|
2001-06-13 21:52:07 +00:00
|
|
|
.Sh NAME
|
|
|
|
.Nm pam_krb5
|
|
|
|
.Nd Kerberos 5 PAM module
|
|
|
|
.Sh SYNOPSIS
|
|
|
|
.Pa /usr/lib/pam_krb5.so
|
|
|
|
.Sh DESCRIPTION
|
2001-05-14 11:23:58 +00:00
|
|
|
The Kerberos 5 service module for PAM, typically
|
2001-06-13 21:52:07 +00:00
|
|
|
.Pa /usr/lib/pam_krb5.so ,
|
2001-05-14 11:23:58 +00:00
|
|
|
provides functionality for three PAM categories:
|
|
|
|
authentication,
|
|
|
|
account management,
|
|
|
|
and password management.
|
|
|
|
It also provides null functions for session management.
|
|
|
|
The
|
2001-06-13 21:52:07 +00:00
|
|
|
.Pa pam_krb5.so
|
2001-05-14 11:23:58 +00:00
|
|
|
module is a shared object
|
|
|
|
that can be dynamically loaded to provide
|
|
|
|
the necessary functionality upon demand.
|
|
|
|
Its path is specified in the
|
2001-06-13 21:52:07 +00:00
|
|
|
PAM configuration file.
|
|
|
|
.Ss Kerberos 5 Authentication Module
|
2001-05-14 11:23:58 +00:00
|
|
|
The Kerberos 5 authentication component
|
2001-06-13 21:52:07 +00:00
|
|
|
provides functions to verify the identity of a user
|
|
|
|
.Pq Fn pam_sm_authenticate
|
2001-05-14 11:23:58 +00:00
|
|
|
and to set user specific credentials
|
2001-06-13 21:52:07 +00:00
|
|
|
.Pq Fn pam_sm_setcred .
|
|
|
|
.Fn pam_sm_authenticate
|
2001-05-14 11:23:58 +00:00
|
|
|
converts the supplied username into a Kerberos principal,
|
|
|
|
by appending the default local realm name.
|
|
|
|
It also supports usernames with explicit realm names.
|
2001-11-24 23:41:32 +00:00
|
|
|
If a realm name is supplied, then upon a successful return, it
|
2001-05-14 11:23:58 +00:00
|
|
|
changes the username by mapping the principal name into a local username
|
2001-06-13 21:52:07 +00:00
|
|
|
(calling
|
2001-07-06 07:29:59 +00:00
|
|
|
.Fn krb5_aname_to_localname ) .
|
2001-06-13 21:52:07 +00:00
|
|
|
This typically just means
|
2001-05-14 11:23:58 +00:00
|
|
|
the realm name is stripped.
|
2001-06-13 21:52:07 +00:00
|
|
|
.Pp
|
2001-05-14 11:23:58 +00:00
|
|
|
It prompts the user for a password and obtains a new Kerberos TGT for
|
2001-07-06 07:29:59 +00:00
|
|
|
the principal.
|
|
|
|
The TGT is verified by obtaining a service
|
2001-05-14 11:23:58 +00:00
|
|
|
ticket for the local host.
|
2001-06-13 21:52:07 +00:00
|
|
|
.Pp
|
2001-05-14 11:23:58 +00:00
|
|
|
When prompting for the current password, the authentication
|
2001-07-06 07:29:59 +00:00
|
|
|
module will use the prompt
|
|
|
|
.Dq Li "Password for <principal>:" .
|
2001-06-13 21:52:07 +00:00
|
|
|
.Pp
|
2001-05-14 11:23:58 +00:00
|
|
|
The
|
2001-06-13 21:52:07 +00:00
|
|
|
.Fn pam_sm_setcred
|
2001-05-14 11:23:58 +00:00
|
|
|
function stores the newly acquired credentials in a credentials cache,
|
|
|
|
and sets the environment variable
|
2001-06-13 21:52:07 +00:00
|
|
|
.Ev KRB5CCNAME
|
2001-05-14 11:23:58 +00:00
|
|
|
appropriately.
|
|
|
|
The credentials cache should be destroyed by the user at logout with
|
2001-06-13 21:52:07 +00:00
|
|
|
.Xr kdestroy 1 .
|
|
|
|
.Pp
|
2001-05-14 11:23:58 +00:00
|
|
|
The following options may be passed to the authentication module:
|
2001-07-13 09:09:52 +00:00
|
|
|
.Bl -tag -width ".Cm use_first_pass"
|
2001-07-06 07:29:59 +00:00
|
|
|
.It Cm debug
|
2001-06-13 21:52:07 +00:00
|
|
|
.Xr syslog 3
|
2001-05-14 11:23:58 +00:00
|
|
|
debugging information at
|
2001-06-13 21:52:07 +00:00
|
|
|
.Dv LOG_DEBUG
|
2001-05-14 11:23:58 +00:00
|
|
|
level.
|
2001-08-15 20:05:33 +00:00
|
|
|
.It Cm no_warn
|
|
|
|
suppress warning messages to the user.
|
|
|
|
These messages include
|
|
|
|
reasons why the user's
|
|
|
|
authentication attempt was declined.
|
2001-07-06 07:29:59 +00:00
|
|
|
.It Cm use_first_pass
|
2001-05-14 11:23:58 +00:00
|
|
|
If the authentication module is not the first in the stack,
|
|
|
|
and a previous module obtained the user's password, that password is
|
2001-07-06 07:29:59 +00:00
|
|
|
used to authenticate the user.
|
|
|
|
If this fails, the authentication
|
2001-05-14 11:23:58 +00:00
|
|
|
module returns failure without prompting the user for a password.
|
|
|
|
This option has no effect if the authentication module is
|
|
|
|
the first in the stack, or if no previous modules obtained the
|
|
|
|
user's password.
|
2001-07-06 07:29:59 +00:00
|
|
|
.It Cm try_first_pass
|
2001-05-14 11:23:58 +00:00
|
|
|
This option is similar to the
|
2001-07-06 07:29:59 +00:00
|
|
|
.Cm use_first_pass
|
2001-05-14 11:23:58 +00:00
|
|
|
option, except that if the previously obtained password fails, the
|
|
|
|
user is prompted for another password.
|
2001-07-06 07:29:59 +00:00
|
|
|
.It Cm forwardable
|
2001-05-14 11:23:58 +00:00
|
|
|
Obtain forwardable Kerberos credentials for the user.
|
2001-07-06 07:29:59 +00:00
|
|
|
.It Cm no_ccache
|
|
|
|
Do not save the obtained credentials in a credentials cache.
|
|
|
|
This is a
|
2001-05-14 11:23:58 +00:00
|
|
|
useful option if the authentication module is used for services such
|
2001-07-06 07:29:59 +00:00
|
|
|
as ftp or pop, where the user would not be able to destroy them.
|
|
|
|
[This
|
2001-05-14 11:23:58 +00:00
|
|
|
is not a recommendation to use the module for those services.]
|
2001-07-06 07:29:59 +00:00
|
|
|
.It Cm ccache Ns = Ns Ar name
|
|
|
|
Use
|
|
|
|
.Ar name
|
|
|
|
as the credentials cache.
|
|
|
|
.Ar name
|
|
|
|
must be in the form
|
|
|
|
.Ar type : Ns Ar residual .
|
2001-05-14 11:23:58 +00:00
|
|
|
The special tokens
|
2001-07-06 07:29:59 +00:00
|
|
|
.Ql %u ,
|
|
|
|
to designate the decimal UID of the user;
|
2001-05-14 11:23:58 +00:00
|
|
|
and
|
2001-07-06 07:29:59 +00:00
|
|
|
.Ql %p ,
|
|
|
|
to designate the current process ID; can be used in
|
|
|
|
.Ar name .
|
2001-06-13 21:52:07 +00:00
|
|
|
.El
|
|
|
|
.Ss Kerberos 5 Account Management Module
|
2001-05-14 11:23:58 +00:00
|
|
|
The Kerberos 5 account management component
|
|
|
|
provides a function to perform account management,
|
2001-06-13 21:52:07 +00:00
|
|
|
.Fn pam_sm_acct_mgmt .
|
2001-05-14 11:23:58 +00:00
|
|
|
The function verifies that the authenticated principal is allowed
|
|
|
|
to login to the local user account by calling
|
2001-06-13 21:52:07 +00:00
|
|
|
.Fn krb5_kuserok
|
2001-07-06 07:29:59 +00:00
|
|
|
(which checks the user's
|
|
|
|
.Pa .k5login
|
|
|
|
file).
|
2001-06-13 21:52:07 +00:00
|
|
|
.Ss Kerberos 5 Password Management Module
|
2001-05-14 11:23:58 +00:00
|
|
|
The Kerberos 5 password management component
|
|
|
|
provides a function to change passwords
|
2001-06-13 21:52:07 +00:00
|
|
|
.Pq Fn pam_sm_chauthtok .
|
|
|
|
The username supplied (the
|
2001-05-14 11:23:58 +00:00
|
|
|
user running the
|
2001-06-13 21:52:07 +00:00
|
|
|
.Xr passwd 1
|
2001-05-14 11:23:58 +00:00
|
|
|
command, or the username given as an argument) is mapped into
|
|
|
|
a Kerberos principal name, using the same technique as in
|
2001-07-06 07:29:59 +00:00
|
|
|
the authentication module.
|
|
|
|
Note that if a realm name was
|
2001-05-14 11:23:58 +00:00
|
|
|
explicitly supplied during authentication, but not during
|
|
|
|
a password change, the mapping
|
|
|
|
done by the password management module may not result in the
|
|
|
|
same principal as was used for authentication.
|
2001-06-13 21:52:07 +00:00
|
|
|
.Pp
|
2001-05-14 11:23:58 +00:00
|
|
|
Unlike when
|
2001-07-06 07:29:59 +00:00
|
|
|
changing a
|
|
|
|
.Ux
|
|
|
|
password, the password management module will
|
2001-05-14 11:23:58 +00:00
|
|
|
allow any user to change any principal's password (if the user knows
|
2001-07-06 07:29:59 +00:00
|
|
|
the principal's old password, of course).
|
|
|
|
Also unlike
|
|
|
|
.Ux ,
|
|
|
|
root
|
2001-05-14 11:23:58 +00:00
|
|
|
is always prompted for the principal's old password.
|
2001-06-13 21:52:07 +00:00
|
|
|
.Pp
|
2001-05-14 11:23:58 +00:00
|
|
|
The password management module uses the same heuristics as
|
2001-06-13 21:52:07 +00:00
|
|
|
.Xr kpasswd 1
|
2001-05-14 11:23:58 +00:00
|
|
|
to determine how to contact the Kerberos password server.
|
2001-06-13 21:52:07 +00:00
|
|
|
.Pp
|
2001-05-14 11:23:58 +00:00
|
|
|
The following options may be passed to the password management
|
|
|
|
module:
|
2001-07-13 09:09:52 +00:00
|
|
|
.Bl -tag -width ".Cm use_first_pass"
|
2001-07-06 07:29:59 +00:00
|
|
|
.It Cm debug
|
|
|
|
.Xr syslog 3
|
2001-05-14 11:23:58 +00:00
|
|
|
debugging information at
|
2001-06-13 21:52:07 +00:00
|
|
|
.Dv LOG_DEBUG
|
2001-05-14 11:23:58 +00:00
|
|
|
level.
|
2001-07-06 07:29:59 +00:00
|
|
|
.It Cm use_first_pass
|
2001-05-14 11:23:58 +00:00
|
|
|
If the password management module is not the first in the stack,
|
|
|
|
and a previous module obtained the user's old password, that password is
|
2001-07-06 07:29:59 +00:00
|
|
|
used to authenticate the user.
|
|
|
|
If this fails, the password
|
2001-05-14 11:23:58 +00:00
|
|
|
management
|
|
|
|
module returns failure without prompting the user for the old password.
|
|
|
|
If successful, the new password entered to the previous module is also
|
2001-07-06 07:29:59 +00:00
|
|
|
used as the new Kerberos password.
|
|
|
|
If the new password fails,
|
2001-05-14 11:23:58 +00:00
|
|
|
the password management module returns failure without
|
|
|
|
prompting the user for a new password.
|
2001-07-06 07:29:59 +00:00
|
|
|
.It Cm try_first_pass
|
2001-05-14 11:23:58 +00:00
|
|
|
This option is similar to the
|
2001-07-06 07:29:59 +00:00
|
|
|
.Cm use_first_pass
|
2001-05-14 11:23:58 +00:00
|
|
|
option, except that if the previously obtained old or new passwords fail,
|
|
|
|
the user is prompted for them.
|
2001-06-13 21:52:07 +00:00
|
|
|
.El
|
|
|
|
.Ss Kerberos 5 Session Management Module
|
2001-05-14 11:23:58 +00:00
|
|
|
The Kerberos 5 session management component
|
|
|
|
provides functions to initiate
|
2001-06-13 21:52:07 +00:00
|
|
|
.Pq Fn pam_sm_open_session
|
2001-05-14 11:23:58 +00:00
|
|
|
and terminate
|
2001-06-13 21:52:07 +00:00
|
|
|
.Pq Fn pam_sm_close_session
|
2001-07-06 07:29:59 +00:00
|
|
|
sessions.
|
|
|
|
Since session management is not defined under Kerberos 5,
|
|
|
|
both of these functions simply return success.
|
|
|
|
They are provided
|
2001-05-14 11:23:58 +00:00
|
|
|
only because of the naming conventions for PAM modules.
|
2001-06-13 21:52:07 +00:00
|
|
|
.Sh ENVIRONMENT
|
|
|
|
.Bl -tag -width "KRB5CCNAME"
|
|
|
|
.It Ev KRB5CCNAME
|
2001-05-14 11:23:58 +00:00
|
|
|
Location of the credentials cache.
|
2001-06-13 21:52:07 +00:00
|
|
|
.El
|
|
|
|
.Sh FILES
|
2001-07-13 09:09:52 +00:00
|
|
|
.Bl -tag -width ".Pa /tmp/krb5cc_ Ns Ar uid" -compact
|
2001-07-06 07:29:59 +00:00
|
|
|
.It Pa /tmp/krb5cc_ Ns Ar uid
|
|
|
|
default credentials cache
|
|
|
|
.Ar ( uid
|
|
|
|
is the decimal UID of the user).
|
2001-06-13 21:52:07 +00:00
|
|
|
.It Pa $HOME/.k5login
|
2001-05-14 11:23:58 +00:00
|
|
|
file containing Kerberos principals that are allowed access.
|
2001-06-13 21:52:07 +00:00
|
|
|
.El
|
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr kdestroy 1 ,
|
|
|
|
.Xr passwd 1 ,
|
|
|
|
.Xr syslog 3 ,
|
|
|
|
.Xr pam.conf 5 ,
|
2001-07-06 07:29:59 +00:00
|
|
|
.Xr pam 8
|
2001-06-13 21:52:07 +00:00
|
|
|
.Sh NOTES
|
2001-05-14 11:23:58 +00:00
|
|
|
Applications should not call
|
2001-06-13 21:52:07 +00:00
|
|
|
.Fn pam_authenticate
|
2001-05-14 11:23:58 +00:00
|
|
|
more than once between calls to
|
2001-06-13 21:52:07 +00:00
|
|
|
.Fn pam_start
|
2001-05-14 11:23:58 +00:00
|
|
|
and
|
2001-06-13 21:52:07 +00:00
|
|
|
.Fn pam_end
|
2001-05-14 11:23:58 +00:00
|
|
|
when using the Kerberos 5 PAM module.
|