Cấp quyền gửi vào group/distribution list

Tình huống:

MS 365 có dynamic distribution list là abc@d.com và chặn gửi vào theo white list, muốn thêm 1 email mới là ef@d.com vào danh sách cho phép gửi đến abc@d.com, sử dụng power shell  

Sử dụng powershell 7 trở lên, cụ thể tại thời điểm này là 7.5.3

pwsh 

Chạy lệnh: Connect-ExchangeOnline

Nếu bị lỗi, chạy Connect-ExchangeOnline -Device 

Ra thông báo: To sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code IFWTW5N3S to authenticate. 

=> làm theo hướng dẫn để connect 

Lấy danh sách đang allow hiện tại để test:

Get-DynamicDistributionGroup "all@tamanhhospital.vn" | fl Name,AcceptMessagesOnlyFrom,AcceptMessagesOnlyFromSendersOrMembers 

Chạy lệnh add thêm vào allow list:

Set-DynamicDistributionGroup "abc@d.com" -AcceptMessagesOnlyFrom @{Add="ef@d.com"} 

VM mới từ Rocky template

Tạo VM mới từ template Rocky đã có

Mở Gitlab > Build > Pipelines > bấm [New Pipeline]

Chọn PLAYBOOK: new_server, LIMIT: VM name > bấm [New Pipeline] > deploy

Sau khi deploy xong, vào console login root

cd /etc/ssh

sudo vi sshd_config

Sửa PasswordAuthentication no thành PasswordAuthentication yes

:wq 

Tạo tài khoản riêng:

sudo useradd -m username
sudo passwd username

sudo usermod -aG wheel username

Tạo bot telegram gửi alert

Tìm @BotFather (có dấu tích verified)

/start

/newbot

Đặt tên bot mới, yêu cầu đặt tên có _bot ở cuối, tối đa 32 char, chữ + số + gạch dưới. Ví dụ: Site_Alert_Devices_bot

/mybot chọn bot đã tạo

API Token => lấy key API, dạng 8443315929:AAFw0tzxo8eUScBL5Xw_729_FLv7262OwHn

Back to settings 

Bot settings > Group privacy > Turn off (cần check phần này có cần thiết không - chỉ để bot có thể đọc được tin nhắn trong group - và phục vụ check getUpdates)

Chat với bot, START

Tạo Group mới, đặt tên, add bot vào group, chat vài tin, sử dụng URL để check xem đã đọc được tin mới chưa, đọc được là ok

https://api.telegram.org/bot[thay API token vào đây, không bao gồm dấu ngoặc]/getUpdates 

Đồng thời khi truy cập URL trên cũng sẽ lấy được chat_id của group, lưu lại

chat_id thường là số âm: -100xxxxxxxxxx

Test cho bot gửi tin nhắn vào group (cmd):

curl -s -X POST "https://api.telegram.org/bot[thay API token vào đây, không bao gồm dấu ngoặc]/sendMessage" -d chat_id=[chat_id của group] -d text="Test từ server alert thành công!" 

VeeamOne: edit trên C:\script

Zabbix: 

  • Alerts > Media types > chọn và edit botToken
  • Users > Admins > Media > chọn và edit chat_id của group 

PRTG: vào noti như email thông thường, add thêm thao tác Execute HTTP Action rồi dùng link API sendmessages của telegram 


 

Các loại group, group email trên Microsoft 365

 Nơi quản trị:

1. Microsoft 365 admin center:

- Menu: Home > Active teams & groups > Active teams and groups 

- Các loại group: 

  • Teams
  • Microsoft 365 group
  • Distribution list
  • Security group

2. Exchange admin center:

- Menu: Home > Recipients > Groups

- Các loại group

  • Microsoft 365
  • Distribution list
  • Dynamic distribution list
  • Mail-enabled security

Quản lý member:

- Với group Microsoft: https://myaccount.microsoft.com/groups/groups-i-own

  • Microsoft 365

- Dành cho user có quyền owner: https://admin.exchange.microsoft.com/#/groups 

  • Distribution list
  • Mail-enabled security 

 

Export danh sách member trong group email 365

Get-DistributionGroupMember -Identity "tên group" | Select Name, PrimarySmtpAddress | Export-Csv -Path "D:\DanhSach.csv" -NoTypeInformation

Self host xibo trên Debian 13

Tải Debian 13: https://www.debian.org/download

Tạo VM, xác định dung lượng VM cần thiết để chứa media trên server 

Cài đặt lên VM, khi cài tích chọn thêm SSH Server phục vụ remote sau này, cài GRUB bootloader

Add user hiện tại (xiboadmin) có quyền Administrator (trên GUI - Settings) 

Mở terminal: gõ lệnh

su  =>chuyển qua root

/usr/sbin/usermod -aG sudo xiboadmin 

=> cho xiboadmin quyền sudo

Add/remove license bằng CLI - 2

Thực hiện xóa lic Teams Ent, thay bằng Teams Ess:

#Connect-MgGraph -Scopes User.ReadWrite.All

# User
$userId = "user@domain.com"

# SKU ID
$teamsEss = "3ab6abff-666f-4424-bfb7-f0bc274ec7bc"   # Teams Essentials
$teamsEnt = "7e31c0d9-9551-471d-836f-32ee72be4a01"   # Teams Enterprise

# Remove Teams Ent + Add Teams Ess
Set-MgUserLicense -UserId $userId `
    -AddLicenses @(@{SkuId = $teamsEss}) `
    -RemoveLicenses @($teamsEnt)

Write-Output "Removed Teams Ent, Added Teams Ess"

Patch 60 cam cho nas xpenology

 
cài xong, bật SSH, ssh vào nas chạy quyền root (sudo -i), rồi chạy lệnh này, chờ patch chút là xong:
 

Cài app lên TV Samsung Tizen:

Cài app lên TV Samsung Tizen: