Category Archives: Články

Postfix satellite configuration

dpkg-reconfigure postfix

/etc/mailname

faix.homelinux.net

/etc/aliases

postmaster: root
webmaster: root
www-data: root
jan: jan.faix@gmail.com
wassana: fern.cht@gmail.com
root: jan.faix@gmail.com

newaliases

/etc/postfix/relay_passwd

mail.faix.cz mail:xxxxxxxx

chown root:root /etc/postfix/relay_passwd
postmap /etc/postfix/relay_passwd

/etc/postfix/main.cf

myorigin = /etc/mailname
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no
append_dot_mydomain = no
readme_directory = no
myhostname = home-desktop
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydestination = faix.homelinux.net, home-desktop, localhost.localdomain, localhost
relayhost = mail.faix.cz
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/relay_passwd
smtp_sasl_security_options =
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 800000000
message_size_limit = 100000000
recipient_delimiter = +
inet_interfaces = all
inet_protocols = ipv4
mail_owner = postfix
mydomain = faix.homelinux.net
mynetworks = 127.0.0.0/8 192.168.122.0/24
compatibility_level = 2

/etc/init.d/postfix restart

SASL authentication:

apt-get install libsasl2-modules sasl2-bin

Set password for user “mail”:

add user "postfix" to group "sasl"
usermod -a -G sasl postfix

/etc/init.d/postfix restart
/etc/init.d/saslauthd restart

Hosting multiple websites with Apache2

http://www.debian-administration.org/articles/412
http://fob.po8.org/node/289

If you are running multiple websites with Apache2 with mixed ports (usually http port 80, https port 443) change following configuration files. Variable NameVirtualHost should be only in file virtual.conf, find and comment it in other configuration files!

FOB: I recently reported being stuck trying to set up multiple SSL name-based virtual hosts on the same IP address with non-SSL name-based virtual hosts. Soon after, I figured it out. Shortly after that, one of my students suggested the same solution to me.

/etc/apache2/conf.d/virtual.conf

#
# We're running multiple virtual hosts.
#
NameVirtualHost *:80
NameVirtualHost *:443

/etc/apache2/sites-enabled

<VirtualHost *:80>
ServerAdmin webmaster@zviretnik.eu
ServerName zviretnik.eu
ServerAlias www.zvietnik.eu
...

<VirtualHost *:443>
ServerAdmin webmaster@zviretnik.eu
ServerName www.zviretnik.eu
ServerAlias zviretnik.eu
...

The ports 80 and 443 should be also defined in following configuration file.

/etc/apache2/ports.conf

Listen 80
<IfModule mod_ssl.c>
Listen 443
</IfModule>
<IfModule mod_gnutls.c>
Listen 443
</IfModule>

Also check your /etc/hosts file, if DNS name and IP address is correct.

127.0.0.1 localhost zviretnik.eu
94.143.171.113 zviretnik.eu zvire

Přírodní recepty

Přírodní projímadlo (uchovávat max. 2-4 dny)

6-8 čerstvých fíků, miska Kasie sennové nebo úzkolisté (Cassia senna / angustifolia), 100 g cukru, 1 limetka
vylouhovat kasii, scezený vývar rozmixovat s fíky
hmotu přivést k varu se 100 g cukru, odstavit a smíchat s 1/2 limetkové šťávy

Gel proti akné (uhovávat max. 6 týdnů)

měsíček (calondola oficialis), sklidit hned po rozkvětu
smíchat hrst květů měsíčku a hrst levandule s kakustem bahenním zalít 2,5 dcl horké vody
louhovat max. 10 min., rozmixovat a scedit přes síto s látkou
do roztoku přidat kolagen (vegetariánská želatina smíchaná s 2 lžícemi vody)
nechat schladnout, přidat pár kapek tee tree oil a 1 panáka vodky

FreeNX remote desktop access

https://help.ubuntu.com/community/FreeNX

FreeNX is a system that allows you to access your desktop from another machine over the Internet. You can use this to login graphically to your desktop from a remote location. One example of its use would be to have a FreeNX server set up on your home computer, and graphically logging in to the home computer from your work computer, using a FreeNX client.

It’s Open Source, secure (SSH based), fast and versatile! License: GPL

FreeNX server:

sudo add-apt-repository ppa:freenx-team
sudo apt-get install python-software-properties
sudo sed -i 's/natty/lucid/g' /etc/apt/sources.list.d/freenx-team-ppa-natty.list
sudo apt-get update
sudo apt-get install freenx
wget https://bugs.launchpad.net/freenx-server/+bug/576359/+attachment/1378450/+files/nxsetup.tar.gz
tar -xvf nxsetup.tar.gz
sudo cp nxsetup /usr/lib/nx/nxsetup
sudo /usr/lib/nx/nxsetup --install
scp /var/lib/nxserver/home/.ssh/client.id_dsa.key client-user@cliet-machine:/~
sudo /etc/init.d/freenx-server start

By default, nxserver uses port 22 for communicating over SSH.
/etc/ssh/sshd_config
/etc/nxserver/node.conf

# The port number where local ‘sshd’ is listening.

