Connect a ubuntu linux vm to an microsoft NTLMv2 proxy

In order to connect a ubuntu linux vm to a microsoft proxy server, several steps are involved to produce a working connection.

Several ubuntu versions (maybe a new version can do this automatically) are not able to connect to such a proxy without further tweaking.

The software which is needed to perform the NTLM authentication is named Cntlm.
It can be found here:
http://sourceforge.net/projects/cntlm/files/cntlm/cntlm%200.92.3/cntlm-0...

Download the latest version, untar and compile it using the default settings:
./configure --prefix=/url/local

Change linux keyboard layout persistently

In order to change the keyboard layout of a linux machine persistently, making it survive also a reboot, the file /etc/conf.d/keymaps has to be changed.

There you can find the options KEYMAP, which has to be changed to one of the keymaps found in /usr/share/keymaps and subfolders.

For example if the keyboard has to be set to a default german layout, you can use:
KEYMAP="de-latin1-nodeadkeys"
or
KEYMAP="de-latin1".

Once you restart the machine, the layout will be applied.

Samba compilation problem

Since a serious bug has been found in samba recently, i had to compile samba server
on my linkstation.

I downloaded the latest version, the first issue was which source folder i had to use, either source3 or source4, it turned out to be source3 (source4 seems to be a new, experimental version).

Since i wanted to install to the local folders, i proceeded like for rtorrent with:
./configure --prefix=/usr/local
make && make install

The second problem i encountered after the build, after i ran smbd -V to check the version, the libraries
libtalloc.so.2

Using alternatives on linux

Multiple applications with the same name can be used with alternatives.

For example, if you want to install several versions of gcc, alternatives support
switching between multiple versions with one command.

  1. List which versions of gcc are installed
  2. ls /usr/bin/gcc*

  3. Add several alternatives for gcc
  4. sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.4 40
    sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.1 30

Enable hibernate on Windows 7

If you have no hibernate option next to the shutdown button on Windows7, here are the
steps you need to enable it:

Run a command prompt as Administrator:
Programs -> Accessories -> Command Prompt -> left click -> Run As Administrator

Type the following command:
powercfg /hibernate on

If required, apply the following configuration:
Control Panel -> Power Options -> Change when the computer sleeps -> Change advanced power settings -> Sleep -> Allow hybrid sleep -> Setting: OFF

Now the button for hibernate should be available.

Debian ulimit - change maximum number of open files for a user

The command ulimit -a shows all limits that are imposed on the current user.

Debian default is 1024 open files per user. This can be increased (only by the super user) by editing the following files:

Uncomment the line
session required pam_limits.so

in the file '/etc/pam.d/su'.

In /etc/security/limits.conf, add the following lines:

username soft nofile 2048
username hard nofile 2048

Change username and 2048 to appropriate values.

The changes will be accepted after a re-login (check ulimit).

Control keys do not work in rtorrent

If the commands like Ctrl+Q, Ctrl+S or similar do not work in rtorrent, it is possible that flow control is enabled in your terminal/screen-session and you have to disable it!

Press Ctrl+A f in your screen session to disable.
Check the wikipedia article about flow control:
http://en.wikipedia.org/wiki/Software_flow_control

Discussion can be found at:
http://libtorrent.rakshasa.no/ticket/1611

Rtorrent does not accept incorrect self signed server certificates

Rtorrent does not accept (self signed) server certificates, where the certificate hostname does not match the site hostname.
The following error will probably be shown:
[SSL peer certificate or SSH remote key was not OK]

rtorrent currently has no option to disable the host checking of certificates, so a small line of code has to be added to the curl_get.cc file (which can be found in /rtorrent/src/core folder)...

After the line
curl_easy_setopt(m_handle, CURLOPT_MAXREDIRS, (long)5);

add the following code
curl_easy_setopt(m_handle, CURLOPT_SSL_VERIFYHOST, (long)0);

Boost XML Serialization hints

Whenever you use boost xml_oarchive, be careful that the closing archive xml tag is written whenever the archive gets destructed!

Therefore, the following won't work:


    std::string dumpXML()
    {
        std::stringstream stringstr_1;
        boost::archive::xml_oarchive xml_output_arch(stringstr);

        AnyClass& custom_data = m_custom;
        xml_output_arch << BOOST_SERIALIZATION_NVP(custom_data);

        return stringstr_1.str();
    }

Davical, Google Calender and Mozilla Lightning Troubles

During testing of the Davical Calender Server i sometimes got a modification
failed error when trying to change Events that have been imported to Davical
via .ics files which originated from Google calender.

I analysed the access logs of the webserver which resulted from the Mozilla Lightning requests and found out that the PUT request
PUT /davical/caldav.php/someting/home/967096cd-c1a6-40e2-930c-04f328cfcc45/test@gmail.com.ics
contained a slash, that was originating from the UID in those specific events.

Registered users can add comments to the articles. The registration process requires verification using an arbitrary email adress. Comments are moderated and spam of any form will not be published (spammers do not try - you have no chance).

Registrierte Benutzer können Kommentare zu den Artikeln schreiben. Die für die Registrierung erforderliche Authentifizierung erfolgt über eine beliebige Email Adresse. Kommentare werden erst nach erfolgter Durchsicht veröffentlicht um Spam zu verhindern.