Adobe flash plugin on 64 bit firefox
Flash videos are an important part of the web browsing experience and a stable firefox flash plugin is crucial.
I have used flashplayer-mozilla package from debian-multimedia.org, and it just keeps freezing on my 64 bit debian lenny.
Flashplayer-mozilla uses nspluginwrapper to allow use of 32 bit plugins on 64 bit browsers. It just doesn't work good enough,
npviewer.bin suddenly consumes lots of cpu power and i have to kill it manually.
The solution is to replace flashplayer-mozilla with flashplugin-nonfree from backports.org. Flashplugin-nonfree only exists in debian
unstable, but i want to run lenny(stable). Packages from backports.org solves this for me.
Here are my installation notes:
# cleanup old flash plugin
apt-get remove flashplayer-mozilla nspluginwrapper
# add backports to /etc/apt/sources.list
deb http://www.backports.org/debian lenny-backports main contrib non-free
# import backports.org archive’s key into apt
apt-get install debian-backports-keyring
# some info about the package you are about to install
http://packages.debian.org/lenny-backports/flashplugin-nonfree
# install "flashplugin-nonfree" from backports
apt-get install flashplugin-nonfree
The file is installed into: /usr/lib/flashplugin-nonfree/libflashplayer.so
# use alternatives to set preferred flash player (if you only have one alternative, nothing needs to be done)
update-alternatives –config flash-mozilla.so
# select libflashplayer.so
*+ 2 /usr/lib/flashplugin-nonfree/libflashplayer.so
# check working flash version version
http://www.adobe.com/software/flash/about/
Some debug info can be found in the "firefox about:" page
# enable plugin paths in firefox
about:config
set plugin.expose_full_path to true
# get plugin info like version and path, useful if you wonder what .so firefox uses
about:plugins
November 11, 2009
Tags: firefox Posted in: linux By: alfakrølle
One Comment
Myers-Briggs Type Indicator – a personality assessment
I always had a fascination with psychology and the Myers-Briggs Type Indicator (MBTI) is a well known assessment used worldwide. The MBTI is a psychometric questionnaire designed to measure psychological preferences in how people perceive the world and make decisions.
The MBTI consists of these different dichotomies:
Extraversion – Introversion
Sensing – iNtuition
Thinking – Feeling
Juding – Perceiving
Yesterday I completed the test on www.mbticomplete.com, a website that come recommended by the Myers & Briggs Foundation. I used about 10 minutes on the tests, and afterwards I followed a quite interesting learning process. I recommend you take some time with this and not skip directly to the results.
In the process it clearly came to me what kind of personality type that correctly describes me, INTJ. The assessment also came up with this answer.
I could download a pdf with a detailed description of the INTJ personality type.
Some Characteristics of INTJs are:
- They value health, home, family, and achievement.
- They value others who think and act as independently as they do.
- They quickly see patterns in external events and develop long-range plans.
- They make their decisions based on logic and analysis.
- They are less satisfied in any job that limits or restricts their vision and innovation.
- INTJs often value and use confidently their intuitive insights in fields such as science, engineering, invention, politics, and philosophy.
The test costs $59.95. Note that you receive 2 email confirmations of your payment. The customer support stated that this is a bug. I was only billed once.
The MBTI has received some criticism, but keep in mind, MBTI measures preference, not ability.
Read more:
http://www.myersbriggs.org/
http://www.mbticomplete.com
November 9, 2009
Tags: psychology Posted in: psychology By: alfakrølle
3 Comments
Recover root password
Forgot your root password? No problem if you can access the computer physically. (we assume BIOS password is not set)
1. Reboot the computer, press a key to enter GRUB menu.
2. Enter 'e' to edit the default boot entry, usually the one at the top. Find the line with path to kernel, ususally the line starting with 'kernel', edit this line.
3. Append init=/bin/bash at the end. This gives you a root shell, with only a read-only root filesystem mounted. Press 'b' to boot this grub entry.
4. The computer boots and a root shell appears without any authenticating. Enter 'passwd' to set a new root password.
5. Reboot, your root password is changed. Everything is good, and you have also learned about the importance of the physical security of your computer.
October 16, 2009
Tags: linux, security Posted in: linux By: alfakrølle
No Comments
A book review: Hacking Linux Exposed, Second Edition
Security is not a product, it is a process, and therefore a ongoing learning process. In my opinion,good security books are not that easy to find. Many only cover the basics like "disable all unneeded services in inetd.conf" and "set PermitRootLogin
NO in sshd_config". Although these are truly great tips, and should always be considered, i miss books that takes a wider and more practical approach to the concepts of security.
Enter Hacking Linux Exposed, Second Edition. This books cover an impressive number of topics.
The books starts off with how to lock down you linux computer, then showing common ways to break into it from the outside. Local user attacks and application security (mail,ftp,dns,web) are covered next. Then firewalls and DOS, and finally what to do after a break-in.
Each chapter describes different types of security challenges and attacks with a risk (popularity, simplicity, impact) assessment, and then some countermeasures. The countermeasures impressed me. After reading many of the Attack scenarios i was thinking "is there really a good defense against this situation?" and almost without exceptions they had well thought through solutions. There were some situations described in the Advanced System Abuse where the box had been rooted and a skilled cracker was playing around in the kernel, modules and memory to avoid being detected. A situation like this is pretty hopeless, file integrity checks and LIDS can help sometimes. This was probably the only chapter i felt like… "damn, i am pretty helpless if this happens to me". A nice motivation to reading the rest of the book closely , and implement strategies to prevent someone from cracking a user and root, in the first place.
Some of the useful tips I picked up (some of them i was already aware of, but a nice reminder even so):
- to avoid race conditions caused by your code use functions that are atomic (system calls executed uninterrupted inside the kernel)
- don't use pagers to view log files, crackers could insert f.ex \r to fool the pager. Use an editor like vim
- consider more use of chattr -i to fool script kiddies. Not a solid security measure, but it couldn't hurt.
- subscribe to bugtraq
- there are a lot of different tools and strategies for cracking a computer, knowing this keeps my guard up
Another thing I liked was the interesting Notes and Cautions text throughout the book. Some examples:"Even though we usually think of localhost as 127.0.0.1 you can actually use any 127.x.y.z address. This is quite helpful if you want to test new daemons…" and "In spite of the inaccurate and overblown hubbub the day Dsniff 2.3 was released, these programs do not expose a weakness in the SSH or SSL protocols, they describe a weakness in users's understanding of the protocols and handling of warning. SSH and SSL are secure, when used correctly…"
And some completely irrelevant, although amusing notes like this one: "Pack my box with five dozen liquor jugs." is the shortest sentence in the English language we know of that uses all 26 letters of the alphabet without any acronyms. If you know a shorter. we'd love to hear it…."
Summary: Hacking Linux Exposed, Second Edition is a great book with its strengths in the width of topics, the realistic scenarios and practical solutions. If you are interested in linux and security it is a must read, don't let the old publication date misguide you, it is still relevant.
Your confidence, and healthy paranoia, will grow by the page.
Rating 5/5
October 8, 2009
Tags: books, linux Posted in: book reviews, linux By: alfakrølle
One Comment
Building deb packages from source
Dpkg is a great package system with a huge library of prepackaged software. Though sometimes you need to compile on your own binaries. Maybe you need to customize the software options, patch the source or just want to look through the source before you compile. Either way, you can easily compile your own packages with the help of Debian tools.
# add deb-src to /etc/apt/sources.list
deb-src http://ftp.no.debian.org/debian/ lenny main non-free contrib
# download the source code for our test package "vim"
espen@nixpert:~/software/dpkg/vim$ apt-get source vim
# in this example we will edit an option in debian/rules
espen@nixpert:~/software/dpkg/vim/vim-7.1.314$ vim debian/rules
CFGFLAGS:=–prefix=/usr –mandir='$${prefix}'/share/man –with-compiledby="Lice Waken"
# use debchange (dch) to tag our local custom built packages
espen@nixpert:~/software/dpkg/vim/vim-7.1.314$ dch -l licewaken
# build the package and place the finnshed .deb in parent directory
espen@nixpert:~/software/dpkg/vim/vim-7.1.314$ dpkg-buildpackage -rfakeroot -uc -b
# install our custom deb packages
espen@nixpert:~/software/dpkg/vim$ dpkg -i *.deb
# check if custom debs are installed on system
espen@nixpert:~/software/dpkg/vim$ dpkg -l |grep -i vim
ii vim 1:7.1.314-3+lenny2licewaken1 Vi IMproved – enhanced vi editor
ii vim-common 1:7.1.314-3+lenny2licewaken1 Vi IMproved – Common files
# check customation of vim package
espen@nixpert:~/software/dpkg/vim$ vim –version |grep Compiled
Compiled by Lice Waken
Read more on:
debian/rules: http://old.gpul.org/colaboraciones/dnmg/ch-crules.html
man debchange
man dpkg-buildpackage
October 7, 2009
Tags: debian, dpkg, linux Posted in: linux By: admin
3 Comments
List open files with lsof
command: lsof
package: lsof
description: lsof – list open files. In *nix everything is a file, so lsof is a really powerful command
# list all Internet network files (connections)
lsof -i
# list all connections to TCP ports
lsof -i TCP
# list all connections to a port
lsof -Pi :22
# display ports that are listening for a connection, Option "Pn" skips port and network number conversion
lsof -Pni | grep LISTEN
# display ports that have an established connection
lsof | grep ESTABLISHED
# list files opened by user "espen"
lsof -u espen
# list commands interacting with a file
lsof /var/log/messages
# list files opened by a PID
lsof -p 27354
# list files opened by command "sshd"
lsof -c sshd
October 5, 2009
Tags: linux, lsof Posted in: linux By: admin
One Comment
debian: build-essential
Sometimes you need to compile from source, and on occasions the build tools are not installed. The easiest way to install all the needed software for compiling/building software on Debian (and Ubuntu) is to use the build-essential “meta” package. Build-essential is a set of programming libraries along with other essential tools for building apps from source / building debian packages. You can install it using:
apt-get install build-essential
A list of what this package contains is located in: /usr/share/doc/build-essential/list
October 4, 2009
Tags: debian, dpkg, linux, ubuntu Posted in: linux By: admin
One Comment
Some useful keyboard shortcuts in the Bash shell
Command: Bash
Ctrl+D – quits the current Bash session
Ctrl+P – display last command executed
Ctrl+N – display next command executed
Ctrl+U – delete all from the cursor to the left
Ctrl+K – delete all from the cursor to the right
Ctrl+B – go back one character
Ctrl+F – go forward one character
Alt+B – go back one word
Alt+F – go forward one word
October 4, 2009
Tags: bash, linux Posted in: linux By: admin
No Comments
A blog about all things related to Unix-like (*nix) operating systems.
Hi
My name is Espen Hovind and I am from Norway. Since 1985 I have been playing around with computers (Commodore 64) and in 1998 I discovered Linux. This blog will include some of the things i have learned about computers and technology over the years.
My main focus will be on Linux in general and some of the popular distros like Debian and Red Hat. I am also a part time programmer with exerience in bash,perl,c and java.
As time goes by there should be plenty of relevant tips and tricks on this blog for many of you out there. Enjoy!
October 4, 2009
Posted in: information By: admin
No Comments
Search for files in a directory hierarchy
command: find
package: GNU findutils
description: find – a powerful and flexible command to search for files in a directory hierarchy
# search files in current directory containing string "mp3"
find . -name "*mp3*"
# search for file name and directory name containing "file" and print content to stdout
find . -name "*file*" -print -exec cat {} \;
# count files recursively in current directory
find . -type f -print |wc -l
# list files and directories with status changed last 10 minutes
find . -cmin -10
# list files that have been modified on your system in the past 60 minutes
find / -mmin 60 -type f
# list files over 1k, direct to xargs and print a sorted list with ls
find . -size +1k -type f -print | xargs ls -Sshl
# only dig down 2 levels of directories below the command line, useful when on top of a deep directory hierarchy
find . -size +1k -type f -print | xargs ls -Sshl
Read "man find" for more syntax
October 4, 2009
Tags: find, linux Posted in: linux By: alfakrølle
No Comments
