Here is a list of links describing the principle of least privileges:
https://digitalguardian.com/blog/what-principle-least-privilege-polp-best-practice-information-security-and-compliance
https://en.wikipedia.org/wiki/Principle_of_least_privilege
Author Archives: jasiu
Jak rozwiązać równanie z dwiema niewiadomymi
Z pomocą idzie sagemath
http://doc.sagemath.org/html/en/reference/calculus/sage/symbolic/expression.html
Są również inne programy np. Derive, dostępne tutaj [1] [2]
Wystarczy zdefiniować poszczególne równania dla x i y
Zaznaczyć #1 #2
Wykonać SOLVE dla równań #1 i #2 czyli Solve->System (Ctrl+Shift+Y), wpisując w oknie ‘Solve 2 equation(s)’ w polu 1 – #1, w polu 2 – #2
Na równaniu #3 wykonać Simplify (Ctrl+B)
Po otrzymaniu wyniku na #4 wykonać Approximate (Ctrl+G)
Problems installing mate-icon-theme on FreeBSD
[Update]
Try to rebuild mapping util
# pkg which /usr/local/libexec/icon-name-mapping
/usr/local/libexec/icon-name-mapping was installed by package icon-naming-utils-0.8.90_1
# portmaster -D icon-naming-utils
Just in case mount yours ports tree on /usr/ports
# mount -t nullfs /usr/jails/ports /usr/ports
Build and install package
# make install
===> Installing for mate-icon-theme-1.18.2
===> Checking if mate-icon-theme already installed
===> Registering installation for mate-icon-theme-1.18.2
pkg-static: Unable to access file /usr/ports/x11-themes/mate-icon-theme/work/stage/usr/local/share/icons/mate/16x16/actions/add.png:No such file or directory
pkg-static: Unable to access file /usr/ports/x11-themes/mate-icon-theme/work/stage/usr/local/share/icons/mate/16x16/actions/appointment.png:No such file or directory
pkg-static: Unable to access file /usr/ports/x11-themes/mate-icon-theme/work/stage/usr/local/share/icons/mate/16x16/actions/back.png:No such file or directory
pkg-static: Unable to access file /usr/ports/x11-themes/mate-icon-theme/work/stage/usr/local/share/icons/mate/16x16/actions/bookmark_add.png:No such file or directory
pkg-static: Unable to access file /usr/ports/x11-themes/mate-icon-theme/work/stage/usr/local/share/icons/mate/16x16/actions/bookmarks_list_add.png:No such file or directory
pkg-static: Unable to access file /usr/ports/x11-themes/mate-icon-theme/work/stage/usr/local/share/icons/mate/16x16/actions/bottom.png:No such file or directory
pkg-static: Unable to access file /usr/ports/x11-themes/mate-icon-theme/work/stage/usr/local/share/icons/mate/16x16/actions/centrejust.png:No such file or directory
pkg-static: Unable to access file /usr/ports/x11-themes/mate-icon-theme/work/stage/usr/local/share/icons/mate/16x16/actions/down.png:No such file or directory
pkg-static: Unable to access file /usr/ports/x11-themes/mate-icon-theme/work/stage/usr/local/share/icons/mate/16x16/actions/editclear.png:No such file or directory
pkg-static: Unable to access file /usr/ports/x11-themes/mate-icon-theme/work/stage/usr/local/share/icons/mate/16x16/actions/editcopy.png:No such file or directory
(snip)
pkg-static: Unable to access file /usr/ports/x11-themes/mate-icon-theme/work/stage/usr/local/share/icons/menta/48x48/status/gnome-netstatus-txrx.png:No such file or directory
pkg-static: Unable to access file /usr/ports/x11-themes/mate-icon-theme/work/stage/usr/local/share/icons/menta/48x48/status/nm-adhoc.png:No such file or directory
pkg-static: Unable to access file /usr/ports/x11-themes/mate-icon-theme/work/stage/usr/local/share/icons/menta/48x48/status/nm-device-wired.png:No such file or directory
pkg-static: Unable to access file /usr/ports/x11-themes/mate-icon-theme/work/stage/usr/local/share/icons/menta/48x48/status/nm-device-wireless.png:No such file or directory
pkg-static: Unable to access file /usr/ports/x11-themes/mate-icon-theme/work/stage/usr/local/share/icons/menta/48x48/status/nm-no-connection.png:No such file or directory
pkg-static: Unable to access file /usr/ports/x11-themes/mate-icon-theme/work/stage/usr/local/share/icons/menta/48x48/status/stock_open.png:No such file or directory
*** Error code 74
Stop.
make: stopped in /usr/ports/x11-themes/mate-icon-theme
Create text file with output and create not existing files then finally install package
# make install > & output.txt
# cat output.txt | grep Unable | awk '{print $6}' | cut -d ':' -f 1 | xargs touch
# make install
===> Installing for mate-icon-theme-1.18.2
===> Checking if mate-icon-theme already installed
===> Registering installation for mate-icon-theme-1.18.2
Installing mate-icon-theme-1.18.2...
Meltdown and Spectre
- CVE-2017-5715 (branch target injection – Spectre)
- CVE-2017-5753 (bounds check bypass – Spectre)
- CVE-2017-5754 (rogue data cache load – Meltdown)
Meltdown
https://security.archlinux.org/CVE-2017-5754
Lokalny, łatwiejszy to załatania, występuje na procesorach Intela
Spectre
https://security.archlinux.org/CVE-2017-5715
https://security.archlinux.org/CVE-2017-5753
Zdalny, trudniejszy do za latania, występuje na różnych procesorach Intel, AMD, ARM
Status w systemie FreeBSD
https://reviews.freebsd.org/D13797
Informacja z list dyskusyjnych
https://lists.freebsd.org/pipermail/freebsd-security/2018-January/009719.html
Lista patchy per OS (link z OVH)
https://docs.ovh.com/fr/dedicated/meltdown-spectre-kernel-update-per-operating-system/
Komentarz związany z Nginx
https://www.nginx.com/blog/nginx-response-to-the-meltdown-and-spectre-vulnerabilities/
Checker dla Linuxa
https://github.com/speed47/spectre-meltdown-checker
Debian postinstall
Stop avahi
# systemctl disable avahi-daemon
Enable rc.local capability/compatibility
# echo $'#!/bin/sh -e\nexit 0'
Log X-Forwarded-For
https://httpd.apache.org/docs/current/mod/mod_remoteip.html
https://www.loadbalancer.org/blog/apache-and-x-forwarded-for-headers/
uncoment
#LoadModule remoteip_module libexec/apache24/mod_remoteip.so
In
RemoteIPHeader X-Forwarded-For
LogFormat “%{X-Forwarded-For}i %h %l %u %t \”%r\” %>s %b \”%{Referer}i\” \”%{User-Agent}i\ ” combine
LogFormat “%{X-Forwarded-For}i %h %l %u %t \”%r\” %s %b \”%{Referer}i\” \”%{User-agent}i\”” combined-forwarded
# apachectl configtest
# /usr/local/etc/rc.d/apache24 restart
convert text in command line
more sometext | iconv -f iso8859-2 -t utf8 |more
where iso8859-2 is orginal encoding and utf8 is desired encoding of the text file
GPG
Jak zainstalować gpg
W Linux/Unix
zainstaluj gnupg, kgpg, kleopatra
https://gnupg.org/software/frontends.html
W Windows
https://www.gpg4win.org
lub
Zainteresuj się choco
Zainstaluj Gpg4Win
C:\> choco install gpg4win
Jak wyeksportować klucz prywatny
List (private) secret keys
$ gpg -K
Export private key
$ gpg --export-secret-key -a keynumber > private_mykey1.key
Gdzie w Linux/Unix trzymane są klucze
~/.gnupg
Gdzie w Windows trzymane są klucze
c:\Users\user\Appdata\Roaming\gnupg
Jak zaimportować klucz z serwera kluczy
gpg --keyserver key.server.url --recv-keys keyid
Woob
slow graid mirror rebuild
Setting kern.geom.raid.idle_threshold to lower value increases speed of rebuilding graid mirror and transfer on ada1 disk
https://www.freebsd.org/cgi/man.cgi?graid(8)
root@thirdeye:/usr/ports # sysctl kern.geom.raid.idle_threshold=1000000
kern.geom.raid.idle_threshold: 10000 -> 1000000
root@thirdeye:/usr/ports # iostat 1 -1
tty ada0 ada1 ada2 cpu
tin tout KB/t tps MB/s KB/t tps MB/s KB/t tps MB/s us ni sy in id
0 3 59.55 18 1.06 114.09 7 0.80 6.10 2 0.01 2 0 1 0 97
0 533 86.86 14 1.18 128.00 8 0.99 0.00 0 0.00 0 0 0 0 100
0 374 32.00 6 0.19 0.00 0 0.00 0.00 0 0.00 0 0 0 0 100
0 194 32.00 6 0.19 0.00 0 0.00 0.00 0 0.00 0 0 0 0 100
0 193 32.00 6 0.19 0.00 0 0.00 0.00 0 0.00 1 0 0 0 99
0 190 80.00 16 1.23 128.00 8 0.99 0.00 0 0.00 1 0 1 0 99
0 197 32.00 2 0.06 0.00 0 0.00 0.00 0 0.00 0 0 0 0 100
0 188 32.00 4 0.12 0.00 0 0.00 0.00 0 0.00 0 0 0 0 100
0 199 32.00 6 0.19 0.00 0 0.00 0.00 0 0.00 0 0 0 0 99
0 194 96.00 12 1.14 128.00 8 1.01 0.00 0 0.00 3 0 0 0 97
0 186 35.56 9 0.30 0.00 0 0.00 0.00 0 0.00 5 0 1 0 94
0 195 108.80 20 2.16 128.00 16 2.03 0.00 0 0.00 0 0 0 0 100
0 200 32.00 4 0.13 0.00 0 0.00 0.00 0 0.00 0 0 0 0 100
^C 3 294 32.00 3 0.09 0.00 0 0.00 0.00 0 0.00 1 0 1 0 99
root@thirdeye:/usr/ports # sysctl kern.geom.raid.idle_threshold=10000
kern.geom.raid.idle_threshold: 1000000 -> 10000
root@thirdeye:/usr/ports # iostat 1 -1
tty ada0 ada1 ada2 cpu
tin tout KB/t tps MB/s KB/t tps MB/s KB/t tps MB/s us ni sy in id
0 3 59.57 18 1.07 114.09 7 0.80 6.10 2 0.01 2 0 1 0 97
0 536 126.54 478 59.02 127.74 473 58.95 0.00 0 0.00 7 0 2 0 91
0 373 126.37 427 52.75 127.26 425 52.88 0.00 0 0.00 11 0 1 0 88
0 196 127.16 459 56.94 128.00 448 56.06 0.00 0 0.00 2 0 1 0 97
0 188 126.36 451 55.60 128.00 446 55.72 0.00 0 0.00 2 0 1 0 97
0 205 126.31 387 47.78 127.34 386 48.04 0.00 0 0.00 0 0 1 0 99
0 196 127.15 451 55.97 128.00 440 54.97 0.00 0 0.00 0 0 0 0 99
0 196 126.73 456 56.40 128.00 457 57.09 0.00 0 0.00 0 0 0 0 100
0 197 126.09 434 53.39 128.00 423 52.83 0.00 0 0.00 0 0 0 0 99
0 197 126.67 433 53.58 128.00 425 53.14 0.00 0 0.00 0 0 0 0 100
0 198 126.91 441 54.69 127.78 441 55.07 0.00 0 0.00 0 0 0 0 99
0 196 127.24 420 52.20 127.70 417 52.02 0.00 0 0.00 0 0 0 0 99
0 193 126.75 453 56.13 128.00 441 55.08 0.00 0 0.00 0 0 0 0 99
0 199 127.14 452 56.16 128.00 454 56.79 0.00 0 0.00 0 0 3 1 96
0 196 125.17 427 52.19 126.96 421 52.19 0.00 0 0.00 6 0 1 1 93
0 195 125.48 417 51.09 128.00 398 49.75 0.00 0 0.00 15 0 3 0 82
0 193 126.76 460 56.89 128.00 458 57.20 0.00 0 0.00 5 0 1 0 94
0 198 126.66 434 53.62 128.00 428 53.56 0.00 0 0.00 0 0 0 0 99
0 194 126.51 447 55.19 127.79 444 55.38 0.00 0 0.00 5 0 2 0 92
0 200 127.11 441 54.70 128.00 433 54.07 0.00 0 0.00 0 0 0 0 100
0 193 127.14 435 54.04 128.00 429 53.67 0.00 0 0.00 0 0 0 1 99
^C 2 227 127.02 450 55.80 128.00 449 56.08 0.00 0 0.00 0 0 0 0 100
root@thirdeye:/usr/ports # graid status
Name Status Components
raid/r0 DEGRADED ada0 (ACTIVE (ACTIVE))
ada1 (ACTIVE (REBUILD 46%))
raid/r1 OPTIMAL ada2 (ACTIVE (ACTIVE))
ada3 (ACTIVE (ACTIVE))