SSHD_PORT=22

FreeNX client:
sudo apt-get install qtnx

Firefox favorite addons and settings

WOT – Safe Browsing Tool
Tab Mix Plus
Firefox Sync
FlashGot
NoScript
Cookie Monster
Flagfox
User Agent Switcher
Google Hangouts

Adobe – Flash Player: Settings manager – Global Storage Settings panel:

http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager03.html

Panopticlick tests your browser to see how unique it is:
https://panopticlick.eff.org/

Multimedia plug-in for Gecko browsers
aptitude install gecko-mediaplayer

Apache2 – WordPress & Gallery solutions

If Apache server status page http://zviretnik.eu/server-status error 403 page not found appear, the solution could be modification of .htaccess file of WordPress. Mode rewrite has to have following rule:

# Stop Processing if you see server-info or server-status
RewriteRule ^(server-info|server-status) - [L]
# The Rewrite Condition below did not work
# RewriteCond %{REQUEST_URI} !=/server-status

Don’t forget, that server status is accessible mostly only from localhost. If you want to change it, you have to edit /etc/apache2/mods-enabled/status.conf (Allow from localhost).

In case you upgrade to Apache2, it may happen that your Gallery 3 show following error message when you try to change permission on album or photo:

Oh no! Your server needs a configuration change in order for you to hide photos! Ask your server administrator to enable mod_rewrite and set AllowOverride? FileInfo? Options to fix this.

If you have mode rewrite enabled (a2enmod rewrite) and your virtual host directory configuration already contain “AllowOverride FileInfo Options“, than problem could be in your /etc/hosts file. The localhost entry has to have also FQDN name of your server, for example:

127.0.0.1       localhost       zviretnik.eu

How to activate Windows 7 with windows loader

http://www.geekylocker.com/how-to-activate-windows-7-with-win-7-loader/

Today, Geekylocker is presenting another good hack and tricks to activate your windows 7 copy trial into working version.There is two ways of activating your new os, which the first way is to use a programmed loader or product activator, and the second way, which is much harder, by tweaking and modifying your BIOS setting. There are couple of activators available on the Web today, and certainly they work with Windows 7 RTM 32 and 64 bits on almost any computer (homemade or branded) and even on Mac.

Windows 7 activator software

So, let us learn more and continue reading…

 

First, let put some notes on how act¡vators work on this new OS.
Act¡vators, also known as loaders, add a script on the boot partition (Linux Grub boot loader (GRLDR)) which will put OEM information (SLIC 2.1) into memory before Windows starts. This way Windows thinks that the SLIC 2.1 come from the BIOS (which is false). Act¡vators also install a certificate and an OEM SLP key to activate Windows.

The commonly used activator is win7 loader, which has been tested to work on many laptops such as Dell, Acer, Samsung etc. Here are the features of this loader:

  • Automatically finds your active boot partition
  • Works on all languages
  • Works alongside hidden partitions
  • Works on Windows 7, Vista and Server 2008 editions
  • Support for BIOS modded users
  • Argument support for silent installs
  • You can use this tool to activate your Windows 7/Vista ISO by editing setupcomplete.cmd

This program to this very day is still the only fully coded API driven application that handles it’s own errors and depends on itself. It’s the original program based loader and it’s arguably the best loader based program to get you activated out right now with over 2 million downloads and counting and a strong fanbase behind it.

You can get win7 loader here:

Windows 7 Loader

Instructions:

1. Download the zip folder to your USB drive or external hd, so that you can run this program in the freshly installed OS.

2. Extract it. Run the application (.exe file).

3. Check the ‘Advanced options‘ , and the options are available on the right side of the window. Choose your SLIC, certificate and serial that fits your PC or laptop.

4. Press install. Done!

If everything goes ok, your copy of windows 7 is now activated!

Walla – Geekylocker team

 

Recovering Windows 7 Bootloader

http://neosmart.net/wiki/display/EBCD/Recovering+the+Windows+Bootloader+from+the+DVD

If your Windows Vista or Windows 7 bootloader has been damaged or corrupt in some way, you’ll have to get it reset before you can use EasyBCD to configure a dual-boot.

Use this section only if you cannot boot into any version of Microsoft Windows. If you can boot into Windows, we highly recommend using our Recovering the Windows Bootloader with EasyBCD guide instead!

Booting from the Windows Installation DVD

Stop! Are you using an HP or Dell? Don’t have a Windows Setup DVD?
Many so-called “professional” computer vendors are too cheap to include a Windows Vista or Windows 7 DVD with your PC. If you’re unlucky enough to get a recovery partition or a recovery DVD without a stock Windows setup DVD too, you have no way of accessing the repair center.As a service to our users, we provide a repair CD that provides access to the functionality discussed below, which you can download from our site. There is however a handling and processing fee for the download.

IMPORTANT: You cannot use this disk to install or reinstall Vista/7. We repeat: these recovery CDs do not contain any installation files!

Put your Windows setup DVD or your System Repair Disc in the drive and restart your PC. Assuming you’ve properly configured your BIOS to boot from CDs/DVDs before hard drives (or you can press F12 if your PC supports it to boot from the CD), you should get a prompt asking you to “Press any key to boot from the CD/DVD…

