Rexxer

Some tips for me and other

Test SMTP NTLM AUTH with TELNET + hint

The process: Notice: the base64 linux and windows encoding are different. The command to encode in powershell: [System.Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes(“password”)) hint: https://stackoverflow.com/questions/37996640/how-can-i-base64-encode-a-string-on-linux-so-it-matches-windows-unicode-getbytehttps://stackoverflow.com/questions/37996640/how-can-i-base64-encode-a-string-on-linux-so-it-matches-windows-unicode-getbyte If you plan to bring a string encoded in Powershell into Linux then do the following, first encode in Powershell Then in Linux do the following:

Ubuntu + Create a user with password from the parameter

Ubuntu + Script to extend a disk

#!/bin/bash fdisk /dev/sda << FDISK_CMDS n w FDISK_CMDS partprobe /dev/sda a=$(vgs | awk ‘ NR==2 {print $1;}’) vgextend “$a” /dev/sda3 b=$(vgdisplay | awk ‘ NR==17 {print $3;}’) lvextend -l +”$b” /dev/$a/ubuntu-lv resize2fs /dev/$a/ubuntu-lv Usefull link: https://packetpushers.net/ubuntu-extend-your-default-lvm-space/ Manual:

Mcedit + color scheme

Can be configured in the file ~/.config/mc/ini

ESXi + Modify RAID0 to RAID1

/opt/smartstorageadmin/ssacli/bin/ssacli ctrl slot=0 show detail /opt/smartstorageadmin/ssacli/bin/ssacli ctrl slot=0 ld 3 add drives=allunassigned /opt/smartstorageadmin/ssacli/bin/ssacli ctrl slot=0 ld 3 modify raid=1

ESXi 6.7 + HP Array Utility

Show controller config/opt/smartstorageadmin/ssacli/bin/ssacli ctrl all show config Show controller status/opt/smartstorageadmin/ssacli/bin/ssacli ctrl all show status Show controller info/opt/smartstorageadmin/ssacli/bin/ssacli ctrl all show detail Show controller info by slot/opt/smartstorageadmin/ssacli/bin/ssacli ctrl slot=0 show detail Controller re-scan/opt/smartstorageadmin/ssacli/bin/ssacli rescan Physical disks status/opt/smartstorageadmin/ssacli/bin/ssacli ctrl slot=0 pd all show status Physical disk status full/opt/smartstorageadmin/ssacli/bin/ssacli ctrl slot=0 pd all show detail Logical disks status/opt/smartstorageadmin/ssacli/bin/ssacli […]

Test HDD speed + Linux

ESXi 5.5 to 6.7 + no datastores

Link: https://kb.vmware.com/s/article/1011387 Connect to the ESXi host with an SSH session and root credentials To list the volumes detected as snapshots, run this command: esxcli storage vmfs snapshot listYou see output similar to: 49d22e2e-996a0dea-b555-001f2960aed8Volume Name: VMFS_1VMFS UUID: 49d22e2e-996a0dea-b555-001f2960aed8Can mount: trueReason for un-mountability:Can resignature: trueReason for non-resignaturability:Unresolved Extent Count: 1 To mount a snapshot/replica LUN that […]

Gitlab + Get a list of projects

PREFIX=”ssh_url_to_repo”; cat test | grep -o “\”$PREFIX\”:[^ ,]+” | xargs -L1 basename | awk -F ‘.’ ‘{print $1}’

Zabbix + WakeOnLan script

Previous Posts Next posts