Build precise queries to find exactly what you need
Press ESC to close
Your review has been submitted and is pending approval.
Check linux account password expiration by scanning /etc/passwd file and verifying password expiration via chage command. A list of account expiring in less than x days is displayed. This plugin works only on Linux.
Current Version
1.1
Last Release Date
2014-06-05
Owner
Elio Canale-Parola
Download URL
https://github.com/elio78/nagios
License
GPL
Compatible With
This nagios plugin checks the password expiration using the command chage. The user running this plugin (nagios) must be allowed to run chage under root user This implies to add an authorization via sudoer config file. As an example, this is the file i added under /etc/sudoers.d directory : #------------------- User_Alias NAGIOS = nagios NAGIOS ALL = NOPASSWD: /usr/bin/chage -l * Defaults:NAGIOS !requiretty #-------------------
The output is the following : - PASSWD_EXPIRATION OK - ALL VALUES ARE OK!, Excluded account(s): [none] - PASSWD_EXPIRATION CRITICAL - Exp < 5j:[root], Excluded account(s): [none] - PASSWD_EXPIRATION WARNING - Exp < 6j:[accnt01, accnt02], Excluded account(s): [none]
help output : check_passwd_expiration 1.1 [http://fr.linkedin.com/in/eliocanaleparola/]
Verify password expiration for all accounts defined within /etc/passwd
Usage: check_passwd_expiration
-?, --usage Print usage information -h, --help Print detailed help screen -V, --version Print version information --extra-opts=[section][@file] Read options from an ini file. See http://nagiosplugins.org/extra-opts for usage and examples. -w, --warning=STRING warning value in days. When a password will expire in <w or less> days, a warning message is sent -c, --critical=STRING critical value in days. When a password will expire in <ci or less> days, a critical message is sent -x, --exclusion=STRING Excluded account list, Format: [account01:account02:account03:...] -T, --trace=STRING Activate trace mode if value different from 0 -t, --timeout=INTEGER Seconds before plugin times out (default: 15) -v, --verbose Show details for command-line debugging (can repeat up to 3 times)
Script works, but it has limitations as below: - Warning is always overridden by critical value - It can list only users with exact critical value. That is if password expiry days is 6 and critical value is set to 6, it will list username, but if expiry days is 5 and critical value, 6, it won't list username; only shows Critical status. - To improve script more, you can include an option to "include" (same as exclude) users option
You must be logged in to submit a review.
To:
From: