Jan 262012
 
#!/bin/bash
 
# By Ed Wiget
# This fixes dropbox sync issues on linux
 
# get a list of files executable now
find ~/Dropbox -type f -perm -u+x > /tmp/dropbox_files-`date +%Y%m%d`
 
# fix the permissions
sudo chown -R $USER ~/Dropbox
sudo chmod -R u+rw ~/Dropbox
sudo chown -R $USER ~/.dropbox
sudo chmod -R u+rw ~/.dropbox
 
# remove any conflicting files from the file list above step 1
grep -v -e "conflicted copy" -e "Case Conflict" /tmp/dropbox_files-`date +%Y%m%d` > /tmp/dropbox_files-`date +%Y%m%d`.txt
# set the executable permissions back
for files in `echo /tmp/dropbox_files-\`date +%Y%m%d\`.txt` ; do chmod u+x "${files}" ; done
 
# remove any files that are in conflict
find ~/Dropbox -type f -name \*"conflicted copy"\* -exec rm -f "{}" \;
find ~/Dropbox -type f -name \*"Case Conflict"\* -exec rm -f "{}" \;
 
# remove temp files
rm -f /tmp/dropbox_files-`date +%Y%m%d`
rm -f /tmp/dropbox_files-`date +%Y%m%d`.txt
Sometimes you will run into an issue where you have multiple computers that mysteriously stop syncing with dropbox. What I have found is it is almost always caused by 1 of 2 things……file permissions, conflicts. I have 8 devices syncing to my dropbox, and every single one of them are linux except for one. It seems as though anytime I use my sole Windows computer to add something to dropbox….the others mess up. I suspect an issue with linux file permissions and windows ntfs drives.

Anyways, this script will fix the problems. Make sure you adjust the path if your linux install does not have dropbox at ~/Dropbox.

Jan 182012
 

 

I usually don’t disable apache, php, nginx headers because to me that is just security through obscurity.

My thoughts are this…..

  1. if someone doesn’t know what version of software you are running and they decide to hack your domain or server, they will simply throw every public exploit at it that exists for said product or even simply “fingerprint” it for the correct version
  2. It makes my life easier because I can also query for those headers if for some reason I don’t remember the version of software (which saves me from logging in to the server or using other methods that might take longer – efficiency is key!)
  3. skiddies are going to throw everything at it anyways

On the flipside…..

Continue reading »

Jan 092012
 

One of the easiest ways to set up a subversion server that is lightweight is to use an existing linux server with sufficient free space available to hold your repositories.  This is much more lightweight because it really doesn’t require any additional software or services, outside of subversion which is likely already installed if you use the svn client; and ssh which is probably already installed and running.

I will give the steps I used for centos, but it will work with other linux distributions if you apply the correct package management steps (pacman, apt-get, yum, emerge, etc):

First, make sure we have subversion and openssh installed:

yum install subversion openssh-server

Continue reading »

Dec 122011
 
fluxbox-win7

So, I use linux exclusively….for everything except my photography post-processing.  I don’t care about the rants and raves people give me about gimp, my workflow has included photoshop since Photoshop v3.0 (like mid-1990′s), and its just too hard to switch…..so I keep one windows machine around just to do photoshop tasks.

Now that I have my fluxbox bliss on my 16GB Quad-core machine dual booting with the factory Windows 7….I thought it would be nice to be able to run windows 7 inside of Linux.  In the past, I always did the “virtualbox from new installation”.  Its kind of a pain in the ass and a huge waste of disk space.

Doing some quick research, I found several articles on booting the physically installed windows in virtualbox and after many trials and errors, I found a simple solution that works.

Here is how I set it up…..

Continue reading »

Dec 102011
 

Why did I build a new xchat package for backtrack 5?  Because there is a bug in the one that is included.  The bug causes favorites to not be saved on exit.  I don’t know if it affects everybody but I found a bug on the xchat website that is over a year old regarding it.  So, if ubuntu or backtrack maintainers won’t fix it…..I will.

You can get the source and deb packages here:

http://www.edwiget.name/files/xchat_2.8.8-1_amd64.deb
http://www.edwiget.name/files/xchat_2.8.8.orig.tar.gz

The requires libperl-dev which apparently doesn’t exist in the repos too….so its here:
http://www.edwiget.name/files/libperl-dev_5.10.1-8ubuntu2.1_amd64.deb

Dec 102011
 
OpenVAS-Structure

If you want to use the packages from Openvas on backtrack, these are the pinnings you will need to use to keep the backtrack versions from over-writing the openvas built versions.

Package: *
Pin: release n=revolution
Pin-Priority: -10
 
Package: *
Pin: origin download.opensuse.org
Pin-Priority: 900

Dec 012011
 
$ lspci -vvv | grep Audio
00:1b.0 Audio device: Intel Corporation 82801I (ICH9 Family) HD Audio Controller (rev 03)
 
$ cat /proc/asound/card0/codec* | grep Codec
Codec: Conexant CX20561 (Hermosa)
Codec: Conexant ID 2c06
 
sudo echo "options snd-hda-intel model=generic" >> /etc/modprobe.d/alsa-base.conf
sudo alsa force-reload
sudo /etc/init.d/mpd restart

Nov 302011
 

I have set up many laptops and netbooks with linux and have always used either full-disk encryption or ~/ encrypted.  Its really easy to do and ANY laptop/netbook/tablet/pad/whatever_next mobile device should be encrypted.  I won’t get into the mechanics of why, just do it.  The last article I wrote about this is no longer online (Maysville Linux Users Group, circa 2007) and it was much harder to accomplish back then, often requiring custom kernels to be compiled, etc.  Backtrack has “nearly” everything it takes right on the live cd.

Prerequisites

  1. A laptop
  2. bootable media (backtrack on usb stick, cdrom, some other distro, etc)
  3. Internet connection (backtracks only requirement is to download two files)

Continue reading »

Nov 232011
 
clusterssh

I have been using cluster ssh on and off for some time now but I have never written about it.  So first, let me tell you what my definition of it is……a huge time saver for multiple like tasks that need completed across many servers or systems.

As an example, lets say a critical update comes in and it affects 25 web servers, a lot of people will log into each web server, perform the update, log out, go to the next one, etc until completed.  That’s a huge waste of time….assuming it takes 5 minutes to log in, run the update, log out, log into the next one….that is 25 x 5 or roughly 125 minutes, slightly more than 2 hours.

Continue reading »

Nov 232011
 

I am finally going to add this to an article, even though I have had this 1rst generation ipod touch since release day and have used it with Linux since day 1……

To use your ipod with fluxbox requires three packages.

sudo apt-get install gtkpod libimobiledevice-utils libimobiledevice1

You then have to mount your ipod touch and since fluxbox doesn’t really have a way to do that….I made a script:

#!/bin/bash
#
# mount ipod touch script by ed wiget
sudo /usr/local/sbin/usbmuxd -v -u &
DETECTED="echo -e `ideviceinfo` | wc -l"
#echo -e "is it ok to continue with the mount command?"
#read answer
#if [ $answer == 'y' ]
if [ ${DETECTED} -ge 1 ];
	then
		echo "ipod detected...mounting"
		ifuse /media/ipod
	else
		echo "ipod detection failed....exiting"
		exit
fi

After it is mounted, you can then run gtkpod and it should auto detect it.  It will create a database of the song hashes.

During usage, if you receive an error with gtkpod during song export that says:

CRITICAL **: transfer_track_glist_between_itdbs: assertion `!new_tracks' failed
Segmentation fault

Restart gtkpod, select the playlist you were exporting and on the export dialog box, uncheck “Check for duplicates”.  Now exporting will work.