6057 login(1) "Last login" hostname is too short
Reviewed by: Gary Mills <gary_mills@fastmail.fm>
Reviewed by: Albert Lee <trisk@omniti.com>
Reviewed by: Jason King <jason.brian.king@gmail.com>
Reviewed by: Alex Wilson <alex.wilson@joyent.com>

   1 '\" te
   2 .\" Copyright (C) 2002, Sun Microsystems, Inc.
   3 .\" All Rights Reserved
   4 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
   5 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
   6 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
   7 .TH PAM_UNIX_SESSION 5 "Sep 9, 2004"
   8 .SH NAME
   9 pam_unix_session \- session management PAM module for UNIX
  10 .SH SYNOPSIS
  11 .LP
  12 .nf
  13 \fBpam_unix_session.so.1\fR
  14 .fi
  15 
  16 .SH DESCRIPTION
  17 .sp
  18 .LP
  19 The \fBpam_unix_session\fR module implements \fBpam_sm_open_session\fR(3PAM)
  20 and \fBpam_sm_close_session\fR(3PAM).
  21 .sp
  22 .LP
  23 \fBpam_sm_open_session()\fR updates the \fB/var/adm/lastlog\fR file with the
  24 information contained in the \fBPAM_USER\fR, \fBPAM_TTY\fR, and
  25 \fBPAM_RHOSTS\fR items. \fBpam_unix_account\fR(5) uses this account to

  26 determine the previous time the user logged in.
  27 .sp
  28 .LP
  29 \fBpam_sm_close_session()\fR is a null function.
  30 .sp
  31 .LP
  32 The following options can be passed to the module:
  33 .sp
  34 .ne 2
  35 .na
  36 \fBdebug\fR
  37 .ad
  38 .RS 9n
  39 \fBsyslog\fR(3C) debugging information at the \fBLOG_DEBUG\fR level
  40 .RE
  41 
  42 .SH ERRORS
  43 .sp
  44 .LP
  45 Upon successful completion, \fBPAM_SUCCESS\fR is returned. The following error
  46 codes are returned upon error:
  47 .sp
  48 .ne 2
  49 .na
  50 \fB\fBPAM_SESSION_ERR\fR\fR
  51 .ad
  52 .RS 20n
  53 Cannot make or remove the entry for the specified session (PAM_TTY is not
  54 present).
  55 .RE
  56 
  57 .sp
  58 .ne 2
  59 .na
  60 \fB\fBPAM_USER_UNKNOWN\fR\fR
  61 .ad
  62 .RS 20n
  63 No account is present for \fIuser\fR.
  64 .RE
  65 
  66 .SH ATTRIBUTES
  67 .sp
  68 .LP
  69 See \fBattributes\fR(5) for descriptions of the following attributes:
  70 .sp
  71 
  72 .sp
  73 .TS
  74 box;
  75 c | c
  76 l | l .
  77 ATTRIBUTE TYPE  ATTRIBUTE VALUE
  78 _
  79 Interface Stability     Evolving
  80 _
  81 MT Level        MT-Safe with exceptions
  82 .TE
  83 
  84 .SH SEE ALSO
  85 .sp
  86 .LP
  87 \fBpam\fR(3PAM), \fBpam_authenticate\fR(3PAM), \fBsyslog\fR(3C),
  88 \fBlibpam\fR(3LIB), \fBpam.conf\fR(4), \fBnsswitch.conf\fR(4),
  89 \fBattributes\fR(5), \fBpam_authtok_check\fR(5), \fBpam_authtok_get\fR(5),
  90 \fBpam_authtok_store\fR(5), \fBpam_dhkeys\fR(5), \fBpam_passwd_auth\fR(5),
  91 \fBpam_unix_account\fR(5),\fBpam_unix_auth\fR(5),
  92 .SH NOTES
  93 .sp
  94 .LP
  95 The interfaces in \fBlibpam\fR(3LIB) are MT-Safe only if each thread within the
  96 multi-threaded application uses its own PAM handle.
  97 .sp
  98 .LP
  99 The \fBpam_unix\fR(5) module is no longer supported. Similar functionality is
 100 provided by \fBpam_authtok_check\fR(5), \fBpam_authtok_get\fR(5),
 101 \fBpam_authtok_store\fR(5), \fBpam_dhkeys\fR(5), \fBpam_passwd_auth\fR(5),
 102 \fBpam_unix_account\fR(5), \fBpam_unix_auth\fR(5), and
 103 \fBpam_unix_session\fR(5).
--- EOF ---