pam_setcred.3 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. .\" $XConsortium: pam_setcred.3 /main/5 1996/10/29 15:19:22 drk $
  2. .\" Sccs id goes here
  3. '\"macro stdmacro
  4. .\" Copyright (c) 1995, Sun Microsystems, Inc.
  5. .\" All Rights Reserved
  6. .nr X
  7. .TH pam_setcred 3 "9 Jan 1996"
  8. .SH NAME
  9. pam_setcred \- modify\/delete user credentials for
  10. an authentication service
  11. .SH SYNOPSIS
  12. .LP
  13. .B cc
  14. .RI "[ " "flag" " \|.\|.\|. ] " "file" " \|.\|.\|."
  15. .B \-lpam
  16. .RI "[ " "library" " \|.\|.\|. ]"
  17. .LP
  18. .nf
  19. .ft 3
  20. #include <security/pam_appl.h>
  21. .ft
  22. .fi
  23. .LP
  24. .\" .BI "int pam_setcred(pam_handle_t " "*pamh" ,
  25. .\" .BI "int " flags");
  26. \fBint pam_setcred(pam_handle_t \fI*pamh\fB, int \fIflags\fB);
  27. .SH DESCRIPTION
  28. .IX "pam_setcred" "" "\fLpam_setcred\fP \(em request setting credentials"
  29. .B pam_setcred(\|)
  30. is used to establish, modify, or delete user credentials.
  31. .B pam_setcred(\|)
  32. is typically called after the user has been authenticated
  33. and after a session has been opened (refer to
  34. .BR pam_authenticate (3),
  35. .BR pam_acct_mgmt (3),
  36. and
  37. .BR pam_open_session (3)).
  38. .LP
  39. The user is specified by a prior call to
  40. .B pam_start(\|)
  41. or
  42. .B pam_set_item(\|),
  43. and is referenced by the authentication handle,
  44. .IR pamh.
  45. The following flags may be set in the
  46. .IR flags
  47. field. Note that the first four flags are mutually exclusive:
  48. .RS
  49. .IP "PAM_CRED_ESTABLISH" 26
  50. Set user credentials for an authentication service
  51. .IP "PAM_CRED_DELETE" 26
  52. Delete user credentials associated with an authentication service
  53. .IP "PAM_CRED_REINITIALIZE" 26
  54. Reinitialize user credentials
  55. .IP "PAM_CRED_REFRESH" 26
  56. Extend lifetime of user credentials
  57. .IP "PAM_SILENT" 26
  58. Authentication service should not generate any messages
  59. .RE
  60. .LP
  61. If none of the flags are set, PAM_CRED_ESTABLISH
  62. is used as the default.
  63. .SH "RETURN VALUES"
  64. .PP
  65. Upon success,
  66. .B pam_setcred(\|)
  67. returns PAM_SUCCESS.
  68. In addition to the error return values described in
  69. .BR pam (3),
  70. the following values may be returned upon error:
  71. .RS
  72. .IP PAM_CRED_UNAVAIL 25
  73. Underlying authentication service can not retrieve user credentials unavailable
  74. .IP PAM_CRED_EXPIRED 25
  75. User credentials expired
  76. .IP PAM_USER_UNKNOWN 25
  77. User unknown to underlying authentication service
  78. .IP PAM_CRED_ERR 25
  79. Failure setting user credentials
  80. .RE
  81. .SH "SEE ALSO"
  82. .BR pam (3),
  83. .BR pam_start (3),
  84. .BR pam_authenticate (3),
  85. .BR pam_acct_mgmt (3),
  86. .BR pam_open_session (3)