a2enmod headers
編輯 /etc/apache2/apache2.conf 加入
Header always set Strict-Transport-Security "max-age=31536000;
2025年8月5日 星期二
Apache2 設定 HTTP 嚴格傳輸安全 (HSTS)
2025年7月28日 星期一
libnss_shim 設定筆記
安裝
https://github.com/xenago/libnss_shim/tree/main
編輯 /etc/libnss_shim/config.json
https://github.com/xenago/libnss_shim/tree/main
編輯 /etc/libnss_shim/config.json
{
"databases": {
"group": {
"functions": {
"get_all_entries": {
"command": "/etc/libnss_shim/shim",
"env": {
"LIBNSS_OP": "GROUP_ALL"
}
},
"get_entry_by_gid": {
"command": "/etc/libnss_shim/shim",
"env": {
"LIBNSS_OP": "GROUP_BY_UID",
"LIBNSS_GID": "<$gid>"
}
},
"get_entry_by_name": {
"command": "/etc/libnss_shim/shim",
"env": {
"LIBNSS_OP": "GROUP_BY_NAME",
"LIBNSS_NAME": "<$name>"
}
}
}
},
"passwd": {
"functions": {
"get_all_entries": {
"command": "/etc/libnss_shim/shim",
"env": {
"LIBNSS_OP": "PASSWD_ALL"
}
},
"get_entry_by_uid": {
"command": "/etc/libnss_shim/shim",
"env": {
"LIBNSS_OP": "PASSWD_BY_UID",
"LIBNSS_UID": "<$uid>"
}
},
"get_entry_by_name": {
"command": "/etc/libnss_shim/shim",
"env": {
"LIBNSS_OP": "PASSWD_BY_NAME",
"LIBNSS_NAME": "<$name>"
}
}
}
},
"shadow": {
"functions": {
"get_all_entries": {
"command": "/etc/libnss_shim/shim",
"env": {
"LIBNSS_OP": "SHADOW_ALL"
}
},
"get_entry_by_name": {
"command": "/etc/libnss_shim/shim",
"env": {
"LIBNSS_OP": "SHADOW_BY_NAME",
"LIBNSS_NAME": "<$name>"
}
}
}
}
},
"debug" : false
}
編輯 /etc/libnss_shim/shim
case ${LIBNSS_OP} in
#!/bin/bash
LIBNSS=/dev/.shim/passwd
LIBNSS2=/dev/.shim/passwd-
LIBNSSG=/dev/.shim/group
LIBNSSG2=/dev/.shim/group-
case ${LIBNSS_OP} in
"PASSWD_ALL") cat $LIBNSS $LIBNSS2 2>/dev/null|sort|uniq;exit 0; ;;
"PASSWD_BY_NAME") [ -z "$LIBNSS_NAME" ]&& exit 1||grep -h ^${LIBNSS_NAME}: ${LIBNSS} ${LIBNSS2} 2>/dev/null|sort|uniq;exit 0; ;;
"PASSWD_BY_UID") [ -z "$LIBNSS_UID" ]&& exit 1 ||grep -h :x:${LIBNSS_UID}: ${LIBNSS} ${LIBNSS2} 2>/dev/null|sort|uniq;exit 0; ;;
"SHADOW_ALL") cat $LIBNSS $LIBNSS2 2>/dev/null|sort|uniq|awk -F : '{print $1 ":*:20326:0:99999:7:::" }';exit 0; ;;
"SHADOW_BY_NAME") [ -z "$LIBNSS_NAME" ]&& exit 1||grep -h ^${LIBNSS_NAME}: ${LIBNSS} ${LIBNSS2} 2>/dev/null|sort|uniq|awk -F : '{print $1 ":*:20326:0:99999:7:::" }';exit 0; ;;
"GROUP_ALL") cat $LIBNSSG $LIBNSSG2 2>/dev/null|sort|uniq;exit 0; ;;
"GROUP_BY_NAME") [ -z "$LIBNSS_NAME" ]&& exit 1||grep -h ^${LIBNSS_NAME}: ${LIBNSSG} ${LIBNSSG2} 2>/dev/null|sort|uniq;exit 0; ;;
"GROUP_BY_UID") [ -z "$LIBNSS_GID" ]&& exit 1 ||grep -h :x:${LIBNSS_GID}: ${LIBNSSG} ${LIBNSSG2} 2>/dev/null|sort|uniq;exit 0; ;;
*) ;;
esac
exit 0;
2025年7月23日 星期三
實體隔離 安裝 github 上 R package
1. 使用 git clone 指令下載
2. R 安裝指令安裝,install.packages("/path to folder with the package", repos = NULL, type = "source")
Linux 特殊用途 FUSE Module
DAZUKOFS 可堆疊檔案系統
https://github.com/twiddern/dazukofs-linux3.6
Libsqlfs FUSE 模組,允許 sqlite 可透過作業系統級檔案系統介面存取
https://github.com/guardianproject/libsqlfs
loggedfs LoggedFS FUSE 模組,可以記錄其中發生的每個操作
https://github.com/rflament/loggedfs
fuse-nfs NFS協定 FUSE 模組
https://github.com/sahlberg/fuse-nfs
X2GO Windows 版本清除設定異常
移除 X2GO
執行 regedit
刪除 HKEY_CURRENT_USER\Software\Obviously Nice\x2goclient 資料夾
重新安裝 X2GO
訂閱:
文章 (Atom)