目前分類:系統管理 (432)

瀏覽方式: 標題列表 簡短摘要

如果單純只想透過 rsync 被份資料
但出現以下錯誤訊息
rsync: [receiver] chown "filename" failed: Operation not permitted (1)

可以嘗試以下參數解決
rsync -avh --no-perms --no-group --no-owner
 

文章標籤

helloworld 發表在 痞客邦 留言(0) 人氣()

進入 cmd

C:\>tzutil
Windows 時區公用程式

使用方式:
TZUTIL </? | /g | /s TimeZoneID[_dstoff] | /l>

參數:
    /? 顯示使用方式資訊。

    /g 顯示目前的時區識別碼。

    /s TimeZoneID[_dstoff]
       使用指定的時區識別碼設定目前的時區。
       _dstoff 尾碼會停用時區的日光節約時間調整 (適用時)。

    /l 列出所有有效的時區識別碼並顯示名稱。輸出將會如下:

           <顯示名稱>
           <時區識別碼>

範例:
    TZUTIL /g
    TZUTIL /s "Pacific Standard Time"
    TZUTIL /s "Pacific Standard Time_dstoff"

註解:
    結束代碼 0 表示命令已經成功完成。


列出目前設定
C:\>tzutil  /g
Taipei Standard Time

列出可用的時區有哪些?
C:\>tzutil  /l | more
(UTC-12:00) 國際換日線以西
Dateline Standard Time

(UTC-11:00) 國際標準時間-11
UTC-11

(UTC-10:00) 阿留申群島
Aleutian Standard Time

(UTC-10:00) 夏威夷
Hawaiian Standard Time

(UTC-09:30) 馬克沙斯群島
Marquesas Standard Time

(UTC-09:00) 阿拉斯加
Alaskan Standard Time

(UTC-09:00) 國際標準時間-09
UTC-09

(UTC-08:00) 下加利福尼亞
Pacific Standard Time (Mexico)

(UTC-08:00) 太平洋時間 (美國和加拿大)
Pacific Standard Time

(UTC-08:00) 國際標準時間-08
UTC-08
-- More  --

調整成你要變更的時區,調整完後確認時間是否異動成功
C:\>tzutil /s "Alaskan Standard Time"

文章標籤

helloworld 發表在 痞客邦 留言(0) 人氣()

如果要使用M365會議室資源的話,僅需要從exchange online新增資源即可
但使用者預約會議室後,其他人透過outlook行事曆,只能看到會議室這個時段是忙碌的,想要去協調會議室卻不知道要找誰

解決方式
開啟 powershell
先輸入
Install-Module ExchangeOnlineManagement  (只需要安裝一次)
Connect-ExchangeOnline

Set-MailboxFolderPermission -Identity "room01@mybox.tw:\Calendar" -User default -AccessRights LimitedDetails
Set-CalendarProcessing -Identity "room01@mybox.tw" -AddOrganizerToSubject $True -DeleteComments $False -DeleteSubject $False

會議室行事曆要顯示到多詳細的資訊可參考以下網址斟酌
https://learn.microsoft.com/en-us/powershell/module/exchange/add-mailboxfolderpermission?view=exchange-ps

文章標籤

helloworld 發表在 痞客邦 留言(0) 人氣()

MacOS 15.0 連線vpn ,出現以下錯誤訊息
 To connect to a VPN with FortiClient, open Security & Privacy Settings and allow system software from FortiTray.

進到隱私與安全性設定,卻找不到可以調整的地方

請試試以下方式
設定 > 一般 > 登入項目與延伸功能 > 延伸功能 > 網路延伸功能 > FortiTray 打勾 > 完成

helloworld 發表在 痞客邦 留言(0) 人氣()

找到相對應的 php.ini 
調整以下兩個參數,將數值加大
post_max_size=256M
upload_max_filesize=256M
存檔,重啟服務

重新上傳測試是否正常

文章標籤

helloworld 發表在 痞客邦 留言(0) 人氣()

cisco 設備預設無法使用副廠的gbic module
插上副廠的 gbic module 會出現以下錯誤訊息
*Mar  1 00:04:43.442: %GBIC_SECURITY_CRYPT-4-VN_DATA_CRC_ERROR: GBIC in port Gi0/48 has bad crc
*Mar  1 00:04:43.442: %PM-4-ERR_DISABLE: gbic-invalid error detected on Gi0/48, putting Gi0/48 in err-disable state

如果要使用非原廠的 gbic,請輸入以下指令

conf t 

貼上以下指令
service unsupported-transceiver

之後系統會溫馨提醒你一些事項...但可以略過
 Warning: When Cisco determines that a fault or defect can be traced to
the use of third-party transceivers installed by a customer or reseller,
then, at Cisco's discretion, Cisco may withhold support under warranty or
a Cisco support program. In the course of providing support for a Cisco
networking product Cisco may require that the end user install Cisco
transceivers if Cisco determines that removing third-party parts will
assist Cisco in diagnosing the cause of a support issue.

緊接著輸入
no errdisable detect cause gbic-invalid

離開
end

存檔
wr

重開機
reload

測試

