Windows 7 password reset with Xubuntu Linux LiveCD

Strong Warning & Disclaimer: This Windows 7 password reset changes the user privileges of the system. It is not expected, but may damage the Windows system! Use it at your own risk! It is recommended to backup crucial data with the LiveCD before running the password reset program. THE AUTHOR IS NOT RESPONSIBLE FOR ANY DAMAGE CAUSED BY THE (MIS)USE OF THE DESCRIBED SOFTWARE!

Remark: The Windows7 System will need access to the Internet for installing chntpw.

  1. Download the Xubuntu Linux 14.04 LTS LiveCD image. (ISO)
    You can as well use the classical Ubuntu Linux LiveCD version. However the distro Xubuntu Linux is recommended, because it is very similar to the classic Windows desktop and simpler.
  2. Download the USB Live disk creator unetbootin.
  3. Create a bootable USB stick with unetbootin and the downloaded ISO image from the first step.
  4. Boot the computer (with the Windows operating system) from the USB stick. You may have to change the BIOS settings to be able to boot from the USB stick.
  5. In the Xubuntu boot menu choose the “Try Xubuntu without Installing” option to start Xubuntu Linux without damaging anything on the Windows System.
  6. For international users (optional): Look for the Settings Manager application and choose Keyboard and then Layout. There you can set the best keyboard layout.
  7. On the graphical Xubuntu desktop click twice on all displayed disk drives. This will  mount the drive partitions.
  8. In Xubuntu start the “Terminal Emulator” application.
  9. In the terminal enter:
    sudo apt-get install chntpw
    This will install the Windows password reset application. Then stay in the terminal and enter a few further commands:
  10. Change to the directory, where all the disk drives are mounted for the standard users “xubuntu
    cd /media/xubuntu
  11. The following command will show you all available (Windows) drives that were found.
    ls
  12. Let’s say the Name of your drive is DRIVENAME (as a placeholder). Then you will have to change into the appropriate Windows directory where the (SAM) password file is located. Enter:
    cd DRIVENAME/WINDOWS/system32/config
  13. Now we can get an overview of the user accounts with the password reset application:
    sudo chntpw -l SAM
  14. Select a user you want to change. Let’s say the username is USERNAME (as a placeholder). So enter:
    sudo chntpw -u USERNAME SAM
  15. The chntpwd application guides you through the application. You can now eitherupgrade an existing user to an admin or reset the password of an existing user.
  16. After finishing your modifications check them by entering again:
    sudo chntpw -l SAM
  17. Reboot and login with the targeted Windows 7 user. If you upgraded a user to an admin you can login with the new admin and change the password of other existing admins.

References

Brother HL3040CN Installation, Ubuntu Linux 14.04

  1. sudo mkdir /var/spool/lpd
  2. sudo apt-get install lib32stdc++6
  3. Download the printer driver files LPR printer driver (deb package) and theCUPSwrapper printer driver (deb package) from the Brother website:
    http://support.brother.com/g/b/downloadlist.aspx?c=us&lang=en&prod=hl3040cn_all&os=128
  4. sudo dpkg -i --force-all hl3040cnlpr*
  5. sudo dpkg -i --force-all hl3040cncups*
  6. Now the Brother 3040CN printer appears in the printers overview. However you might have to add a new printer – e.g. as a network printer.
  7. For the new added printer choose Provide PPD file as printer driver. Add the following file: /usr/share/cups/model/Brother/brother_hl3040cn_printer_en.ppd

Reference: Solved: Brother HL-3040CN Won’t Print
http://ubuntuforums.org/showthread.php?t=1602075&p=10012790#post10012790

nginx + Perl Installation, Ubuntu Linux 14.04

  1. sudo apt-get install nginx libfcgi-perl
  2. sudo wget http://nginxlibrary.com/downloads/perl-fcgi/fastcgi-wrapper -O /usr/bin/fastcgi-wrapper.pl
  3. sudo chmod +x /usr/bin/fastcgi-wrapper.pl
  4. Copy and save the following code into the file perl-fcgi
    (Source: http://wiki.ubuntuusers.de/nginx)

    #!/bin/bash
    PERL_SCRIPT=/usr/bin/fastcgi-wrapper.pl
    RETVAL=0
    case "$1" in
        start)
          $PERL_SCRIPT
          RETVAL=$?
      ;;
        stop)
          killall -9 perl
          RETVAL=$?
      ;;
        restart)
          killall -9 perl
          $PERL_SCRIPT
          RETVAL=$?
      ;;
        *)
          echo "Usage: perl-fastcgi {start|stop|restart}"
          exit 1
      ;;
    esac
    exit $RETVAL
  5. sudo mv perl-fcgi /etc/init.d
  6. sudo chmod a+x /etc/init.d/perl-fcgi
  7. sudo update-rc.d perl-fcgi defaults
  8. sudo service perl-fcgi start
  9. sudo service nginx restart

