Posts tagged linux

Fix for slow mouse on Raspberry Pi

As a remainder:

When using Raspberry Pi Raspbian with some mice, the cursor lags and is slow and feels very unresponsive.

Easy fix:

  • insert your SD card in your computer
  • edit cmdline.txt
  • add this to the end of the cmdline: usbhid.mousepoll=0
  • save, eject SD and start Raspberry Pi
  • done

OpenWRT on TP-Link MR3020 as infopoint with local webserver

Howto install OpenWRT on an TP-Link MR3020 mini router with external filesystem on a USB stick running a local webserver (lighttpd) to serve up webpages to act as an info point e.g. in a exhibition.

Inspired by the Piratebox Project: http://wiki.daviddarts.com/PirateBox_DIY_OpenWrt
Read More »

SNMPD auf Ubuntu funktionsfähig bekommenGetting SNMPD to work on Ubuntu

Snmpd auf Ubuntu zu installieren scheint einfach zu sein, ist es auch, aber hat bei mir nie wirklich 100% funktioniert. Der snmpd funktionierte immer nur lokal, aber nicht für entfernte Zugriffe meines cacti Servers. Das Problem ist jenes, dass Ubuntu standartmässig den snmpd auf dem Loopback Interface startet, was Zugriffe von aussen verhindert.

Meine /etc/default/snmpd sieht nun so aus:

# This file controls the activity of snmpd and snmptrapd

# MIB directories.  /usr/share/snmp/mibs is the default, but
# including it here avoids some strange problems.
export MIBDIRS=/usr/share/snmp/mibs

# snmpd control (yes means start daemon).
SNMPDRUN=yes

# snmpd options (use syslog, close stdin/out/err).
#SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid 127.0.0.1'
SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -g snmp -I -smux -p /var/run/snmpd.pid'

# snmptrapd control (yes means start daemon).  As of net-snmp version
# 5.0, master agentx support must be enabled in snmpd before snmptrapd
# can be run.  See snmpd.conf(5) for how to do this.
TRAPDRUN=no

# snmptrapd options (use syslog).
TRAPDOPTS='-Lsd -p /var/run/snmptrapd.pid'

# create symlink on Debian legacy location to official RFC path
SNMPDCOMPAT=yes

Das war’s. Nun nur noch mit $ sudo /etc/init.d/snmpd restart den snmp Server neu starten und alles funktioniert so wie’s soll.

Setting up snmpd on ubuntu seems easy, but i never got it full working. It was working locally, but not for a cacti setup from another server. The problem was that the default install of snmpd on Ubuntu starts the demon on the loopback interface only, refusing connections from other computers.

Edit /etc/default/snmpd to fix that:

# This file controls the activity of snmpd and snmptrapd

# MIB directories.  /usr/share/snmp/mibs is the default, but
# including it here avoids some strange problems.
export MIBDIRS=/usr/share/snmp/mibs

# snmpd control (yes means start daemon).
SNMPDRUN=yes

# snmpd options (use syslog, close stdin/out/err).
#SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid 127.0.0.1'
SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -g snmp -I -smux -p /var/run/snmpd.pid'

# snmptrapd control (yes means start daemon).  As of net-snmp version
# 5.0, master agentx support must be enabled in snmpd before snmptrapd
# can be run.  See snmpd.conf(5) for how to do this.
TRAPDRUN=no

# snmptrapd options (use syslog).
TRAPDOPTS='-Lsd -p /var/run/snmptrapd.pid'

# create symlink on Debian legacy location to official RFC path
SNMPDCOMPAT=yes

that’s it. To restart the snmp server enter $ sudo /etc/init.d/snmpd restart

Ubuntu: networking tip

I upgraded one server to new hardware by changing the complete HP machine, but using my harddrive from the “old” server. As these two machines are almost identically, except for the processor (dual core now) this should have worked like a charm – and it did! (almost)

I rebooted on the new hardware, all services and serves came up, no problems so far. But when i tried to ping some other machine, this didn’t work 🙁

I checked /var/log/messages and the onboard Broadcom Interface showed up as eth1, but i was not able to start it. When i ran $ sudo /etc/init.d/networking restart i got some error messages like:

SIOCSIFADDR: No such device eth1
eth1: ERROR while getting interface flags: No such device

No clue what went wrong, i googled a lot and finally i stumbled upon this forum entry: http://ubuntuforums.org/showthread.php?t=221768

Then i ran: $ ifconfig -a
and got a list with my network interfaces and more importantly with it’s MAC address.

Then i edited /etc/iftab and changed the MAC address of the old hardware to the new onboard interface’s MAC address.

restart the networking with $ sudo /etc/init.d/networking restart

YESS, it works!

Ubuntu Server insecurity?

i just found out that my Ubuntu Server 6.10 has login shells for almost all users set in the /etc/passwd file!

That’s a very bad idea because this maybe enabled someone to install “Data Cha0s Back Backdoor” on my machine 🙁

I checked this with 2 other fresh Ubuntu Server 6.10 installations and both had the login shells for users like daemon, mail, www-data and so on. Especially www-data should not have a chance to create a shell in my opinion!

So i changed /bin/sh to /usr/sbin/nologin and hope this makes it a bit more secure.

Installing Flash Media Server 2 on Ubuntu 6.10

The installation script for Flash Media Server works only on RedHat Enterprise by default. With some modifications it works fine on Ubuntu Edgy:

apt-get install libnspr4 libstdc++5 libstdc++5-3.3-dev
wget http://download.macromedia.com/pub/flashmediaserver/updates/2_0_3/linux/flashmediaserver2.tar.gz
tar xfz flashmediaserver2.tar.gz
cd FMS*
wget http://www.bluetwanger.de/~mbertheau/fms.patch
patch -p1 < fms.patch
sudo ./installFMS

Live aus der Marschrutka – Installing Flash Media Server 2 on Ubuntu 6.10 Edgy

this howto is written bei Markus Bertheau, please check the original article and his blog here. with his great patch my installation of FMS2 on my Mac Book Pro running Ubuntu 6.10 server inside Parallels Desktop worked like a charm 🙂

The power of vim

vim is the commandline text editor vi (improved) and it features syntax highlight and colors. The good thing is, vim is included by default in Mac OS X – the bad thing is, color support is not enabled by default. To enable syntax highlight in vim create a .vimrc file in your home directory:

set term=builtin_ansisyntax
onset background=dark

if you have a color enabled ls installed in your system, this might be useful too:

export LS_COLORS='no=00:fi=00:di=01;33:ln=01;36:pi=40;33:so=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.ogg=01;35:*.mp3=01;35:*.wav=01;35'

di=01;33 colors directories in ls in bold yellow instead of hard-to-read-darkblue on black terminal windows. You can use this line either directly on your commandline or put it in /etc/profile for everyone on your system or just for yourself into ~/.bashrc

Sprache ändern

Categories

Archives