文章標籤

helloworld 發表在 痞客邦 留言(0) 人氣()

控制台 > 硬體和音效 > 電源選項 > 選擇蓋上螢幕時的行為 > 不進行任何動作 > 儲存變更

notebook蓋上螢幕不休眠設定

文章標籤

helloworld 發表在 痞客邦 留言(0) 人氣()

當esxi host 有開放ssh遠端連線的話,vCenter 會在host機上出現黃色驚嘆號
如果要隱藏因為開放遠端連線出現的驚嘆號
可以在host機點設定>系統>進階系統設定
將 UserVars.SuppressShellWarning 的值從預設的0改成1 即可
排除vcenter 內 host機出現驚嘆號

文章標籤

helloworld 發表在 痞客邦 留言(0) 人氣()

client端,產生金鑰
ssh-keygen

跟其他linux 比較不一樣的是,esxi的authorized_keys 需要放在 /etc/ssh/keys-(username)/ 下
以下指令可以直接指定路徑
cat id_rsa.pub | ssh root@192.168.x.x 'cat >> /etc/ssh/keys-root/authorized_keys'

測試
ssh root@192.168.x.x hostname

參考資料
https://knowledge.broadcom.com/external/article/313767/allowing-ssh-access-to-esxiesx-hosts-wit.html
 

文章標籤

helloworld 發表在 痞客邦 留言(0) 人氣()

網路 > TCP/IP堆疊 > 預設 TCP/IP 堆疊

修改esxi hostname

動作 > 編輯設定 > 設定主機名稱 > 儲存

文章標籤

helloworld 發表在 痞客邦 留言(0) 人氣()

備份
備份設定檔
[root@esxi-10:~] vim-cmd hostsvc/firmware/backup_config
Bundle can be downloaded at : http://*/downloads/52bf3157-0e82-fab9-b9e1-e7d5147fc2f2/configBundle-esxi-10.tgz

備份檔會存在 /scratch/downloads/ 下
[root@esxi-10:~] cd /scratch/downloads/52bf3157-0e82-fab9-b9e1-e7d5147fc2f2/
[root@esxi-10:/vmfs/volumes/659d4ed5-6f9c598c-8162-04d4c4b20ae9/downloads/52bf3157-0e82-fab9-b9e1-e7d5147fc2f2] ls -lh
total 13
-rwx------    1 root     root       12.9K Jul 23 17:13 configBundle-esxi-10.tgz

使用scp備份至安全地方

還原
把備份檔複製到 /tmp
[root@esxi-10:/tmp] ls -lh
total 20
-rwx------    1 root     root       12.9K Jul 23 17:13 configBundle-esxi-10.tgz
drwx------    1 root     root         512 Jul 23 17:10 vmware-root

進入維護模式
[root@esxi-10:/tmp] vim-cmd hostsvc/maintenance_mode_enter

還原設定檔
[root@esxi-10:/tmp] vim-cmd hostsvc/firmware/restore_config /tmp/configBundle-esxi-10.tgz
(vim.fault.FileNotFound) {
   faultCause = (vmodl.MethodFault) null,
   faultMessage = <unset>,
   file = "/tmp/configBundle.tgz"
   msg = "Received SOAP response fault from [<cs p:000000e51f8d2a00, TCP:localhost:8307>]: restoreConfiguration
File /tmp/configBundle.tgz was not found"
}

出現以上錯誤,請執行以下步驟改名或copy即可 (鬼打牆了很久)
[root@esxi-10:/tmp] cp configBundle-esxi-10.tgz /tmp/configBundle.tgz

重新執行一次 vim-cmd hostsvc/firmware/restore_config
[root@esxi-10:/tmp] vim-cmd hostsvc/firmware/restore_config /tmp/configBundle-esxi.tgz
 

restore 設定後,系統會自動重啟

helloworld 發表在 痞客邦 留言(0) 人氣()

使用AD帳號登入 windows 10 的電腦時
如果出現 "伺服器上的安全性資料庫沒有此工作站信任關係的電腦帳戶" 的錯誤訊息

1. 兩個地方檢查一下
(1) DNS,如果有紀錄的話,先刪除
(2) AD > computers ,找到電腦名稱,刪除

2. 退出網域 > 重開機 > 加入網域 > 重開機

八成機率就可以正常登入了

helloworld 發表在 痞客邦 留言(0) 人氣()

2.4G 無線鍵盤滑鼠真的不適合接在usb3.0的port

因為原有的無線鍵盤滑鼠組,只要超過2公尺以上的話,操作鍵盤滑鼠的時候即會非常的卡
原本以為是因為產品品質太差,收訊不好,所以換了一組測試,狀況還是一樣
爬文之後發現USB3.0 容易干擾2.4G的收訊

解決方式是外接一個USB 2.0的HUB,即可解決這個問題
現在長距離的操作一樣順順的,棒
 

文章標籤

helloworld 發表在 痞客邦 留言(0) 人氣()

剛安裝好的omnios 要加入網域時出現以下錯誤訊息

root@omnios-111:~# smbadm join -u admin xxx.local
failed to initialize (cannot get the machine SID)

