my notes

Automatic installation of security patches on Debian

If you plan to automatically upgrade your system you should only use the stable distribution with the security debian repository. For more info on Debian security read

To easily get the latest security updates use repository below

deb squeeze/updates main contrib non-free

Add the security repository to cron-apt

Open con-apt config file

# nano /etc/cron-apt/config


Chroot SFTP Users on Debian

Check your openssh-server version as it must be over 4.8

# dpkg --list | grep openssh-server

Edit sshd_config file

# nano /etc/ssh/sshd_config

search for Subsystem sftp, comment it out and below add

Subsystem sftp internal-sftp

User Setup

Replace hadzo with your user name

# useradd -m -s /bin/false hadzo


# useradd --create-home --shell /bin/false hadzo


Build your own .deb packages

I wanted to upgrade mydns on etch to mydns-ng and the package was missing.

So I decided to build my own using checkinstall which was missing for Debian etch, so I googled it and fond a link:

# wget

installed it

# dpkg -i checkinstall_1.6.1-1_i386.deb

downloaded mydns-ng


Downgrade a .deb package to a lower version

I recently upgraded my PHP from 5.2.9 to 5.2.10 PHP using the dotdeb repository. After the upgrade I started getting child died with signal error messages, so I decided to downgrade to PHP 5.2.9 and here is how you do it:

# apt-cache showpkg php5

search for line

Provides: 5.2.9-0.dotdeb.2 - 5.2.6.dfsg.1-1+lenny3

then downgrade the package like this:

# apt-get install php5=5.2.9-0.dotdeb.2

and the rest of php5 packages: