2023年3月21日 星期二

Syslog Facility

Facility
code Keyword Description
0 kern         Kernel messages
1 user         User-level messages
2 mail         Mail system
3 daemon System daemons
4 auth         Security/authentication messages
5 syslog Messages generated internally by syslogd
6 lpr         Line printer subsystem
7 news Network news subsystem
8 uucp UUCP subsystem
9 cron          Cron subsystem
10 authpriv         Security/authentication messages
11 ftp         FTP daemon
12 ntp         NTP subsystem
13 security         Log audit
14 console Log alert
15 solaris-cron Scheduling daemon
16 local0 Locally used facilities
17 local1 Locally used facilities
18 local2 Locally used facilities
19 local3 Locally used facilities
20 local4 Locally used facilities
21 local5 Locally used facilities
22 local6 Locally used facilities
23 local7 Locally used facilities

2023年3月6日 星期一

syslog Severity level

Severity level
Value Severity Keyword Deprecated keywords
0 Emergency emerg panic[9]
1 Alert alert
2 Critical         crit
3 Error err         error
4 Warning warning warn
5 Notice notice
6 Informational info
7 Debug debug

Alpine Linux 轉換版本至 edge

1.修改 /etc/apk/repositories (相關指令 setup-apkrepos)
https://dl-cdn.alpinelinux.org/alpine/edge/main
https://dl-cdn.alpinelinux.org/alpine/edge/community
https://dl-cdn.alpinelinux.org/alpine/edge/testing

2.apk update  && apk upgrade ( apk -U upgrade /  apk --update-cache upgrade)


版本資訊  /etc/alpine-release 

Changing Active Directory Password Using smbpasswd

Debian  / Ubuntu / Kali Linux /Raspbian
apt-get install samba-common-bin

Alpine
apk add samba

Arch Linux
pacman -S samba

CentOS
yum install samba-common-tools

Fedora
dnf install samba-common-tools-2

smbpasswd -U <username> -r <domainController>

skipping - it appears to have holes.

swapon: /tmp/swapfile: skipping - it appears to have holes.

可能是 zfs 檔案系統

pve zfs 新增 swap

zfs create -V 4G -b $(getconf PAGESIZE) -o compression=zle \
      -o logbias=throughput -o sync=always \
      -o primarycache=metadata -o secondarycache=none \
      -o com.sun:auto-snapshot=false rpool/swap

swapoff -a
mkswap -f /dev/zvol/rpool/swap
swapon /dev/zvol/rpool/swap

echo /dev/zvol/rpool/swap none swap defaults 0 0 >> /etc/fstab

BSD-syslog format (RFC 3164)

The total message cannot be longer than 1024 bytes.

A BSD-syslog message consists of the following parts:
PRI  -  represents the Facility and Severity of the message. It's a calculated value: Facility * 8 + Severity
HEADER  -  contains a timestamp and the hostname (without the domain name) or the IP address of the device.
MSG  -  contains the name of the program or process that generated the message, and the text of the message itself