Documentation
¶
Overview ¶
Package axiospam contains functionality to Authenticate a User with Pluggable Authentication Modules (PAM). Currently, all this package does is check the validity of a user's login passphrase. See http://www.linux-pam.org/Linux-PAM-html/ for more information.
You will need to have a pam module file called axiospam in your pam.d folder.
Example: $cat /etc/pam.d/axiospam #%PAM-1.0 # default for a centos system, auth required Pamsepermit.so auth substack password-auth auth include postlogin # if we only want the local system use only this #auth required Pamunix.so
This also links to libpam so you will need to have libpam-devel installed. on Ubuntu the pam-devel package is called libpam0g-dev
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PamResult ¶
type PamResult int
PamResult is the result of a call to Authenticate
const ( PamSuccess PamResult = 0 /* Successful function return */ PamOpenERR PamResult = 1 /* dlopen() failure when dynamically */ PamSymbolERR PamResult = 2 /* Symbol not found */ PamServiceERR PamResult = 3 /* Error in service module */ PamSystemERR PamResult = 4 /* System error */ PamBufERR PamResult = 5 /* Memory buffer error */ PamPermDenied PamResult = 6 /* Permission denied */ PamAuthERR PamResult = 7 /* Authentication failure */ PamCredInsufficient PamResult = 8 /* Can not access authentication data */ PamUserUnknown PamResult = 10 /* User not known to the underlying */ PamMaxTries PamResult = 11 /* An authentication service has */ PamNewAuthTokReqd PamResult = 12 /* New authentication token required. */ PamAcctExpired PamResult = 13 /* User account has expired */ PamSessiionERR PamResult = 14 /* Can not make/remove an entry for */ PamCredExpired PamResult = 16 /* User credentials expired */ PamCredERR PamResult = 17 /* Failure setting user credentials */ PamNoModuleData PamResult = 18 /* No module specific data is present */ PamConvERR PamResult = 19 /* Conversation error */ PamAuthTokERR PamResult = 20 /* Authentication token manipulation error */ PamAuthTokRecoveryERR PamResult = 21 /* Authentication information */ PamAuthTokLockBusy PamResult = 22 /* Authentication token lock busy */ PamAuthTokDisableAging PamResult = 23 /* Authentication token aging disabled */ PamTryAgain PamResult = 24 /* Preliminary check by password service */ PamIgnore PamResult = 25 /* Ignore underlying account module */ PamAbort PamResult = 26 /* Critical error (?module fail now request) */ PamAuthTokExpired PamResult = 27 /* user's authentication token has expired */ PamModuleUnknown PamResult = 28 /* module is not known */ PamBadItem PamResult = 29 /* Bad item passed to Pam*_item() */ PamConvAgain PamResult = 30 /* conversation function is event driven and data is not available yet */ PamIncomplete PamResult = 31 /* please call this function again to */ )
func AccountFlags ¶
AccountFlags get the User Account Flags from Pam
func Authenticate ¶
Authenticate takes the username and password and checks it with PAM
func ChangePassword ¶
ChangePassword will call the pam system to change the users password