Archive for the ‘Administration’ Category

uptimed and uprecords

четвъртък, септември 15th, 2011

Nice! As I am maniac of  uptime here is nice utility found at http://www.linuxjournal.com/content/tracking-server-uptimes

uptimed. It is similar to the utility that most of us have heard of, uptime, except that it runs as a daemon and logs the system’s uptime instead of just reading info that is lost on a reboot. Uptimed provides a secondary command called uprecords

Autoicrement the serial in bind zone files

четвъртък, септември 2nd, 2010

Argh. 30+ zone files and I have to increment all numbers by hand…no way.

Usage:  ./inc.rb in the current directory with all db files.

#!/usr/bin/ruby

Dir.glob("*.db") do |file_name|
 new_zone = [] (още...)

How to access a server via sftp with ssh tunnel

вторник, юни 29th, 2010

Here is what we want to do

We have the following case:

Developer workstation windows with putty

Spider.bg – a host which has access to the www.psspy.se server

www.psspy.se – firewalled host – we want to put files here via sftp

What we want to do is to use spider.bg host as a proxy and connect to the psspy.se machine.

Tools that are used -

Here are the screenshots with the steps ….

(още…)

Hardening linux

петък, ноември 27th, 2009

Check those links if you want to be ontop of the securuty

  • CIS Benchmarks – contains requirements from the Center for Internet Security (CIS) benchmarks.
  • DCID – contains requirements from the Director of Central Intelligence Directives (DCID).
  • DISA UNIX STIG – contains modules that address DISA UNIX Security Technical Implementation Guides (STIGs) security recommendations.
  • FERC CIP – contains modules that address the Critical Infrastructure Protection (CIP) standards for electricity distributors.
  • JAFAN – the Joint Air Force-Army-Navy (JAFAN) manual established the security policy and procedures for storing, processing, and communicating classified Department of Defence (DoD) Special Access Program (SAP) information in information systems.
  • NISPOM – contains modules that address the National Industrial Security Program Operating Manual (NISPOM).
  • PCI DSS – Payment Card Industry Security Standards Council includes members from Visa, MasterCard, American Express, Discover, and JCB International Credit Card Company. This council administers the Data Security Standard (DSS).
  • Web Services Protection – contains modules that address standard security functionality to provide protection.

IBM tutorial

Emulate3buttons

сряда, ноември 18th, 2009

Faithful to the rule that I must blog everything that took me more than 15min searching in google I am here again.

This time the post is related to my notebook which mousepad doesnt support double tap (poor lenovo :) )

Emulate3buttons – this is the magic key. Wonder how to use it? Just click left+right at the same time.

Also be aware: in the new distros this setting is not changed from xorg.conf  check this article

http://www.seebs.net/log/articles/459/disabling-emulate3buttons-on-ubuntuleft+left+right clicks right clicks

The rest is a copy/paste from the post above

The problem is that you can’t just override this in xorg.conf anymore. You need to use xinput. xinput’s powerful, clever, flexible… and totally over the heads of a lot of users. Here’s a script to run from .xinitrc or the equivalent which disables Emulate3Buttons on any input devices which have it. (It’s now called “Middle Button Emulation”, mind.)

#!/bin/sh
xinput list | sed -ne 's/^[^ ][^V].*id=\([0-9]*\).*/\1/p' | while read id
do
        case `xinput list-props $id` in
        *"Middle Button Emulation"*)
                xinput set-int-prop $id "Middle Button Emulation" 8 0
                ;;
        esac
done

How this works: We first obtain a list of ID numbers, disregarding those where the second character on the line was V, because xinput list-props doesn’t work on the "Virtual[...] lines for the generic keyboard and mouse. For each such device, we check to see whether it has the feature; if so, we disable it. (The number 8 indicates that we’re setting an 8-bit value; it doesn’t really matter. The disabled state is 0.)

Mod Rewrite, mod_rewrite

петък, октомври 23rd, 2009

Found great summary of mod rewrite here

http://stackoverflow.com/questions/286004/hidden-features-of-modrewrite

 

I aways forget the params for mod_rewrite so here is the summary

  • [R] force a redirect (default 301)
  • [R=302] force a 302 redirect
  • [L] stop rewriting process (see note below in common pitfalls)
  • [NC] case insensitive matches

Ubuntu (9.0.4) on Dell Optiflex 320

сряда, юли 1st, 2009
To install ubuntu on Dell system you need to change the default boot loader to grub2 or something else
#change the root password to something that you know
sudo passwd
#become root
su

mkdir /media/ubuntu
mount /dev/sda1 /media/ubuntu

# check that you have mounted the right partition.
ls /media/ubuntu

mount -t proc none /media/ubuntu/proc
mount -o bind /dev/ /media/ubuntu/dev
cp /etc/resolv.conf /mediaubuntu/etc

chroot /media/ubuntu /bin/bash
/etc/init.d/networking restart
aptitude update
aptitude install grub2

upgrade-....<tab>

Tools for calibrating LCD monitors

четвъртък, май 14th, 2009

http://www.lagom.nl/lcd-test/black.php

Synergy – one keyboard for two PC-s

сряда, април 29th, 2009

Synergy lets you easily share a single mouse and keyboard between multiple computers with different operating systems, each with its own display, without special hardware. It’s intended for users with multiple computers on their desk since each system uses its own monitor(s).”

root@guda-desktop:/etc# cat synergy.conf

section: screens
desktop:
guda-laptop:
end

section: aliases
guda-laptop:
192.168.1.101
end

section: links
desktop:
right = desktop
guda-laptop:
left = guda-laptop
end

# synergys –config /etc/synergy.conf
# synergyc IP

On windows I am defining:

“Share this computer…” -> configure

Screens: desktop, guda-laptop

links: guda-laptop is left on desktop and the oposite

Updates: Check the http://code.google.com/p/synergy-plus/ clone

MSI notebook are total scrab

петък, април 10th, 2009

For MSI Notebooks

Don’t buy MSI. Look for HP, IBM or some real brand.

  1. The lid of the laptop is breaking – I have  MSI 3 laptops and all of them are broken. One of my friends has the luck to return his laptop and now he is with a nice HP machine – lucky man. It was 6 months for repairing.
  2. The wireless is loosing connection all the time. My wife is with IBM and she is chating chating chating, and I am reconnecting, reconnecting reconecting….
    Update:The MSI lan adaptor has gone away. The only way to use Internet is via the integrated broken wireless. I hate MSI.
  3. The heat is like an oven – my son don’t want to play NFS because of the heat. Me too.
  4. The LCD screen gets on some dark and light spots very soon
  5. The material for the laptop is not good – not nice to touch. The silver color is quickly gone and ugly black places are shown
  6. If you enable the 32 bit access mode Linux kernel wont work (tested till ubunto 8.10
    1. After such try you must remove the battery start the power without any AC and return the power – is this magic ?
  7. The fan of the notebook is making awfull noise. The fan costs 40EUR and there no garantee that the new fan will be the same like the old one.
    1. The fan never stops
  8. Their support is not answering on ANY of the problems pointed here. maybe all from MSI are dead. Who knows.
  9. The microphone is very quiet and the this makes it impossible to talk with skype, btw why they have put the camara then?
  10. The mouse which they give as a bonus doesnt work – both 2 are broken, missing some clicks from time to time.
  11. Try searching for “MSI fan” in google. I got this result. Internet is full of “happy” MSI owners.

CHEAP RUBBISH !

I want my money back! for all 2 laptops that I have bought.

I will publish some pictures soon.

blah