Pages

Wednesday, October 27, 2021

Proxmox USB device at VM

 


Login to console of mail Proxmox hypervisor

run the command: lsusb and collect USB device ID

root@proxmox:~# lsusb


if we wants to attach this usb  (usb-device-id 8564:7000) to vm id 145 

first stop VM 145 and run below command

root@proxmox:~# qm set 145 -usb0 host=8564:7000



Now start VM ID-145 and check the device with lsblk

# lsblk or fdisk -l 
to find acutal device with partition and finally mount with mount command # mount /dev/sdx1 /mnt




Sunday, October 24, 2021

Iredmail password change md5 ssha512

 To generate a password hash for a new password, please use doveadm command.

Generate a SSHA512 password hash:

$ doveadm pw -s 'ssha512' -p '123456'

{SSHA512}jOcGSlKEz95VeuLGecbL0MwJKy0yWY9foj6UlUVfZ2O2SNkEExU3n42YJLXDbLnu3ghnIRBkwDMsM31q7OI0jY5B/5E=

Generate a BCRYPT password hash on BSD system:

$ doveadm pw -s 'blf-crypt' -p '123'

{BLF-CRYPT}$2a$05$9CTW6FZtjHeK6W.2YMmzOeAj2YFvDpP4JEH0uH/YLQI81jPWDtzQW



SQL backends

To reset password for user user@domain.ltd, please login to SQL server as either SQL root user or vmailadmin user (note: sql user vmail has read-only privilege to vmail database, so you cannot use it to change user password), then execute SQL commands to reset password:


sql> USE vmail;

sql> UPDATE mailbox SET password = '{SSHA512}$1$KxfQLbMV$Pq3x21nQEYMm6eFUrVJOS.' WHERE username = 'tayab.khan@toron.com.bd';


Saturday, October 23, 2021

Fail2Ban jail search and unban

 



** To see / get the actual jail names

#fail2ban-client status | grep "Jail list" | sed -E 's/^[^:]+:[ \t]+//' | sed 's/,//g' 


example output:: ssh-iredmail roundcube-iredmail postfix-iredmail dovecot-iredmail pam-generic ssh-iptables


** To Unban IP use bellow command

#fail2ban-client set JAIL_NAME unbanip 1.2.3.4



fail2ban-client set ssh-iredmail unbanip 1.2.3.4

fail2ban-client set roundcube-iredmail unbanip 1.2.3.4

fail2ban-client set postfix-iredmail unbanip 1.2.3.4

fail2ban-client set dovecot-iredmail unbanip 1.2.3.4

fail2ban-client set ssh-iptables unbanip 1.2.3.4

fail2ban-client set pam-generic unbanip 1.2.3.4


Clear Memory / RAM cache in Linux

 

How to Clear Cache in Linux?

Every Linux System has three options to clear cache without interrupting any processes or services.


1. Clear PageCache only.


# sync; echo 1 > /proc/sys/vm/drop_caches

2. Clear dentries and inodes.


# sync; echo 2 > /proc/sys/vm/drop_caches

3. Clear pagecache, dentries, and inodes.


# sync; echo 3 > /proc/sys/vm/drop_caches 

Wednesday, October 20, 2021

Format your Pen drive / USB Flash Drive from Command Prompt

How to  


Step 1: Type cmd in the search box, then you can get the best match called Command Prompt. Right-click on it and choose "Run as administrator".

Step 2: On the Command Prompt window, type diskpart and press "Enter".

type diskpart to format usb flash drive using cmd

Step 3: Type list disk and press "Enter". According to the list disk information, check which disk is your USB flash drive. For example, disk 2.

type list disk to format usb flash drive using cmd

Step 4: Now type select disk 2 and press "Enter".

type select disk 2 to format usb flash drive using cmd

Step 5: Type clean. Wait some time for disk erasing.

type clean to format usb flash drive using cmd

Step 6: Type create partition primary and press "Enter".

type create partition primary to format usb flash drive using cmd

Step 7: After diskpart successfully created the specified partition, type format fs=ntfs and press "Enter". If you prefer other file system formats, change the command ntfs to the desired one such as fat32, exfat, etc.

type format fs=ntfs to format usb flash drive using cmd

Step 8: Type assign to create a drive letter to the flash drive.

type assign to format usb flash drive using cmd

Outlook Sync send / recieve issue

 

Please follow the attached steps to overcome the slow sync issue from Laptop/Desktop.












Wednesday, February 10, 2021

Proxmox Disk adding

 

How to add DISK at Proxmox


LOGIN proxmox

https://192.168.x.x:8006


---------------------------

SSH Login: and run as bellow

vi /etc/apt/sources.list.d/pve-enterprise.list

# hash enterprise


apt udpate

apt install parted


 parted /dev/sda mklabel gpt


parted -a opt /dev/sda mkpart primary ext4 0% 100%


mkfs.ext4 -L storageprox /dev/sda1

mkdir -p /mnt/sas-drive1



vi /etc/fstab

LABEL=storageprox /mnt/sas-drive1 ext4 defaults 0 2


mount -a


** now login to proxmox GUI and 

click datacenter -> storage -> ADD

-> directory ->

ID: storageprox

Directory:  /mnt/sas-drive1

Content-Type: all

Nodes: all


---------------------


parted /dev/sdb mklabel gpt

parted -a opt /dev/sdb mkpart primary ext4 0% 100%

mkfs.ext4 -L storageprox-2 /dev/sdb1


mkdir -p /mnt/sas-drive2


vi /etc/fstab

LABEL=storageprox-2 /mnt/sas-drive2 ext4 defaults 0 2



** now login to proxmox GUI and 

click datacenter -> storage -> ADD

-> directory ->

ID: storageprox-2

Directory:  /mnt/sas-drive2

Content-Type: all

Nodes: all


--------------------------