The News

Read some news and pretend that you are working. Bosses love that!

VirtualBox Guest Additions and shared clipboard and Folders for Ubuntu Guest

posted Jul 2, 2017, 1:43 AM by Leigh Williams

1.) Install guest additions from the VBox menu as per normal then run "sudo apt-get install virtualbox-guest-dkms"
2.) sudo usermod -a -G vboxsf YOUR_USER
3.) set up your shared folder 
4.) restart your guest

To install MySQL
sudo apt-get install mysql-server
sudo mysql_secure_installation
sudo apt-get install mysql-client
sudo apt-get install mysql-workbench

Plex not seeing NTFS external hard drive

posted May 7, 2017, 12:49 AM by Leigh Williams

type sudo blkid. You will get output like this:
/dev/sda1: UUID="9081b56d-8715-49f3-a35d-529a39d5780e" TYPE="ext4" PARTUUID="c8168d71-01"
/dev/sda5: UUID="fbd90bd5-6b1a-4088-8569-0afbf0faebab" TYPE="swap" PARTUUID="c8168d71-05"
/dev/sdb1: UUID="79a6887b-0168-464e-9507-84cc1233fcb6" TYPE="ext4" PARTUUID="c3072dd0-01"
/dev/sdc1: UUID="4E65750852A3B04A" TYPE="ntfs" PARTUUID="000dfe15-01"

Way at the end is the NTFS drive. Now create an /etc/fstab entry like this:
UUID=4E65750852A3B04A /media/theexternal ntfs-3g permissions,nofail,auto 0 0
nofail means your pc won't fail to boot if your external drive is not plugged in. 
If your drive wasn't plugged in during boot, and you plug it in later and it doesn't boot, enter the comman "mount -a" to mount all again (mount-a reads fstab and check where the drive is and where to mount it)


Plex not seeing external flash drive (ext4 formatted)

posted May 7, 2017, 12:39 AM by Leigh Williams   [ updated May 7, 2017, 12:40 AM ]

Because /media is owned by root, plex will have issues.
Add the plex user to your group: sudo addgroup plex YOURGROUP

Then, open the "disks" app in ubuntu, choose your flash drive, click on the gear icon, click on Edit Mount Options, switch off auto mount, and then change the mount directory to something like "/mnt/myflashdrive"
You will see an entry like this in /etc/fstab:
/dev/disk/by-id/usb-JetFlash_Transcend_16GB_20LEYYIBYO01FB61-0:0-part1 /mnt/transcendflash auto nosuid,nodev,nofail,noauto,x-gvfs-show 0 0

If needed, restart plex. 

All is good now

PS3MediaServer on Ubuntu

posted Mar 4, 2017, 9:09 AM by Leigh Williams

Plex is cool, but if your internet goes down, then your clients can't always connect. So, back the the basics for me with ps3MediaServer as a backup:

sudo apt-get install mencoder tsmuxer avisynth ffmpeg mplayer
sudo apt-get install default-jre
Download generic-linux-unix from: https://sourceforge.net/projects/ps3mediaserver/files/
Change PMS.sh and tsmuxer to be executable if it is not
./PMS.sh (if you have more than one IP interface on your PC, bind it to your preferred one)

Kali and VirtualBox

posted Dec 22, 2016, 7:20 AM by Leigh Williams

In order to see USB devices in VirtualBox, do the following:
1.) sudo apt-get install dkms
2.) sudo apt-get install gnome-system-tools
3.) sudo adduser youruser vboxuser

Now log out and back in, you should see your USB devices listed in VirtualBox

Get public IP and email it to yourself using Ubuntu

posted Dec 4, 2016, 5:15 AM by Leigh Williams

1.) Get your current public IP and write it to a file:
dig +short myip.opendns.com @resolver1.opendns.com >> myip.txt (got this off the internet, thanks to the guy that posted this!)

2.) Read the file contents and email it:
Basically, follow this tutorial: https://easyengine.io/tutorials/linux/ubuntu-postfix-gmail-smtp/
If you get an error like this one below then do this: 
ERROR: warning: unable to look up public/pickup: No such file or directory
DO THIS: mkfifo /var/spool/postfix/public/pickup

3.) Your config file should look like this:
relayhost = [smtp.gmail.com]:587
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options =
smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt
smtp_use_tls = yes





Crontab and ClamAV

posted Sep 9, 2016, 10:44 AM by Leigh Williams

This post is mostly because I use crontab like once every 3 years and can never remember the where and what.

1.) On Ubuntu, type in "crontab -l". This will list the cron jobs in the cron table (crontab)
2.) For example, the clamav cron runs as your user, and you will find it in your crontab
3.) crontab looks in /var/spool/cron/crontabs for jobs to execute. In this folder, you will find a folder for every user that has jobs to run
4.) crontab's format is a little different from cron.daily, cron.hourly, etc, in that it doesnt need the username in the job line. crontab is therefore easier is it belongs to a user, and you can grant or revoke access to user's crontabs.

