Archive for the Computing Category

Install Samba file sharing

| January 30th, 2016

Install Samba file sharing

sudo apt-get install samba

edit the /etc/samba/smb.conf

sudo nano /etc/samba/smb.conf

If you wish for the users home directories to be visable when a samba user has been authed then around line number 193 (press CRTL + C) to check the current line number, change “read only” to from yes to no.

[homes]
 comment = Home Directories
 browseable = no
# By default, the home directories are exported read-only. Change the
 # next parameter to 'no' if you want to be able to write to them.
 read only = no

To add the whole system files to be visable accross the network add the following lines in the config file.

[system]
 comment = System
 path = /
 browseable = no
 writable = yes
 force user = root

Add a external usb drive as a network share

[Media]
 comments = 2TB WD Passport USB Drive
 path = /media/Media
 valid users = osmc
 browseable = yes
 writable = yes
 force user = root

Restart the samba service

sudo service smbd restart

Add a samba user called “osmc”.

$ sudo smbpasswd -a osmc
  New SMB password:
  Retype new SMB password:
  Added user osmc.

Lamp installation on Ubuntu

| July 25th, 2013

Have been working on the idea of streamlining (almost strip streaming) a LAMP installation on a Ubuntu box so far have made some scripts available on github

https://github.com/swooingfish/lamp_conf

This allow you to get the required software packages from the apt repo and then install mysql and apache2 with the required modules for most sites.

The lamp config also has apache turning script include and some default apache template files for sites allowing http and https sites.

I’ve also added a script which allows you to create self signed ssl keys.

Hope you enjoy it, and find it useful.

MySQL Database Diff Web Gui

| July 25th, 2013

Been working on a database compare web gui so you can compare two database and see the differances between tables.

So far the code is in a working stage and everything seems to be working well.

https://github.com/swooingfish/dbcompare

Let me know if anyone finds any bugs :]

This is based on this blog post here http://joefreeman.co.uk/blog/2009/07/php-script-to-compare-mysql-database-schemas/

My code is available on github. I will try and put a demo site up soon people can see it working in action, just a little worried just in case there is any security issues as i don’t want the whole world to see my databases 😉

OnionPi

| June 23rd, 2013

Tor on the Raspberry Pi After following the adafruit via this page http://learn.adafruit.com/onion-pi?view=all which sets up a default wheezy image to a wifi access point and then shows you how to install tor and get it configured to browser anonymously using the tor proxy. For people who don’t want to go thought the hassle with setting up the software, I’ve made my image file available. This is the default wheezy 2013-05-25 image (.img file) with the installed software for using onion pi. Download the OnionPi wheezy image (5GB) 20-03-2014 Download link broken, will try and get another image sorted or a install script might be better so it self configures.. Sorry. The image was written to my 8GB SD card, but I have not resized the partition, so you should be able to resize if you copy it onto the same size card or larger. The default user is pi and password is the raspberry pi standard of ‘raspberry’ (would be good to change it) The wifi adaptor I’m using is the zd1211, if your Wifi Dongle differs you can test if it’s got AP capabilities by using the command iw list After writing the image to a SD card, booting up your pi, you should see a SSID of the name ‘AnoNet’. Connect to this with your Wifi device (I used my net-book) and you should be able to check if your browsing is now anonymous. 5d01cdd6dc3211e29c6822000a1f9688_7 The wifi key is ‘Raspberry’ (please note the upper case R) I did have a issue with connecting via Windows 7, but that was before i rebooted the Pi after setting up all the scripts following the adafruit tutorial, though I think there might be a issue with Windows 7 computer and the DHCP server that is running on the Pi.

Raspberry Pi Camera

| May 18th, 2013

Unboxing the Raspberry Pi Camera

Installing the camera module

Raspberry Pi Camera

Camera from the outside

Source Code : https://bitbucket.org/gringog/raspberry-pi-projects/src/df160e826ba3ef35e65d608ae4eaf80e9d1cbe5a/camera?at=master

Saving the files to a samba share

sudo mount -t cifs -o username=pi,password=raspberry,rw,file_mode=0777,dir_mode=0777 //192.168.0.24/devices/My\ Passport/Camera /var/tlcam/net

Final result

The 5MP camera stores each jpeg about 2.5Mb, so a few hours can take up a lot of disk space, i mounted my external usb drive so i could save directly to that rather than using the R/RW of the SDCard.

Samba

| May 18th, 2013

Install Samba

sudo apt-get install samba samba-common-bin

edit /etc/samba/smb.conf

[homes]
comment = Home Directories
browseable = no

# read only = yes
writeable = yes

Restart Samba, with::

sudo service samba restart

Set the password for the pi user so you can login via another comptuer.

sudo smbpasswd -a pi