Additional reference: http://nginxlibrary.com/perl-fastcgi

Convert a VMware image to VirtualBox

It is very easy to convert a VMware image to VirtualBox. Just use VBoxManage which is incuded in Virtualbox.

VBoxManage clonehd –format vdi old_vmware_image.vmdk new_virtualbox_image.vdi

Adding the converted image to VirtualBox:

  1. Add a new project in VirtualBox.
  2. Move the converted image new_virtualbox_image.vdi into the new directory /home/$USER/VirtualBox VMs/NameOfYourNewVirtualbox created by VirtualBox.
  3. Select this image with the file selector.

In my case it was important to leave the MAC address predefined as suggested by VirtualBox.

 

References

https://www.virtualbox.org/manual/ch08.html#vboxmanage-clonevdi

https://en.wikipedia.org/wiki/VirtualBox

Virtualbox sharing folders (with NFS), Ubuntu 13.10

After quite some hassles trying to activate the regular Virtualbox folder sharing (between host and guest operating system) I decided to try NFS. Actually it worked pretty well. You can use all the benefits of NFS. I set the guest operating system to the “Bridged networking” to access my guest box via an internal ip. The following information works for a Linux host and guest.

Guest OS:
sudo apt-get install nfs-kernel-server

add this line to /etc/exports (e.g. IP 192.168.0.20 of host OS)
/home/username/sharedfolder 192.168.0.20(rw,async)

Host OS:
sudo apt-get install nfs-common

mount the NFS drive (e.g. IP 192.168.0.21 of guest OS)
mkdir /home/username_host_os/sharedfolder
sudo mount 192.168.0.21:/home/username_guest_os/sharedfolder /home/username_host_os/sharedfolder

unmount the drive when you don’t need it anymore
sudo umount /home/username_host_os/sharedfolder

Remark: The IPs can be easily looked up via the network manager applet.

Virtualbox Installation, Ubuntu 13.10

As VMware sometimes has problems supporting the newest Linux kernel (in my experience), I moved to Virtualbox which seems better suited for the cutting edge Ubuntu version.

First of all I would recommend installing the newest software package from the Virtualbox website: https://www.virtualbox.org/wiki/Linux_Downloads

When adding a repository you can use the raring repository for Ubuntu 13.10:

deb http://download.virtualbox.org/virtualbox/debian raring contrib

Virtualbox has quite a good manual online for installation issues: https://www.virtualbox.org/manual/

For stuff like USB 2.0 support it is necessary to install the VirtualBox Oracle VM VirtualBox Extension Pack (Note the correct link “All supported platforms”!).

To let the guest vm use the USB devices of the host system you will have to add your host user to the vboxusers group:

sudo usermod -G vboxusers -a $USER

Afterwards it is might necessary to log out and start your windows session again.

Add your USB device that you want to use in Virtualbox and start your vm guest system.

pdftk update_info with XML numerical entities / UTF-8

Option A – UTF-8 characters with update_info_utf8

pdftk original.pdf dump_data_fields_utf8 output metainfo.txt

Remark: If the metainfo.txt is empty, use:
pdftk original.pdf dump_data output metainfo.txt

Edit the generated file metainfo.txt:
InfoKey: Title
InfoValue: Übergeek

pdftk original.pdf update_info_utf8 metainfo.txt output new.pdf


Option B – ASCII characters and XML numerical entities with update_info

pdftk original.pdf dump_data output metainfo.txt

Choose your XML numerical entities:
List of XML and HTML character entity references

Edit the generated file metainfo.txt:
InfoKey: Title
InfoValue: Übergeek

pdftk original.pdf update_info metainfo.txt output new.pdf
The PDF now has the metainformation Title: Übergeek.