Outils pour utilisateurs

Outils du site


blog

Err ssh - Authentication refused bad ownership or modes for directory

chmod 700 ~
# Ou
#chmod 750 ~
 
chmod 700 ~/.ssh
chmod 600 ~/.ssh/*
chown -R $USER ~/.ssh/
2025/04/15 15:26 · Jean-Baptiste
,

Notes NSClient (Agent Nagios / Centreon pour windows)

Flux

PORT SENS SERVICE PLUGIN
12489/tcp NAGIOS ⇒ HOTE NSClientServer check_nt
5666/tcp NAGIOS ⇒ HOTE NRPEServer check_nrpe / check_centreon_nrpe3
5667/tcp NAGIOS ⇐ HOTE NSCAClient
8443/tcp NAGIOS ⇒ HOTE NSClientServer (restapi)
80 or 443/tcp NAGIOS ⇐ HOTE NRDPClient

En plus de

PORT SENS SERVICE NOTE
ICMP NAGIOS ⇒ HOTE PING
161/udp NAGIOS ⇒ HOTE SNMP
162/udp NAGIOS ⇐ HOTE SNMP Traps
# Port 5666
check_nrpe -H localhost -c check_load
 
# Pour 1248
check_nt -H 192.168.1.10 -p 1248 -v UPTIME
check_nt -H 192.168.1.10 -p 1248 -v CLIENTVERSION
check_nt -H 192.168.1.10 -p 1248 -v INSTANCES -l Process
 
#check_nt!CPULOAD!-l 5,80,90
#check_nt!MEMUSE!-w 80 -c 90
#check_nt!USEDDISKSPACE!-l c -w 80 -c 90
$ /usr/lib64/nagios/plugins/check_nt -H 10.12.50.61 -p 12489 -s 'P@ssw0rd' -v USEDDISKSPACE -d SHOWALL -l c
c:\ - total: 49.90 Gb - used: 11.78 Gb (24%) - free 38.12 Gb (76%) | 'c:\ Used Space'=11.78Gb;0.00;0.00;0.00;49.90

Rest API

Changer

; Section for REST API users
[/settings/WEB/server/users/centreon]
password=centreon
role=limited

en

; Section for REST API users
[/settings/WEB/server/users/SupUser]
password=P@ssw0rd
role=limited
Autres

The NSClient++ password can be found by running:

nscp web -- password --display

or you can sett a new password:

nscp web -- password --set new-password

Debug

nscp web password set=icinga --debug

If you want to fill this file with all available options run the following command:

nscp settings --generate --add-defaults --load-all

If you want to activate a module and bring in all its options use:

nscp settings --activate-module <MODULE NAME=""> --add-defaults

For details run:

nscp settings --help

Conf

Voir :

nsclient.ini

[/settings/default]
password =Str0ngPassw0rd
; PORT NUMBER - Port to use for check_nt.
port = 12489
 
[/modules]
NSClientServer = 1
CheckDisk = 1
CheckEventLog = 1
WebServer = 0
Scheduler = 1
 
[/settings/default]
allowed hosts = 127.0.0.1,10.133.134.0/24,10.136.243.0/24
timeout = 30
 
[/settings/log]
level = debug
[/settings/default]
allowed hosts = 0.0.0.0/0
password = P@ssw0rd
port = 12489
 
[/modules]
WEBServer = 1
NRPEServer = 0
NSClientServer = 1
 
[/settings/WEB/server]
; ALLOWED HOSTS - A coma separated list of allowed hosts. You can use netmasks (/ syntax) or * to create ranges.
allowed hosts = 0.0.0.0/0
 
[/settings/WEB/server/users/Sup]
password = P@ssw0rd
role=limited

Multi instance - Multiple NSClient++

nscp service --install --name nscp2

Source : https://nsclient.org/docs/installing/

Old

[Settings]
use_file=1
 
[modules]
NRPEListener.dll
NSClientListener.dll
;CheckWMI.dll
CheckSystem.dll

If you want to fill this file with all available options run the following command:

nscp settings --generate --add-defaults --load-all

If you want to activate a module and bring in all its options use:

nscp settings --activate-module <MODULE NAME> --add-defaults

For details run:

nscp settings --help

Notes

NSCA - Nagios Service Check Acceptor : Supervision en mode actif

Err

# /usr/lib64/nagios/plugins/check_nt -H 10.12.50.61 -p 12489 -s 'P@ssw0rd' -v UPTIME
could not fetch information from server
Solution

Dans mon cas il fallait autoriser le serveur Nagios par son nom ou son IP dans le fichier NSC.ini

2025/04/15 15:22 · Jean-Baptiste

Monter un ficher VMDK

Voir aussi :

Voir :

  • supermin (utilisé en backend par virt-filesystems)

Install

apt-get install libguestfs-tools
#apt-get install linux-image-generic

Lister les partitions

# virt-filesystems -a plop_disk0.vmdk
/dev/sda1
/dev/vghome/lvhome
/dev/vgsyst/lvopt
/dev/vgsyst/lvroot
/dev/vgsyst/lvtmp
/dev/vgsyst/lvusr
/dev/vgsyst/lvvar

Montage de la partition

mkdir -p /mnt/vm/root
guestmount -a plop_disk0.vmdk -m /dev/vgsyst/lvroot --ro /mnt/vm/root

Autre

Debug de virt-filesystems

export LIBGUESTFS_DEBUG=1 LIBGUESTFS_TRACE=1

Err - error mount_options mount exited with status 32 mount /sysroot: can't read superblock

# guestmount -a PLOP_disk0.vmdk -m /dev/vghome/lvhome /mnt/vm/home/
libguestfs: error: mount_options: mount exited with status 32: mount: /sysroot: can't read superblock on /dev/mapper/vghome-lvhome.
       dmesg(1) may have more information after failed mount system call.
guestmount: ‘/dev/vghome/lvhome’ could not be mounted.
guestmount: Did you mean to mount one of these filesystems?
guestmount:     /dev/sda1 (ext3)
guestmount:     /dev/vghome/lvhome (ext3)
Solution

Monter la partition en lecture seule

guestmount -a PLOP_disk0.vmdk -m /dev/vghome/lvhome --ro /mnt/vm/home/
2025/04/09 15:59 · Jean-Baptiste

Lancer des applications Android sous GNU Linux

Voir :

WayDroid

WayDroid fonctionne sous Wayland

waydroid first-launch
Err WayDroid session is stopped
Solution
waydroid container start
2025/04/07 14:15 · Jean-Baptiste

Note crack ASM Assembly reverse

Ghidra

Voir :

sudo snap install ghidra

Exe2asm avec objdump

objdump -d app.exe
2025/04/04 17:44 · Jean-Baptiste
blog.txt · Dernière modification : de 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki