![How to recovery/reset Cisco Nexus 7K/9K admin password](https://devopsvn.xyz/wp-content/uploads/2019/07/security-new-Web-Image-800x534.jpg)
How to recovery/reset Cisco Nexus 7K/9K admin password
How to reset/recovery Cisco Nexus 7K/9K admin password If you’ve forgotten the admin password for your Cisco Nexus device, you can reset/recovery it with the following steps: Step 1 Press […]
How to reset/recovery Cisco Nexus 7K/9K admin password If you’ve forgotten the admin password for your Cisco Nexus device, you can reset/recovery it with the following steps: Step 1 Press […]
Đôi lúc muốn dừng chạy 1 số pod nào đó, nhưng lại ko muốn xóa nó đi, có thể chạy lại sau này. Với deployment thì có thể set replica […]
Lệnh nâng cấp từ Windows Server Evaluation lên Windows Server Standard
1 |
DISM /Online /Set-Edition:ServerStandard /ProductKey:XXXXX-XXXXX-XXXXX-XXXXX-XXXXX /AcceptEula |
Lệnh nâng cấp từ Windows Server Evaluation lên Windows Server Datacenter
1 |
DISM /Online /Set-Edition:ServerDatacenter /ProductKey:XXXXX-XXXXX-XXXXX-XXXXX-XXXXX /AcceptEula |
Trong đó: XXXXX-XXXXX-XXXXX-XXXXX-XXXXX bạn hãy thay bằng key […]
Môi trường cài đặt: – node1: 10.144.39.21 – node2: 10.144.39.22 – node3: 10.144.39.21 OS 3 máy: ubuntu 20.04 ES cài đặt: bản mới nhất trên trang chủ: https://www.elastic.co/downloads/elasticsearch Khai báo hostname […]
etcd Cheat Sheet This cheat sheet is for etcd v3 only! Cluster infos
1 2 |
etcdctl get /_etc/machines/<token> # Details of a host etcdctl get /_etc/config |
Accessing the key space
1 2 3 4 5 6 7 8 |
etcdctl get "" --prefix --keys-only # Get full tree etcdctl get "" --prefix # Get full tree keys and values etcdctl get <key path> # Get key details etcdctl get <key path> --print-value-only # Get key value only etcdctl get <key path> --rev=<number> # Get older revision of a key etcdctl -o extended get <key path> # Get key and metadata etcdctl get <key path> -w=json # Output in JSON with metadata |
Batch queries
1 2 3 |
etcdctl get key1 key10 # Get all keys key1, key2, key3, ..., key10 etcdctl get --prefix key # Get all keys matching ^key etcdctl get --prefix key --limit=10 # Get max 10 keys matching ^key |
Creating a path
1 2 |
etcdctl mkdir /newpath etcdctl rmdir /newpath # Removes only empty paths |
Manipulate keys
1 2 3 4 5 6 |
etcdctl mk /path/newkey some-data # Create key etcdctl set /path/newkey some-data # Create or update key etcdctl update /path/key new-data # Update key etcdctl put /path/key new-data etcdctl rm /path/key etcdctl rm /path --recursive |
Make […]
Các hệ thống linux sử dụng file system như ext4,ext3-2 mặc định dành ra 5% disk cho phân vùng root. Việc này nhằm đảm bảo người quản trị còn có […]
Umask là gì thì xem lại bài này Umask là gì Câu hỏi này nếu thi LPI sẽ bị hỏi, mình note ra đây để ghi nhớ cho bản thân. […]
Script tìm và disable các account không đăng nhập trong vòng 90 ngày trên AD
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# disableUsers.ps1 # Set msDS-LogonTimeSyncInterval (days) to a sane number. By # default lastLogonDate only replicates between DCs every 9-14 # days unless this attribute is set to a shorter interval. # Also, make sure to create the EventLog source before running, or # comment out the Write-EventLog lines if no event logging is # needed. Only needed once on each machine running this script. # New-EventLog -LogName Application -Source "DisableUsers.ps1" # Remove "-WhatIf"s before putting into production. Import-Module ActiveDirectory $inactiveDays = 90 $neverLoggedInDays = 90 $disableDaysInactive=(Get-Date).AddDays(-($inactiveDays)) $disableDaysNeverLoggedIn=(Get-Date).AddDays(-($neverLoggedInDays)) # Identify and disable users who have not logged in in x days $disableUsers1 = Get-ADUser -Filter {Enabled -eq $TRUE} -Properties lastLogonDate, whenCreated, distinguishedName | Where-Object {($_.lastLogonDate -lt $disableDaysInactive) -and ($_.lastLogonDate -ne $NULL)} $disableUsers1 | ForEach-Object { Disable-ADAccount $_ #Write-EventLog -Source "DisableUsers.ps1" -EventId 9090 -LogName Application -Message "Attempted to disable user $_ because the last login was more than $inactiveDays ago." } # Identify and disable users who were created x days ago and never logged in. $disableUsers2 = Get-ADUser -Filter {Enabled -eq $TRUE} -Properties lastLogonDate, whenCreated, distinguishedName | Where-Object {($_.whenCreated -lt $disableDaysNeverLoggedIn) -and (-not ($_.lastLogonDate -ne $NULL))} $disableUsers2 | ForEach-Object { Disable-ADAccount $_ #Write-EventLog -Source "DisableUsers.ps1" -EventId 9091 -LogName Application -Message "Attempted to disable user $_ because user has never logged in and $neverLoggedInDays days have passed." } |
1. OpenVPN là gì? OpenVPN là một phần mềm thương mại mã nguồn mở thực hiện kỹ thuật mạng riêng ảo (VPN) để tạo ra các kết nối điểm-tới-điểm hoặc […]
Trước khi đi vào phần chính, xin phép chia sẻ quá trình triển khai từ đầu con zabbix này. Hiện con cũ đang xài 5.0, được upgrade nhiều lần từ […]