home / blog

Tag Archives: linux

More random CLI

Generate random password. dd if=/dev/random count=8 bs=1 | uuencode -m – Find executable files that are world-writable – for local privilege escalation exploits… find /usr -type f -perm -102 FLAC to MP3 conversion on MacOS. # darwin ports versions of … Continue reading

Posted in geek | Tagged | Leave a comment

Static IP addresses with Ubuntu 11.10 regression

Static IP addresses. Things have changed slightly, before (11.04 and earlier) you could have a static IP address AND the DNS entry from your DHCP. Now if you have a static interface in /etc/network/interfaces the /etc/resolve.conf file get clobbered by … Continue reading

Posted in geek | Tagged , , | Leave a comment

Embedding Video in Java

Task: Produce application with embedded video. Must support flash video or similar. Must work on older version of SunOS, Windows and Linux (needs pure java implementation really). Must be tight-integration, i.e. not just open a video in an external player. … Continue reading

Posted in geek | Tagged | Leave a comment

Ubuntu 11.10 update – assorted fixes

Waiting for network configuration hang at startup. Caused by directories not being created in setup. sudo mkdir /run sudo mkdir /run/lock sudo mv /var/run/* /run sudo mv /var/lock/* /run/lock sudo rm -rf /var/run sudo rm -rf /var/lock sudo ln -s … Continue reading

Posted in geek | Tagged , | Leave a comment

Retrospective update of awstats

If you can need to update AWStats later with old records this can be done by changing the data files. I moved the dates back on the LastLine, LastTime and LastUpdate lines. This trickery is only required if you don’t … Continue reading

Posted in geek | Tagged , | Leave a comment

Local YUM fun

If you’re installing redhat on a machine without Internet access you may wish to setup a local YUM repository for extra bits and pieces after the main install. Add the following to /etc/yum.repos.d/local.repo. If there are any other .repo files … Continue reading

Posted in geek | Tagged , | Leave a comment

Port forwarding using SSH

Say you have a load a kit on a private network behind a “bridge” PC and you want to be able to connect directly to machines on the private network from your main network, maybe remote debugging etc. SSH can … Continue reading

Posted in geek | Tagged , | Leave a comment

Force ethernet link renegotiation

/sbin/mii-tool -r eth0 restarting autonegotiation

Posted in geek | Tagged , | Leave a comment

Power of find

I’ve noticed a lot of people seem to struggle with the *NIX find command, which isn’t the most intuitive thing to use. Here are some examples. The general strategy is use one or more predicates such as -name for matching … Continue reading

Posted in geek | Tagged , | Leave a comment

MySQL root password reset on debian/ubuntu – cut and paste

Based on these instructions. http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html. Just cut and paste the following into a terminal to reset MySQL root password to ‘newpass123’ # stop existing service sudo service mysql stop; # start without access control sudo mysqld –skip-grant-tables & # wait … Continue reading

Posted in geek | Tagged , , | Leave a comment