Sep 30 2017

Raspberry

  • sudo aptitude install debian-keyring debian-archive-keyring
  • Modify the file /etc/apt/sources.list – change “wheezy” to “jessie” in the first line, so it reads “deb
  • http://mirrordirector.raspbian.org/raspbian/ jessie main contrib non-free rpi”

  • Modify the file /etc/apt/sources.list.d/raspi.list – change “wheezy” to “jessie” in the first line and add “ ui” to the end of that line, so it reads “deb http://archive.raspberrypi.org/debian jessie main ui”
  • Create the directory /home/pi/.config/autostart by typing “mkdir /home/pi/.config/autostart” in a terminal. (Note the . in front of config.)
  • Type “sudo apt-get update” in a terminal to update the apt index files.
  • Type “sudo apt-get dist-upgrade” to start the upgrade process – this will take a couple of hours. Whenever prompted to update a file during this process, choose the Y option to accept the new file; if you don’t want to be bothered with these prompts, then call apt-get with the -y option – “sudo apt-get -y dist-upgrade”.
Jul 22 2016

postfixadmin – zmiana hasła administratora

doveadm pw -s MD5-CRYPT -p password | sed 's/{MD5-CRYPT}//'
update admin set password=’CRYPTED PASSWORD’ where username=’USERNAME’;

Sep 4 2015

Bitdefender Security for Virtualized Enviroments

Bitdefender Security for Virtualized Enviroments
default login: root
default password: sve
setup command: sva-setup
communication server: ip address:8443
update server configuration: ip:7076

Feb 26 2015

gammu sending sms

gammu sendsms TEXT 048123456789 -text "Halooo .."

Feb 20 2015

If your SSL certificate was received in DER format, here is the command to convert it to PEM:

openssl x509 -in signed_cert.der -inform DER -out server.crt

Feb 6 2015

compiling mariadb 10.0 on Slackware

add option
-DWITH_JEMALLOC=NO
to slackbuild

May 15 2014

HDD check on linux

1. Check HDD for bad block
sudo badblocks -v /dev/sda1 > bad-blocks
2. Pass the file to fsck
sudo fsck -t ext4 -l bad-blocks /dev/sda1

Jan 15 2014

clamdscan

Przykład clamdscan
sudo -u clamav clamdscan /home/ftp/samba_public/

Jan 15 2014

Linux random password

in bash script
tr -dc A-Za-z0-9_ < /dev/urandom | head -c 16 | xargs

function in $HOME/.bashrc
genpasswd() {
local l=$1
[ "$l" == "" ] && l=16
tr -dc A-Za-z0-9_ < /dev/urandom | head -c ${l} | xargs }

Dec 20 2013

PHP Warning: preg_match(): Compilation failed: support for \P, \p, and \X has not been compiled

recompile pcre with option

–enable-utf8 –enable-unicode-properties