Page 1 of 1

Finding locked accounts.

Posted: Mon Oct 03, 2016 3:12 pm
by jcwuerfl
Anyone have any ideas on best/easiest way to check for any locked accounts on Linux? red hat 5/6 specifically

I see this one out there :

https://exchange.nagios.org/directory/P ... expiration

But that gives me:

Code: Select all

Can't locate Nagios/Plugin.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at ./check_passwd_expiration.pl line 18.
BEGIN failed--compilation aborted at ./check_passwd_expiration.pl line 18.
So not sure if I can use that with NagiosXI or not.

Yes it seems that module is there though ..

[root@apmnp002 ~]# find / -type f -name Plugin.pm
/usr/local/share/perl5/Nagios/Monitoring/Plugin.pm

Although:

[root@apmnp002 ~]# rpm -qa | grep -i perl-Nagios-Plugin
[root@apmnp002 ~]#
[root@apmnp002 ~]#
[root@apmnp002 ~]# yum search perl-Nagios-Plugin
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: lug.mtu.edu
* epel: mirror.steadfast.net
* extras: ftp.linux.ncsu.edu
* rpmforge: mirror1.hs-esslingen.de
* updates: mirrors.arsc.edu
============================================================== N/S Matched: perl-Nagios-Plugin ===============================================================
perl-Nagios-Plugin.noarch : Family of perl modules to streamline writing Nagios
perl-Nagios-Plugin-WWW-Mechanize.noarch : Login to a web page as a user and get data as a Nagios plugin


So do I need to install that? will it work with NagiosXI ?


Thanks!

Re: Finding locked accounts.

Posted: Mon Oct 03, 2016 5:02 pm
by rkennedy
How did you install it perl-Nagios-Plugins? It should be populating when you search for it with rpm -qa.

Code: Select all

[root@localhost libexec]# yum install perl-Nagios-Plugin -y
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
 * base: mirror.eboundhost.com
 * epel: mirror.steadfast.net
 * extras: mirrors.gigenet.com
 * updates: denver.gaminghost.co
Resolving Dependencies
--> Running transaction check
---> Package perl-Nagios-Plugin.noarch 0:0.35-1.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===================================================================================================================
 Package                            Arch                   Version                      Repository            Size
===================================================================================================================
Installing:
 perl-Nagios-Plugin                 noarch                 0.35-1.el6                   epel                  61 k

Transaction Summary
===================================================================================================================
Install       1 Package(s)

Total download size: 61 k
Installed size: 108 k
Downloading Packages:
perl-Nagios-Plugin-0.35-1.el6.noarch.rpm                                                    |  61 kB     00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : perl-Nagios-Plugin-0.35-1.el6.noarch                                                            1/1
  Verifying  : perl-Nagios-Plugin-0.35-1.el6.noarch                                                            1/1

Installed:
  perl-Nagios-Plugin.noarch 0:0.35-1.el6

Complete!
After install -

Code: Select all

[root@localhost libexec]# rpm -qa | grep -i perl-Nagios-Plugin
perl-Nagios-Plugin-0.35-1.el6.noarch

Re: Finding locked accounts.

Posted: Tue Oct 04, 2016 7:05 am
by jcwuerfl
Must have been there as apart of the OVA that I deployed? So is it ok to install that? is it supported with XI ?

Re: Finding locked accounts.

Posted: Tue Oct 04, 2016 9:11 am
by rkennedy
Yes, it is OK to install with XI.