Tuesday, April 30, 2013

Boot iso image from GRUB2

This post shows how to boot clonezilla image from local disk with Grub2.

Saturday, April 6, 2013

Function for removing keys from known_hosts

When connecting via ssh to a remote host you are asked to confirm the key fingerprint. This is added to ~/.ssh/known_hosts file so no further confirmation is required.
What about when the remote key has changed? You need to delete the key from this file.
I've written a small function to make this deleting easier, just by typing one command:

sshrm-key <nr>

My .screenrc

Hi, in this post I'll show you my configuration file for GNU screen.
For those who doesn't know what screen is, it's a full-screen window manager that multiplexes a physical terminal between several processes.
You can open terminal tabs in it, detach it and later reattach and continue you work and many many more like for example session sharing.

Monday, November 19, 2012

Remotely lock KDE session

To remotely lock your KDE session, login via ssh and execute following command:

for KDE 4.9:
DISPLAY=:0 /usr/lib/kde4/libexec/kscreenlocker --forcelock >/dev/null 2>&1 &

for KDE 4.10:
DISPLAY=:0 /usr/lib/kde4/libexec/kscreenlocker_greet >/dev/null 2>&1 &

My .bashrc

It's good to setup your system exactly as you want. bashrc file is great option if you like to apply your settings after logging in.
So this post shows my bashrc file...

Friday, August 3, 2012

Proftpd: Can't connect to local MySQL server through socket

When using proftpd daemon with logging or authenticating with mysql database I've got following message in SQLLogFile:
error: '2002'
mod_sql/4.2.5[1245]: message: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'


This error caused inability to download file from ftp share.
To resolve this issue check the mysqld.sock path and set right address to connect to your DB in proftpd.conf.

You can find the right address in my.cnf configuration file under bind-address parameter.

Example:
cat /etc/mysql/my.cnf | grep bind-address
bind-address            = 127.0.0.1

cat /etc/proftpd.conf | grep -i sqlconnectinfo
SQLConnectInfo    mydatabase@127.0.0.1 mysqluser password

Tuesday, July 24, 2012

ORA-01034: ORACLE not available; ORA-27101: shared memory realm does not exist


If oracle database listener and database was started successfully and you're getting following error:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist




either by connecting through sqlplus or SQL Developer, check if ORACLE_HOME, ORACLE_BASE and ORACLE_SID variables are correctly set.
Also you might want to check if ORACLE_HOME and ORACLE_BASE are not pointing to a symlink (or if there's a symlink in path), as oracle doesn't know/support symlinks.