Kerya techblog

Most Read Posts

  • Gentoo mail (postfix + postfixadmin + dovecot + amavisd-new + roundcube)
  • Zabbix - no such instance currently exists at this oid
  • LVM cant Boot - ALERT /dev/mapper/ubuntu--vg-root does not exist DROPPING to Shell -
  • liquidsoap-1.1.1 gentoo install
  • Laravel manual user register
  • Gentoo: php 5.6.0 + pecl-memcached 2.2.0 install script
  • Zabbix APC Smart UPS monitoring on FreeBSD with snmp
  • Squid 3.4 debian 7 install script
  • Подключение Foxgate S6224-S2 Ubuntu minicom
  • Abills
  • exim+dovecot+postfixadmin+clamav+spamassassin on FreeBSD
  • Openmeetings 2.1.1 Ubuntu 12.04.2 installation
  • libtool version mismatch pecl gentoo
  • Securing NTP
  • FreeBSD 9 ossec setup errors fix
  • fix for - corrupted record for package (pkgdep line without argument), ignoring
  • snmpd less verbose log FreeBSD (Connection from UDP messages)
  • Mikrotik no-ip ddns update script
  • Скопировать права mysql gentoo
  • mysql backup scripts
  1. Вы здесь:  
  2. Home
  • Home
  • Все статьи

Greenbone Vulnerability Manager (GVM) hacks

Подробности
Автор: Kirill

After creating user via web interface you can only get admin role but not superadmin role. Creating user via cli

# gvmd --create-user=gigauser -v --role="Super Admin"

may give no result:

Authentication failure for 'gigauser' from unix_socket

You can not change role via webinterface.

To assign user superadmin role directly in database:

# docker compose exec pg-gvm /bin/bash

# psql -U root gvmd

gvmd=# select * from roles;

remember required role

gvmd=# select * from users;

remember user id

gvmd=# select * from role_users;

remember required id

gvmd=# update role_users set role=6 where id=37;

 

elasticsearch cluster red status fix due to high watermark

Подробности
Автор: Kirill

Do not delete elasticsearch files with rm on filesystem, use es api instead.

curl -X GET "localhost:9200/_cluster/health" | jq

or

curl -X GET -u elastic:YourGigaPassword "localhost:9200/_cluster/health" | jq

"status": "red"

List indicies sorted by size:

curl -X GET "localhost:9200/_cat/indices?s=store.size:asc" 

Delete index:

curl -X DELETE  "localhost:9200/.ds-logs-kubernetes.container_logs-default-2024.11.12-000002"

After that setup index lifecycle management.

 Links:

https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete.html

https://www.elastic.co/guide/en/elasticsearch/reference/8.13/indices-delete-index.html

https://stackoverflow.com/questions/61327189/how-to-sort-kibana-indices-by-descending-size

https://stackoverflow.com/questions/24960902/how-to-get-a-list-of-elasticsearch-indices-sorted-by-name

https://www.elastic.co/guide/en/elasticsearch/reference/7.17/cat-indices.html

https://www.elastic.co/guide/en/elasticsearch/reference/8.13/cat-indices.html

 

ubuntu arrow keys misbehaviour fix

Подробности
Автор: Kirill

Sometimes happens when arrow keys stop working as expected in ubuntu, up arrow which usually stand for search back in history become printscreen and other arrows stop working at all, you can't move cursor, etc.

Fix is easy:

$ sudo udevadm trigger --subsystem-match=input --action=change

Source:

https://askubuntu.com/questions/675476/reset-keyboard-layout-to-default-and-wipe-out-all-earlier-settings

 

 

icinga IIS monitoring powershell error Get-WmiObject : Invalid namespace "root\WebAdministration"

Подробности
Автор: Kirill

 

$ '/usr/lib64/nagios/plugins/custom_checks/nrpe_nsclient/nrpe_nsclient.sh' '-H' 'supermega.giga.host.com' -p 5665 -c check_ms_iis_application_pool --args 'DefaultAppPool'

Get-WmiObject : Invalid namespace "root\WebAdministration"
At C:\Program Files\NSClient++\scripts\check_ms_iis_application_pool.ps1:320
char:40
+ ... ProcessId = Get-WmiObject -NameSpace 'root\WebAdministration' -class ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Get-WmiObject], Management
Exception
+ FullyQualifiedErrorId : GetWMIManagementException,Microsoft.PowerShell.C
ommands.GetWmiObjectCommand

OK: Application Pool Started but no process is assigned yet "DefaultAppPool" with 0 Applications. {CPU: 0%}{Memory: 0MB} |'pool_cpu'=0%;;;0;100 'pool_memory'=0MB;;;0 'app_count'=0

Resolution:

You may not have IIS Management Scripts and Tools installed on server(s). You can install it from Server Manager -> Web Server Role -> Role Services -> Management Tools -> IIS Management Scripts and Tools. Make sure you have checked option "IIS Management Scripts and Tools" option

https://stackoverflow.com/questions/41451689/invalid-namespace-root-webadministration-on-iis-7-0

Run:

powershell.exe Install-WindowsFeature -Name Web-Scripting-Tools

  1. Make user superadmin in zabbix
  2. dnf Error: unknown option

Страница 1 из 17

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10

Search

Older Posts

  • Greenbone Vulnerability Manager (GVM) hacks (51)
  • elasticsearch cluster red status fix due to high watermark (51)
  • ubuntu arrow keys misbehaviour fix (64)
  • icinga IIS monitoring powershell error Get-WmiObject : Invalid namespace "root\WebAdministration" (76)
  • Make user superadmin in zabbix (74)
  • dnf Error: unknown option (103)
  • unpack pfx certificate (used for apache or nginx) (109)
  • mysql audit plugin build script (279)
  • mysql dump one row (90)
  • redmine 5 docker-compose (190)
  • gitlab runner dind docker-compose (136)
  • AWS S3 IAM policy to limit to single sub folder (139)
  • logrotate hints (189)
  • bash script to clean files to required percentage (314)
  • Ansible create LVM and mount (726)

Login Form

  • Забыли пароль?
  • Забыли логин?
  • Регистрация