解決方式
root@omnios-111:~# svcadm enable -r smb/server
svcadm: svc:/milestone/network depends on svc:/network/physical, which has multiple instances.

root@omnios-111:~# svcs | grep smb
online         22:22:43 svc:/network/smb/client:default
online         22:22:43 svc:/network/smb/server:default
online         22:22:43 svc:/network/shares/group:smb

再重新加入一次domain即可
 

文章標籤

helloworld 發表在 痞客邦 留言(0) 人氣()

如果受nagios偵測的主機沒開ping/icmp的話
如何偵測Host Status

define host{
        host_name               bpm
        check_command           check_tcp!443
        ....
        ....
        ....

文章標籤

helloworld 發表在 痞客邦 留言(0) 人氣()

如果安裝windows 10 的日文輸入法,出現以下錯誤訊息
japanese ime is not ready yet 
please check status from language setting
解決windows 10 日文輸入法錯誤問題

解決方法

1. 安裝第三方輸入法
如google日文輸入法

2. 已系統管理員執行以下powershell指令
DISM.exe /Online /Add-Capability /CapabilityName:Language.Basic~~~ja-JP~0.0.1.0

參考資料:
https://answers.microsoft.com/en-us/windows/forum/windows_10-other_settings/problems-using-a-japanese-or-traditional-chinese/db5a0ddf-2c50-4f0d-a961-58902f40acda
 

文章標籤

helloworld 發表在 痞客邦 留言(0) 人氣()

https://go.dev/dl/ 找到適合的golang 版本
目前最新版本為 go1.22.1.linux-amd64.tar.gz

# wget https://go.dev/dl/go1.22.1.linux-amd64.tar.gz
# tar -C /usr/local -xzf go1.22.1.linux-amd64.tar.gz
# export PATH=$PATH:/usr/local/go/bin

加入 /etc/bash.bashrc ,下次登入後,自動載入

如果出現以下錯誤
go: cannot find GOROOT directory: 

# export GOROOT=/usr/local/go 並加入 /etc/bash.bashrc

測試
# go version
go version go1.22.1 linux/amd64 <= 出現以下資訊,表示安裝成功

文章標籤

helloworld 發表在 痞客邦 留言(0) 人氣()

Gophish 是一套免費的 Open-Source Phishing Framework 開源網路釣魚框架
https://getgophish.com/

安裝好的作業系統,並更新套件
apt -y update
apt -y upgrade

安裝 unzip
apt -y install unzip

下載程式,目前最新版還是 2022 年的 v0.12.1
wget https://github.com/gophish/gophish/releases/download/v0.12.1/gophish-v0.12.1-linux-64bit.zip

解壓縮
mkdir gophish
unzip gophish-v0.12.1-linux-64bit.zip -d ./gophish

修改設定檔,管理介面預設只listen localhost
cd gophish
找到
"admin_server": {
"listen_url": "127.0.0.1:3333",
改成
"admin_server": {
"listen_url": "0.0.0.0:3333",
存檔離開

啟動gophish
chmod u+x gophish
./gophish

可以在執行的log中找到預設的admin 密碼

time="2024-01-30T21:09:45-05:00" level=info msg="Please login with the username admin and the password xxxxxxxx"

測試瀏覽器登入
debian 11 安裝 gophish 開源釣魚框架

登入成功後,會要求變更密碼,變更完成後即可進入管理介面
debian 11 安裝 gophish 開源釣魚框架

文章標籤

helloworld 發表在 痞客邦 留言(0) 人氣()

power shell 可以列出exchange online 某個通訊群組包含哪些成員
但無法直接從個人帳號反推屬於哪些通訊群組
需透過迴圈來實現


Connect-ExchangeOnline

$userMailbox = "個人信箱"

Get-DistributionGroup | ForEach-Object {
    $group = $_
    $groupMembers = Get-DistributionGroupMember -Identity $group.Identity -ResultSize Unlimited
    $userInGroup = $groupMembers | Where-Object { $_.PrimarySmtpAddress -eq $userMailbox }

    if ($userInGroup) {
        Write-Host "$userMailbox -> $($group.DisplayName) ($($group.PrimarySmtpAddress))"
    }
}

文章標籤

helloworld 發表在 痞客邦 留言(0) 人氣()

主機 > 管理 > 系統 > 進階選項 > Security.PasswordQualityControl > 動作 > 編輯選項

預設值為 retry=3 min=disabled,disabled,disabled,7,7

如果要改成簡單一點的密碼,可以先把上述值顯改成 retry=3 min=1,1,1,1,1
修改完密碼後再改回預設值

修改esxi 預設的密碼複雜性原則

文章標籤

helloworld 發表在 痞客邦 留言(0) 人氣()

Close

您尚未登入,將以訪客身份留言。亦可以上方服務帳號登入留言

請輸入暱稱 ( 最多顯示 6 個中文字元 )

請輸入標題 ( 最多顯示 9 個中文字元 )

請輸入內容 ( 最多 140 個中文字元 )

reload

請輸入左方認證碼:

看不懂,換張圖

請輸入驗證碼