Press a key, and the CD will begin to load. If you are using your Windows Installation CD, you’ll see a dialog asking you want to Install Now, or in the lower left corner, an option to “Repair your Computer,” which you’ll want to click. If you’re using our recovery CDs, just go on to the next section.

Startup Repair lists all available recovery options, choose a recovery tool

Select “Repair your computer” to continue.

After selecting your language, the recovery CD will scan for operating systems on your drive. Select operating system from the list displayed on the screen, then press next to continue.
You’ll see a welcome screen like this one:

Recovery Essentials screen

 

Option One: Automated Repair

Clicking on the “Attempt automated repair…” text with the green arrow at the top of the screen will cause the recovery CD to attempt to repair your bootloader and boot menu. Assuming your boot files have not been too badly corrupted, this step should conclude with a “Issues resolved” message and prompt you to reboot. It could literally be this easy to fix your PC.

If the automated repair feature is not successful, or after rebooting you discover that your PC still does not work, read on.

Note: The automated repair only fixes one thing at a time, and you might need several things fixed (MBR, bootmgr, boot folder). So boot from the recovery CD again and repeat the whole process. If it’s still not working after repeating the automated repair 3 times, carry on with the following manual steps:

Option Two: Manually Repairing the Windows Bootloader

Desperate times call for desperate measures. This time, we’re going to select the “Launch command prompt” option and try to manually tell the Recovery Console what needs to be fixed. Chances are, this is as far as you’ll have to go; hopefully it’ll get the job done.

Go ahead and select “Command Prompt” from that list, and you should get a window not dis-similar to the one you see when run cmd.exe from Windows.

Let’s start by telling the recovery console to fix our MBR and bootsectors:

bootrec.exe /fixmbr
bootsect.exe /nt60 all /force

Then ask it (nicely!) to try and rebuild your BCD data from scratch:

You will need to replace C:\ in the example below with the letter for your boot drive! It’s most likely C:, but it could be something else!
attrib -h -s C:\boot\BCD

del C:\boot\BCD
bootrec.exe /rebuildbcd

If you’re lucky, this’ll work and you’ll see a message telling you everything went OK.

Reboot your PC and try booting back into Windows to see if it worked. Don’t forget to remove your Windows Vista DVD or Recovery DVD from the drive, or you’ll end back in the repair center!

If your PC still doesn’t boot, read on to Option Three for a more powerful recovery option.

Option Three: Nuclear Holocaust

Back at the main page of the recovery center, go ahead and select “Command Prompt” yet again from that list.

The first order of business is to make sure the MBR and bootsector contain the right references to the Windows bootloader:

bootrec.exe /fixmbr
bootsect.exe /nt60 all /force

Now we get rid of the old BCD registry, and create a new one instead.

Note: We’re assuming that the boot drive is drive C: below. If your computer is configured differently, be sure to use the appropriate drive letter here instead.

attrib -h -s C:\boot\BCD

del C:\boot\BCD
bcdedit /createstore c:\boot\bcd.temp
bcdedit.exe /store c:\boot\bcd.temp /create {bootmgr} /d "Windows Boot Manager"
bcdedit.exe /import c:\boot\bcd.temp
bcdedit.exe /set {bootmgr} device partition=C:
bcdedit.exe /timeout 10
attrib -h -s C:\boot\bcd.temp
del c:\boot\bcd.temp

Now we have a clean, working Vista bootloader. But we need to add a Windows entry to it:

bcdedit.exe /create /d "Microsoft Windows" /application osloader

bcdedit.exe should return a message with a GUID for the newly-created entry, something like this:
The entry {c0dfc4fa-cb21-11dc-81bf-005056c00008} was successfully created.

You’ll need to use the value that bcdedit.exe returned for you below, along with the drive letter for the drive that Windows is installed to:

Again, make sure to replace C: with whatever the correct drive is for your Windows Vista/7 installation.

bcdedit.exe /set {c0dfc4fa-cb21-11dc-81bf-005056c00008} device partition=C:
bcdedit.exe /set {c0dfc4fa-cb21-11dc-81bf-005056c00008} osdevice partition=C:
bcdedit.exe /set {c0dfc4fa-cb21-11dc-81bf-005056c00008} path \Windows\system32\winload.exe
bcdedit.exe /set {c0dfc4fa-cb21-11dc-81bf-005056c00008} systemroot \Windows

And, last of all, tell the bootmgr bootloader to list the new entry or else it’ll remain hidden:

bcdedit.exe /displayorder {c0dfc4fa-cb21-11dc-81bf-005056c00008}

Now your bootloader has been completely removed and rebuilt from scratch. If you got this to work, feel free to consider yourself one of the finest graduates of the NeoSmart Technologies Institute of BCD Learning.

At this point, you have a clean, untouched, and (hopefully) fully-working bootloader with one entry for Windows. Go ahead and reboot your PC, get back into Windows, and use EasyBCD to further tweak the bootloader to your heart’s content. We advise backing up the BCD registry immediately with EasyBCD before making any changes.