Postfix Send Testmail

echo “Das ist ein Test.” | mail -s “Test”

admin on March 1st 2018 in Email, IT

No Comments »

Expand Hard Disk VMWare Linux (Debian)

I had Nagios running on a VM and the primary partition had almost no space left. Here the steps I had to do to expand the Partition.

1. Prepare the VM
1. Shutdown VM
2. Remove all Snapshots (Otherwise you can’t expand the HD)
3. Expand the Hard Drive
4. Make a Snapshot again in case something goes wrong

2. Check the State
Show all partitions and note the infos somewhere

fdisk -l

3. Find out the Start and the End Sector of the unallocated Space
Well the only way I found out was was actually to create an additional partition.

1. fdisk /dev/sda
2. n (new partition)
3. p (primary)
4. 3 (free number)
5. Enter (Note the default Start Number)
6. Enter (Note the default End Number)
7 w (To write/save it)

And now it looked like this and from the /dev/sda3 can I see now the last sector which is 5221:

First of all I didn’t understand why are the sectors from /dev/sda2 and /dev/sda5 overlapping. After some research it made sense because without and extended partition there would be a limit of just 4 primary partitions. This means that the /dev/sda2 is actually the container of the logical partition /dev/sda5.

Secondly I didn’t want to have a seperate partition /dev/sda3, instead I wanted to expand the /dev/sda1. But this is going to be a problem because we would need the sectors next to it and this would be overlapping with /dev/sda2 and /dev/sda5.

So with all previous information it is now easy to calcualte all Start and End Sectors of the partitions and the result should look like this

4. Repartition Everything
Now to get the result above we need to repartition everything.

1. First of all we need to switch off swapping so that the partiton /dev/sda2 and /dev/sda5 can be deleted
swapoff -a
2. fdisk /dev/sda
3. Delete all partitions even the /dev/sda1
d (Trough all numbers)
4. Recreate all partitions with the Start and End Sectors we calculated. /dev/sda1 should be a primary and the /dev/sda2 an extended. Then add the /dev/sda5 which is a logical in /dev/sda2.
5. With the /dev/sda5 I changed the Partition ID to SWAP
6. Save it

Switch swapping back on swapon /dev/sda5

4. Make sure the Kernels takes modified partition table into account
Now the partition table has been modified but the Kernel doesn’t take it to account yet.

partx /dev/sda

This command should fix this but I also rebooted the machine.

5. Finally expand the Partition
resize2fs /dev/sda1

Now you should have it. You can check the result with df.

admin on January 5th 2018 in IT, Linux

No Comments »

Convert VMWare VMDK into Hyper-V VHDX

1. Download and Install “Microsoft Virtual Machine Converter
2. Open Powershell with Elevated Privileges
3. Import Module / Convert VMDK
Import-Module “C:\Program Files\Microsoft Virtual Machine Converter\MvmcCmdlet.psd1”
convertTo-MvmcVhd -SourceLiteralPath c:\source\scource.vmdk -DestinationLiteralPath c:\destination\ -VhdType FixedHardDisk -VhdFormat vhdx

admin on January 1st 2018 in Hyper-V, IT, PowerShell, VMWare

No Comments »

ESXi change Kali screen resolution

Even I installed the VMWare Tools I wasn’t able to change the resolution. At the end I found out that I had to increase the video card memory from 4 up to 32. Now it works like a charm.

admin on December 26th 2017 in IT, Linux

No Comments »

Find Files and DElete it on Linux

Run first:
find . -name "*.bak" -type f

If you decided to delete run:
find . -name "*.bak" -type f -delete

admin on February 5th 2017 in IT, Linux

No Comments »

WSUS Console Error

I have installed a bunch of updates on the WSUS Server and after that I coudln’t login to the console anymore.

So I did some research on the net and some users had to uninstal KB3148812 and others KB3159706.

Instead of uninstalling following steps helped me:

  1. Elevated Command Prompt "C:\Program Files\Update Services\Tools\wsusutil.exe" postinstall /servicing
  2. Enable HTTP Activation under .NET Framework 4.5 Features in the Server Manager Add Roles and Features Wizard
  3. Restart the WSUS service

admin on October 19th 2016 in IT, Windows Server

No Comments »

Detecting and Mounting CD-Rom in Debian

apt-get install cdrskin
cdrskin –devices
mkdir /mnt/cdrom
sudo mount /dev/sr0 /mnt/cdrom

admin on August 3rd 2016 in IT, Linux

No Comments »

Install OwnCloud on Debian

I already made once a tutorial how to install OwnCloud on Debian. But since then you can find it in the repository of aptitude and is therefore much easier to install.

  1. apt-get update
  2. apt-get install owncloud
  3. apt-get install mysql-server mysql-client
  4. Create DB and User
    mysql –u root –p
    CREATE DATABASE owncloud;
    CREATE USER owncloud@localhost IDENTIFIED BY ‘password’;
    GRANT ALL PRIVILEGES ON owncloud.* TO owncloud@localhost;
    flush privileges;
  5. Create Directories
    mkdir /var/owncloud
    chown www-data:www-data /var/owncloud
    chmod 750 /var/owncloud
  6. Run owncloud
  7. Username: owncloud
    Password: Password you have picked for the DB.
    DB Name: owncloud
    Hostname: localhost
  8. Activate HTTPS
    a2enmod ssl
    a2ensite default-ssl
    service apache2 restart

After that you just need to install the OwnCloud clients on your devices and then you are ready to go.

admin on August 1st 2016 in Cloud, Internet, IT, Linux

No Comments »

WSUS shows Vista instead of Windows 7

Microsoft released a hotfix for that:

admin on April 19th 2016 in Windows Server

No Comments »

Skype for BUsiness Error after March updates (kb3114831)

I had trouble in Outlook to plan a Skype for Business call after the March updates. When I tried to send the invintation I got an error message that I should make sure that I’m logged into Skype for Business.

I went through all the updates and found out that: KB3114831 is causing the problem. After uninstalling it, it worked like a charm. Hopefully this is going to help somebody.

admin on March 10th 2016 in IT, MS Office

No Comments »

Check out new movies online website. Download and buy movies now.