Clamav conf and logs are in:
  • /etc/clamav/freshclam.conf
  • /var/log/clamav/
  • /var/log/clamav/freshclam.log
  • Daily scan results will be in /home/YOURUSER/.clamtk/history/

Some apache2 configs for owncloud

posted Apr 1, 2015, 12:26 PM by Leigh Williams   [ updated Apr 3, 2015, 7:50 AM ]

OMS, the apache guys just can't stick to a standard. But anyhow, here are some configs to do:

Issue 1 (Where is my config.php)
Most likely it is in /var/www/owncloud/config/config.php



Issue 2 (when starting Apache)
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message

I didn't test the below but it should work
Solution (Didnt test, but should work)
This can be overcome by two way.

Add ServerName localhost as the last line in /etc/apache2/apache2.conf file.

Create a file named /etc/apache2/conf-available/servername.conf and add the string ServerName localhost inside and save it. Create a soft link under /etc/apache2/conf-enabled as follows

ln -s /etc/apache2/conf-available/servername.conf .
# or
a2enconf servername
and restart the server.

The string localhost can be replaced with any valid domain name (ie. example.com).


Issue3 (Enable SSL in Apache)
Just check this youtube video: https://www.youtube.com/watch?v=fgOTvPSC-rg


Issue 4 (Cannot access owncloud from local network)
It is probably a firewall issue
Open up rules for your local network e.g. 
Source: 192.168.80.0/24
Destination: 192.168.80.34 (port 80,8080, and 443 if you're using SSL)


Change owncloud default data directory:
https://www.youtube.com/watch?v=Uf--rx3TjTs


Install BitTorrent Sync by following this guide:
https://www.digitalocean.com/community/tutorials/how-to-use-bittorrent-sync-to-synchronize-directories-in-ubuntu-12-04


Kali Linux and its Wireless

posted Jan 31, 2015, 9:41 AM by Leigh Williams   [ updated Jan 31, 2015, 10:57 AM ]

Recently I had some issues getting Kali to detect my WiFi USB adapter. A few things were adding to this issue. I will explain my step by step guide here.
Remember that Kali MUST have a Wireless USB adapter, it cannot use your built in (on-board) USB adapter. 

Install your Kali headers, you might need them along the way:
apt-get install linux-headers-`uname -r` (remember that you must use back ticks, not single quotes. The backtick is next to the 1 on your keyboard)

1.) Virtualbox did not see my newly added Wireless USB Adapter. This was a permissions issue. 
To fix it do: sudo usermod -G vboxusers -a $USER
Check out this URL: http://askubuntu.com/questions/365850/virtualbox-not-seeing-any-usb-devices-in-the-usb-filters-settings

Now it is easy to add a USB filter and select your USB Wireless Adapter

Check out this URL for much more info! http://wiki.backbox.org/index.php/Compat-drivers_aircrack_patched 

2.) You must install a compat-wireless driver. Most tutorials on Youtube are old and those drivers don't exist any more. No worries, you can get the latest backport and install it.
To fix it: Download a backport from here: https://backports.wiki.kernel.org/index.php/Main_Page (just click on the download button and select the latest stable release)
Then, copy it to your Kali hom folder (if not downloaded using Kali)
Untar it, tar xvf backport....-3.xxxxx (replace the file name with your file name)
Now CD into the untarred folder
cd compat-wireless-3.xxxxx

3.) Next, you must install a patch for airmon-ng, especially if you are using a Realtek chipset.
To fix it: sudo wget http://patches.aircrack-ng.org/mac80211.compat08082009.wl_frag+ack_v1.patch
Then apply the patch sudo patch -p1 < mac80211.compat08082009.wl_frag+ack_v1.patch (you must be in the untarred compat-wireless folder!)


4.) Now you must install the drivers. You will use make and make install as such.
While in your compat-wireless folder, issue the "make" command.
If it gives you any issues about not having a default config file, just choose your closest one from the list it will show you). Your command will look something like "make defconfig-rtlk" or something.
After your make is done, you must run "make install"
It will let you know once done and ask you to reboot.

5.) After your reboot, issue the command "airmon-ng" and see if it is detecting wlan0. If not, make sure ifconfig and iwconfig shows it. You can also try putting your wlan0 directly into monitor mode by doing the following:
ifconfig wlan0 stop
iwconfig wlan0 mode monitor
ifconfig wlan0 start

if airmon-ng now sees it, put it into monitor mode by issuing the command "airmon-ng start wlan0" Hope this works, otherwise Google a bit more or try another wireless adapter.


Symlink your Google Chrome cache to /tmp

posted Oct 18, 2013, 12:35 PM by Leigh Williams   [ updated Oct 18, 2013, 12:36 PM ]

Refer two posts down on how to move your /tmp folder to memory (tempfs).

Now symlink your Google Chrome (or Firefox) cache to /tmp (which resides in memory).

rm -rf ~/.cache/google-chrome
ln -s /tmp ~/.cache/google-chrome

1-10 of 67