Posts

Differences between gz, bzip2, xz, 7z, rar, lzop

  Differences between gz, bzip2, xz, 7z, rar, lzop Gzip and bzip2, as well as xz and lzop, are functionally equivalent.  (There once was a bzip, but it seems to have completely vanished off the face of the world.)  Other common compression formats are zip, rar and 7z; these three do both compression and archiving (packing multiple files into one).  Here are some typical ratings in terms of speed, availability and typical compression ratio  (note that these ratings are somewhat subjective, don't take them as gospel): decompression speed (fast > slow): lzop > gzip, zip > xz > 7z > rar > bzip2 compression speed (fast > slow): lzop > gzip, zip > xz > bzip2 > 7z > rar compression ratio (better > worse): xz > 7z > rar, bzip2 > gzip > zip > lzop availability (unix) : gzip > bzip2 > xz > lzop > zip > 7z > rar availab...

Centos 8 repository error

   Centos Stream 8 is EOL, use archive from mirror. sudo sed -i -e '/mirrorlist=http:\/\/mirrorlist.centos.org\/?release=$releasever&arch=$basearch&repo=/ s/^#*/#/' -e '/baseurl=http:\/\/mirror.centos.org\/$contentdir\/$releasever\// s/^#*/#/' -e '/^\[baseos\]/a baseurl=https://mirror.rackspace.com/centos-vault/8.5.2111/BaseOS/$basearch/os' /etc/yum.repos.d/CentOS-Stream-BaseOS.repo sudo sed -i -e '/mirrorlist=http:\/\/mirrorlist.centos.org\/?release=$releasever&arch=$basearch&repo=/ s/^#*/#/' -e '/baseurl=http:\/\/mirror.centos.org\/$contentdir\/$releasever\// s/^#*/#/' -e '/^\[appstream\]/a baseurl=https://mirror.rackspace.com/centos-vault/8.5.2111/AppStream/$basearch/os' /etc/yum.repos.d/CentOS-Stream-AppStream.repo sudo sed -i -e '/mirrorlist=http:\/\/mirrorlist.centos.org\/?release=$releasever&arch=$basearch&repo=/ s/^#*/#/' -e '/baseurl=http:\/\/mirror.centos.org\/$contentd...

Wazuh opensearch dashboard ConnectionError: connect ECONNREFUSED ::1:9200"

 Wazuh opensearch dashboard ConnectionError: connect ECONNREFUSED ::1:9200"    If you see error like this:  Aug 19 13:38:21 wazuh opensearch-dashboards[486]: {"type":"log","@timestamp":"2024-08-19T04:38:21Z","tags":["error","opensearch","data"],"pid":486,"message":"[ConnectionError]: connect ECONNREFUSED ::1:9200"} the problem is with missing host localhost IP at: (default is IPv6 and deamon is not listening on it) /etc/wazuh-dashboard/opensearch_dashboards.yml  opensearch.hosts: https://127.0.0.1:9200 #opensearch.hosts: https://localhost:9200

M365 Exchange online how to find users with auto-forwarding enabled

 M365 Exchange online how to find users with auto-forwarding enabled   1. Use Powershell     Connect-ExchangeOnline  Get-Mailbox | Where {$null -ne $_.ForwardingSmtpAddress} | FT UserPrincipalName,ForwardingSmtpAddress,DeliverToMailboxAndForward $Mailboxes = Get-Mailbox -ResultSize unlimited  | where {$_.RecipientTypeDetails -eq "UserMailbox"} foreach ($Mailbox in $Mailboxes)     { Get-InboxRule -mailbox $Mailbox.Name | Where-object {$_.forwardto -or $_.forwardasattachmentto} | fl mailboxownerid,name,description }   

M365 Exchange online - bulk delete Quarantined emails

 M365 Exchange online - bulk delete Quarantined emails 0. Connect from Powershell  Connect-ExchangeOnline -UserPrincipalName  [email protected]   1.  Find quarantined emails using Powershell: Get-QuarantineMessage -SenderAddress [email protected] -ReleaseStatus NotReleased     2.   Create variable with IDs $id = Get-QuarantineMessage -SenderAddress [email protected] -ReleaseStatus NotReleased | select -ExpandProperty Identity 3. Delete or Release all: Delete-QuarantineMessage -Identities $id -Identity 000 Get-QuarantineMessage -SenderAddress [email protected] -ReleaseStatus NotReleased | Release-QuarantineMessage -ReleaseToAll

Convert Windows MBR partition to GPT using command line

  Convert an MBR disk from the command line deleting all data To complete the disk conversion from the command line with the diskpart disk partition process, follow these steps. Back up or move the data on the MBR disk prior to conversion. Open an elevated command prompt: select and hold (or right-click) Command Prompt , and select Run as Administrator . At the prompt, enter diskpart to initiate the disk partition process. Prepare the MBR disk for conversion by cleaning (deleting) any partitions or volumes. Note If the MBR disk doesn't have any partitions or volumes, skip to the last step to apply the conversion. At the DISKPART prompt, enter list disk . Make a note of the MBR disk number that you want to convert to GPT format. At the DISKPART prompt, enter select disk <disk-number> , where <disk-number> is the MBR disk number to convert. At the DISKPART prompt, enter clean to delete all partitions and volumes on the disk. At the DISKPART prompt,...

How to check if Windows server is domain controller?

How to check if Windows server is domain controller?  Win + R key  WMIC COMPUTERSYSTEM GET DOMAINROLE  0 {"Stand Alone Workstation"} 1 {"Member Workstation"} 2 {"Standalone Server"} 3 {"Member Server"} 4 {"Backup Domain Controller"} 5 {"Primary Domain Controller"}   lusrmgr.msc  sysdm.cpl  dsa.msc NTDS AND SYSVOL Folders