Posts Tagged ‘reading’
Wednesday, April 4th, 2012

Some long time ago, I've created one user called newuser, on my home FreeBSD router and added him to be a member of wheel group.I've completely forgot about the users existing, just until yesterday when I saw the user still hanging around in my wheel group.For those unfamiliar with the wheel group on FreeBSD, wheel is the same like root group on Linux and some other *nices.
Before proceed with the reason fot this post to show the proper way of adding and removing user to a group on BSD, I will first explain a bit few things concerning BSD password files, where they are and why are they so many
On the first glimpse, people unfamiliar with BSD will be shocked / (confused) to find out there are 5 files, which has something to do to password authentication.
1. Some short explanation on /etc/passwd /etc/master.passwd, /etc/pwd.db, /etc/spwd.db, /etc/group and login.conf.db BSD auth and login filesFreeBSD and rest of the BSD family has 5 files which deal with username and password authentication, group ids, default shell configs etc.:
The 5 ones are:
- /etc/passwd
- /etc/master.passwd
- /etc/group
- /etc/pwd.db
- /etc/spwd.db
/etc/passwd is readable by all the users on the system whether /etc/master.passwd is only readable by root and toor administrative users. In that numbers members to wheel group have access for reading to all of the five.
Just like on Linux /etc/passwd contains all kind of system existing users … everything except the stored user passwords strings.
/etc/master.passwd is actually the BSD equivalent of Linux's /etc/shadow file. It stores md5 encrypted user passwords (by default) in a form of encrypted hashes. For tightened security one can, however choose to use a blowfish password hash encryption instead.
Since my newuser was a member to group, the user had read access to my /etc/master.passwd and hence this was a potential potential security hole on my system.
To close the whole I decided to remove newuser's membership to wheel group.
Before I say how I actually did it. I will sawy few more words on BSD systems authentication files structure.
The file /etc/master.passwd is actually the BSD equivalent of Linux's /etc/shadow.
Besides /etc/password and /etc/master.passwd, on BSD there are also two other separate binary database files storing authentication user credentials:
freebsd# ls -l /etc/pwd.db /etc/spwd.db
-rw-r--r-- 1 root wheel 90112 Mar 13 23:56 /etc/pwd.db
-rw------- 1 root wheel 90112 Mar 13 23:56 /etc/spwd.db
In case if you're wondering what are this two *pwd.db files for:
/etc/pwd.db contains in database format /etc/passwd content
/etc/spwd.db contains in database format /etc/master.password
, spwd.db stands for (shadow) pwd.db.
Near the end of the man page for pwd_mkdb, pwd.db is described as "insecure password database file and spwd.db as secure password database file.
The exact database type can be displayed with file command which is alawys helpful in (determining a file types).
I use file almost daily to check the (MIME) type of most of the "weird" file type extensions I have on my system. If not yet familiar with file cmd, be sure to try it on few various file extensions and see how it works.
freebsd# file /etc/pwd.db
/etc/pwd.db: Berkeley DB 1.85 (Hash, version 2, native byte-order)
freebsd# file /etc/spwd.db
/etc/spwd.db: Berkeley DB 1.85 (Hash, version 2, native byte-order)
You see, files are stored in format of Berkley DB Hash version 2.
The two files got updated every time with command pwd_mkdb whether a change in /etc/master.passwd occurs through use of lets say pw or vipw.
Btw, one common way to initiate changes to /etc/master.passwd (lets say modify a user shell) is possible through vipw command.
vipw is a wrapper command that launch instance of vi editor over /etc/master.passwd, once changes are saved in the file, pwd_mkdb is run to regenerate the /etc/pwd.db and /etc/spwd.db. With this in mind vipw on BSD is the equivalent of manually editting /etc/shadow with vi /etc/shadow on G / Linux.
Whether talking about user credentials and /etc/pwd.db and /etc/spwd.db, its worthy to mention there is one more db file – /etc/login.conf.db. /etc/login.conf.db is red everytime a user logs in the system. It is is generated from the plain text /etc/login.conf. Just in case if wondering why this .db files are used on FreeBSD at all, the reason is efficiency.
Reading binary database (structured data) as we all know is way faster than plain text file look ups
The performance advantage of the BSD's use of .db stored credentials is not so-"visible" in normal BSD systems with less than lets say 100 users.
Anyways on systems with few thousands of users that login and logout frequently the speed difference will surely be clear.
Manual generation of /etc/pwd.db and /etc/spwd.db or /etc/login.conf.db is possible via pwd_mkdb and cap_mkdb commands.
After explaining shortly the basic auth files, I'll proceed with my specific case and will explain how I removed my newuser from membership in wheel group.
2. "BSD way" to remove or add existing user to member a group
The record for my user newuser in /etc/group, looked like so:
freebsd# grep -i newuser /etc/groupwheel:*:0:root,hipo,newuser
I was curious if /etc/group was possible to manually edit like on Linux with vi or mcedit.I thought this might be a problem since I thought the /etc/group info might be stored somewhere along in /etc/pwd.db or /etc/spwd.db. My hypothesis, however was wrong.
Straight use of vim /etc/group and deletion of the newuser record was enough to remove the user from wheel.
Anyways this is not a standard way and especially if it has to be scripted it is unnecessery hassel, hence below is the 'BSD way' via pw:
freebsd# pw groupmod wheel -d newuser
There is no output returned, therefore the command executed succesfully.
pw can be used for plenty of user management operations. Lets say I want to add back the newuser to be a member of wheel some time in the future, I could use:
freebsd# pw groupmod wheel -m newuser
To later check if newuser is succesfully removed from /etc/group:
freebsd# grep -i wheel /etc/group
wheel:*:0:root,hipo
Generally it is better, to stick to one way to do everything related to user and group management with pw and use it to show group permissions for wheel instead:
freebsd# pw group show wheel
wheel:*:0:root,hipo
If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!
Tags: administrative users, authentication, Auto, blowfish, bsd family, default shell, Draft, everything, existing users, family, file, first glimpse, form, fot, group ids, hash, hashes, Linux, login, long time, Mar, newuser, nices, password, password files, passwords, reading, reason, root, root group, router, security hole, shadow, Shell, something, text, time, toor, type, username, wheel, wheel group
Posted in Computer Security, FreeBSD, System Administration | No Comments »
Saturday, March 31st, 2012
I'm currently learning some basic graphic design – reading GIMP's documentation etc. While reading http://docs.gimp.org, I saw a reference to Gthumb and GQView picture viewing apps, so I thought of installing them on my Debian LinuxGQView has a lot of santimental value to me as it reminds me of the the old times when I used gqview as a default picture viewing program on a old machine running Debian Woody Linux with Window Maker as desktop environment.
I wanted to see how GQView looks nowdays so installed it:
noah:~# apt-get --yes install gqview
And onwards launch it:
hipo@noah:~/Desktop$ gqview
This is a compatibility alias for Geeqie!
Please use /usr/bin/geeqie instead!
Creating Geeqie dir:/home/hipo/.config/geeqie
Creating Geeqie dir:/home/hipo/.local/share/geeqie/collections
Creating Geeqie dir:/home/hipo/.cache/geeqie/thumbnails
Creating Geeqie dir:/home/hipo/.local/share/geeqie/metadata

What poped up instead of gqview is Geeqie – a picture viewer nowdays available on a default Slackware Linux install.
Fedora, CentOS users will have to build geekie from its source, as of time of writting there is no available rpm package.
It was new to me Gqview is no longer developed, its dev is forked (because its head developer is not reachable any more). Hence QGView continues to live on nowdays under the hood of Geekie
As you can see from the prior screenshot Geeqie has very similar interface to GQView. Going through the interface, I've found it has much more features than GQView. You see one of the many new nice features is the support for drawing Image Histograms.
There are few type of Histograms to display in Geekiq, available by navigating to:
View -> Image Overlay
Even if you're not familiar with Image histograms, probably you have seen them appear on a digital camera while browsing in menus. Its likely you didn't know what you saw a digital camera display is a histogram.
Anyways being not familiar with histograms is perfectly fine as for most of us (regular) users image historograms doesn't make much sense.
BTW Histograms are very useful for pro Photographers. Photographers can use them as an aid to show the distribution of picture "tones" captured, and whether image detail has been lost to blown-out highlights or blacked-out shadows.
Interesting fact concerning "reading" and understanding Histograms is on a Histogram for a very dark image the majority of data points are on the left side and center of the graph, whether histogram for a very bright image with few dark areas and/or shadows will have most of its data points located on the right side and center of the graph.
With this said in mind, you can see, the above Geeqie picture visibile histogram obviously has most of its data concentrated on the right and the center so this means the histogram belongs to a bright pic. Well, Actually you can see this without a histogram too
Though Image Histograms might seem pretty useles they're very much needed in Professional Graphic Manipulation. For instance for correction of image color gamma or manually adjusting the brightness for each picture pixel brightness.
So Enough with histograms, I will switch now to a short review of Gthumb
Since I haven't used/seen Gthumb "for ages", I was also curious how the program looks nowdays. I did not needed to install gthumb, as I had it installed already on my notebook. I assume gthumb package was installed as some package dependency or I did it install some very long time ago and I forgot.
For people who didn't have it install do:
noah:~# apt-get --yes install gthumb
...
This installs a Gthumb version 2.12.2. The current latest stable Gthumb release is way ahead from the existing deb stable package, the latest available version on sourceforge is 2.7.4
Ubuntu gthumb latest packages would probably be newer than my debian installed one, so Ubuntu users can have the joy to use a newer version of gthumb…
gthumb is also installable for Fedora and CentOS users by default from default assigned package repos:
To install on RPM based Linux distro:
[root@centos:~ ]# yum -y install gthumb
...
Once installed, I ran it via a gnome run application shortcut ALT+F2 and typed:
gthumb
If you're more of a gui user than me you can run it also through GNOME menus:
Applications -> Graphics -> Gthumb Image Viewer
You see gthumb appears, quite similar in "look&feel" to Geeqie.
I went through the program options just for the sake to compare with Geeqie. Based on the fact Geeqie seems to have more functionality it is probably superior and better choice for people looking for professional image vieweing / editting.However there are some other aspects I've noticed, where it lacks behind Gthumb.
Gthumb has few great functionality which unfortunately as of time of writting are missing or hardly achievable in Geeqie
1. Bookmarking pictures.
This allows for your favourite pictures to be bookmarked in the same way as bookmarks work in a browser, really neat feature.
2. Share functionality
Share button is located on the rightest upper corner and makes sharing with major web storage places easy.
Through the Share button, you can export (share) your pictures directly in Picasa, Facebook,Flickr and Photobucket.

Through this share button it is also possible to "share your photos on a CD or DVD", – burn them on a CD/DVD directly from gthumb. This is doable via:

One other Gthumb advantagle is its extensibility. It has a powerful plugin system. Many of the features it has are already there thanks to its enabled extensions.

3. Photo Tagging
Nowdays tagging, photos has become so popular with the boom of facebook tagging. Gthumb has a relatively easy to use image tagging integrated.
tagging a picture is done by simply going through the picture and selecting it with the (rightest located mouse button).

There is a list of few already predefined tags, which can be used to tag images.Assigning more tags is done via menu:
Tags -> Other

4. Organizing pictures
Through the Organize button located right below the Share button, one can easily organize his picture collections, based on few criterias.

The organize easy feature is not so important for not people, who are not in depth in photographing but for professional photographers this is an absolute necessity. For people who are image freaks and store tens of thousands of pictures organizing pictures for easy later retrieval is really nice.
To sum it, up Geeqie and Gthumb are richer in functionality if compared to GNOME's default pic viewer (eye of the gnome) – eog.
Geeqie, as the name suggests is more for geek oriented and has a lot of great options which can serve well for advanced computer users. For an ordinary desktop user however it will probably be not easy to "digest". Gthumb on the other hand is ideal for anyone who prefers gui convenience. Gthumb is a good option for anyone looking for some similar to Picasa free software program that is feature rich and easy to use.For people who has to review a dozens of pictures daily, associating one of the two as a default picture viewer will probably be useful.
Tags: alias, alternative, Auto, center, CentOS, config, debian woody, default, design reading, Desktop, desktop environment, digital camera, Draft, fedora, geekie, GIMP, GNU, gnu linux, gqview, graphic design, head developer, hipo, histogram, histograms, image overlay, LinuxGQView, machine, meta package, metadata, noah, package, Photographers, picture, poped, quot, reading, rpm, screenshot, time, Ubuntu, value, window, woody linux, writting
Posted in Gnome, Linux and FreeBSD Desktop, News | No Comments »
Monday, March 26th, 2012
One more year, we are into the great Lent and we're given the Grace to hear the Good tidings (Good News) handed down by Archangel Gabriel to our Virgin Lady (The Mother of God). We hear the GOOD NEWS that our Lord Jesus Christ is conceived immaculately and is to be born from the Holy Theotokos most pure body:
Here is a little part of the Gospel New Testamention reading from Luke for the day:
28 The angel went to her and said, Greetings, you who are highly favored! The Lord is with you.
29 Mary was greatly troubled at his words and wondered what kind of greeting this might be.
30 But the angel said to her, Do not be afraid, Mary; you have found favor with God.
31 You will conceive and give birth to a son, and you are to call him Jesus.
32 He will be great and will be called the Son of the Most High. The Lord God will give him the throne of his father David,
33 and he will reign over Jacob’s descendants forever; his kingdom will never end.
34 How will this be, Mary asked the angel, since I am a virgin?
35 The angel answered, The Holy Spirit will come on you, and the power of the Most High will overshadow you. So the holy one to be born will be called the Son of God.
36 Even Elizabeth your relative is going to have a child in her old age, and she who was said to be unable to conceive is in her sixth month.
37 For no word from God will ever fail.
38 I am the Lord’s servant, Mary answered. May your word to me be fulfilled. Then the angel left her.
You can also read the feast troparion and some more information on this great Christian feast here
This year, today's feast also coincides with the comemmoration of one great Church Father – Saint John (monk) Lestvichnik .

St. John Lestvichnik is honoured as one of our great ascetic saints across all Orthodox Christian dome.
Actually Lestvichnik word (comes from ancient Bulgarian / ancient Slavonic) and is a title. st. John received the Lestvichnik title as his spiritual life was so high and up to God, like climbing from earth to Gods heavens.
The meaning of Lestvichnik is "of the Ladder". After his title name Lestvichnik was named also his greatest life work Lestvica, which translated to english means Ladder
To read more about st. John Lestvichnik living a good Egnlish translation is here
Just in case to preserve, this great saints short living (english translation), I've made a mirror of st. John Lestvichnik (short) living here

Lestvica is a very popular ancient monks living rule (guidance text);
"a true instruction for those following after invariably, and as such would be a ladder of affirmation, which would lead those wishing it to the Heavenly gates…"
Lestvica was written by st. John Lestvichnik, after a 40 years ascetic seclusion in (speachless solitude
The monks spiritual instructions rules and advices work "The Ladder" bears the title Ladder described by st. John like so:
"I have constructed a ladder of ascent...
from the earthly to the holy...
in the form of the thirty years of age for the Lord's maturity, symbolically I have constructed a ladder of 30 steps, by which, having attained the Lord's age, we find ourselves with the righteous and secure from falling down".
The purpose of this work, is to teach – that the reaching of salvation requires difficult self-denial and demanding ascetic deeds. "The Ladder" presupposes, first;
1. a cleansing from the impurity of sin – the eradication of vices and passions in the old man;
second;
2. the restoration in man of the image of God. – Although the book was written for monks, any christian living in the world can receive from it the hope of guidance for ascent to God as well as get a support for better spiritual life.
The Monks Theodore the Studite(Comm. 11 November and 26 January), Sergei of Radonezh (Comm. 25 September and 5 July), Joseph of Volokolamsk (Comm. 9 September and 18 October), and others – in their instructions relied on "The Ladder" as an important book for salvific guidance.
Tags: age, anc, angel, archangel gabriel, ascent, birth, body, bulgarian orthodox church, christian feast, church of annunciation, comemmoration, descendants, feast, feast of annunciation, good tidings, Greetings, Holy, holy spirit, holy theotokos, immaculate, information, jacob, john monk, Lent, Lestvica, lord god, lord jesus christ, monk, mother of god, news, power, quot, reading, rsquo, saint john, servant, Slavonic, son, son of god, Spirit, spiritual, st john, virgin mary, word comes from, work, year
Posted in Christianity | No Comments »
Monday, March 5th, 2012

One of the companies, where I'm employed runs nginx as a CDN (Content Delivery Network) server.
Actually nginx, today has become like a standard for delivering tremendous amounts of static content to clients.
The nginx, server load has recently increased with the number of requests, we have much more site visitors now.
Just recently I've noticed the log files are growing to enormous sizes and in reality this log files are not used at all.
As I've used disabling of web server logging as a way to improve Apache server performance in past time, I thought of implying the same little "trick" to improve the hardware utilization on the nginx server as well.
To disable logging, I proceeded and edit the /usr/local/nginx/conf/nginx.conf file, commenting inside every occurance of:
access_log /usr/local/nginx/logs/access.log main;
to
#access_log /usr/local/nginx/logs/access.log main;
Next, to load the new nginx.conf settings I did a restart:
nginx:~# killall -9 nginx; sleep 1; /etc/init.d/nginx start
I expected, this should be enough to disable completely access.log, browser request logins. Unfortunately /usr/local/nginx/logs/access.log was still displaying growing with:
nginx:~# tail -f /usr/local/nginx/logs/access.log
After a bit thorough reading of nginx.conf config rules, I've noticed there is a config directive:
access_log off;
Therefore to succesfully disable logging I had to edit config occurance of:
access_log /usr/local/nginx/logs/access.log main
to
After a bit thorough reading of nginx.conf config rules, I've noticed there is a config directive:
access_log off;
Therefore to succesfully disable logging I had to edit config occurance of:
access_log /usr/local/nginx/logs/access.log main
to
access_log /usr/local/nginx/logs/access.log main
access_log off;
Finally to load the new settings, which thanksfully this time worked, I did nginx restart:
nginx:~# killall -9 nginx; sleep 1; /etc/init.d/nginx start
And hooray! Thanks God, now nginx logging is disabled!
As a result, as expected the load avarage on the server reduced a bit
Tags: access log, apache, apache server, Auto, avarage, browser, CDN, conf, config, config rules, content delivery network, Draft, enormous sizes, file, god, hardware, hooray, init, killall, log browser, logs, network server, nginx, occurance, performance, quot, reading, request, Result, server load, server logging, server performance, sleep, static content, time, today, usr, utilization, way, web server
Posted in Linux, System Administration, Various | 3 Comments »
Tuesday, February 28th, 2012
These days, I'm playing with The GIMP. I've been a GNU / Linux, FreeBSD user for already 11 years now but as I'm doing mostly system administration and I don't have much expertise in Panting or Computer Graphical Design, I've never put much time to learn more in the interesting area of graphical design. Hence until just recently, Just until now, I've never spend time with the GIMP (GNU Image Manipulation Program) and never realized how powerful this great program is. The more I learn about GIMP functionalities and how it works the more it makes me determined to learn some basic web design
The functionality which The GIMP offers in a basic install is quite rich, however by default on most Debian and Ubuntu installations many of the great plugins which easifies the way to edit pictures is missing.
Example for a very valuable functionality which is not present with standard gimp package installed on Debian and Ubuntu are:
…
Here I will mention here few words on:
- GIMP FX-Foundry Collection
GIMP FX-Foundry is a thoroughful collection of GIMP scripts (addon plugins), that automates many of the operations which requires a professional web design skills and gives an easy intuitive interface through which very robust "high level" graphic design can be accomplished. This additional GIMP extensions helps to create very unique design in just few simple steps, as well as gives multiple tools for the sake of easy pro design creation. For anyone looking for quick edit of images with GIMP FX-Foundry is a must have GIMP plugins extension. The script pack is located on http://gimpfx-foundry.sourceforge.net/
To install FX-Foundry scripts collection on Debian / Ubuntu / Linux Mint and other based Linux distributions:
debian:~# apt-get install --yes gimp-plugin-registry
...
gimp-plugin-registry package name is based on GIMP Plugin registry's website
. Gimp plugin registry contains many helpful design goodies
Once installed you will notice GIMP with a new menu on the main menus bar reading FX-Foundry :

GIMP FX Foundry extensionos package contains 124 scripts for additional graphics manipulation. The collection contains less scripts than the ones provided by gimp-plugin-registry. package has 156 scripts inside.
One of the most helpful GIMP addition from the package is the inclusion of Save for Web button under:
File -> Save for Web

Another very helpful .deb package which adds up to GIMP's design possibilities is gimp-data-extras .
gimp-data-extras adds 111 new GIMP Fill in Patterns , which can be used through the Blend Tool to Fill selected areas with color gradients.
To install gimp-data-extras on Debian:
debian:~# apt-get install --yes gimp-data-extras
...
Generally once installed this package will add to GIMP – an extra set of brushes, palettes, and gradients for The GIMP as you can read in the package description.
I was also quite stunned to find out the good old GIMP is capable of basic Video editting!!
On Debian and Ubuntu there is a package called gimp-gap which once installed adds an extra Video menu.

I've not tested the GIMP video editting capabilities yet, however I intend to learn something about it immediately when I have some free time left. You see the enormous list of Video editting possibilities GIMP obtaines with gimp-gap which btw stands for (The GIMP Animation Package).
To install gimp-gap:
debian:~# apt-get install --yes gimp-gap
I've noticed also the following list of others useful GIMP additions (mainly helpful in Web, Brochure and Logo Graphic Design) to install them:
debian:~# apt-get --yes install gimp-gmic gimp-ufraw gtkam-gimp gimp-gluas \gimp-dimage-color gimp-dds gimp-dcraw gimp-cbmplugs flegita-gimp gimp-texturize \gimp-resynthesizer gimp-lensfun gimp-gutenprint gtkam-gimp mrwtoppm-gimp
Here is the package description of the packages above command will install:
- gimp-cbmplugs – plugins for The GIMP to import/export Commodore 64 files
- gimp-data-extras – An extra set of brushes, palettes, and gradients for The GIMP
- gimp-dcraw – GIMP plug-in for loading RAW digital photos
- gimp-dds – DDS (DirectDraw Surface) plugin for the gimp
- gimp-dimage-color – GIMP plugin to convert Minolta DiMAGE pictures to sRGB colour space
- gimp-gap – The GIMP Animation Package
- gimp-gluas – Lua environment plug-in for GIMP
- gimp-gmic – GIMP plugin for GREYC's Magic Image Converter
- gimp-gutenprint – print plugin for the GIMP
- gimp-lensfun – Gimp plugin to correct lens distortion using the lensfun library
- gimp-normalmap – Normal map plugin for GIMP
- gimp-plugin-registry – repository of optional extensions for GIMP
- gimp-resynthesizer – Gimp plugin for texture synthesis
- gimp-texturize – generates large textures from a small sample
- gimp-ufraw – gimp importer for raw camera images
- flegita-gimp – Gnome Gimp scan plugin.
- gtkam-gimp – gtkam gimp plugin to open digital camera pictures
- mrwtoppm-gimp – GIMP-plugin to support Minolta DiMAGE 5/7/7i RAW images
Now after installing all this plugins and seeing all GIMP's power, I'm starting to wonder why are still people ranting Adobe PhotoShop is feature rich.
That's all, enjoy the great new GIMP features. Happy picture editting
Tags: addon, Auto, basic web design, collection etc, Computer, copyright text, Design, design creation, Draft, existence, few words, foundry, freebsd user, functionalities, FX-Foundry, gnu image manipulation, gnu image manipulation program, graphical design, image manipulation program, intuitive interface, level, Linux, linux distributions, linux freebsd, manipulation, menu, Pack, package, photo, photo effects, plugin, plugin registry, professional web design, program, reading, SaveForWeb, script, script pack, simple steps, system, time, Ubuntu, ubuntu linux, unique design, web design skills
Posted in Linux, Linux and FreeBSD Desktop, System Administration, Various, Web and CMS | No Comments »
Friday, February 24th, 2012
There two main reasons which cause incorrect clock settings on Slackware Linux.
One common reason for incorrectly set time is improper clock and timezone settings during Slackware install.
On install, one of the ncruses install menus asks an ambigious dialog question reading
HARDWARE CLOCK SET TO UTC?
Is the hardware clock set to Coordinated Universal Time (UTC/GMT)?
Some newbie Slackware users make the mistake to choose YES here, resulting in incorrectly set clock.
Second possibility for improper time is incorrect time on BIOS level. This is not so common among laptop and modern desktop PCs. However in the past impoper system BIOS hardware clock was usual.
In any case it is a good practice to check the system PC BIOS clock settings.
To check BIOS battery hardware clock from command line use:
bash-4.1# hwclock --show
Fri 24 Feb 2012 01:24:18 AM EET -0.469279 seconds
The system clock on Slackware is set via a script called timeconfig. To fix slack's incorrect host time run:
bash-4.1# timeconfig


Running timeconfig once should configure a proper timezone to be set on next system reboot, however the system time will probably still be not ok.
To manually set time to right time, use date command. To set manually the system wide time to 12:00:00 with date:
bash-4.1# date -s "12:00:00"
Anyways for time accuracy the ntpdate should be used to feth time from NTP internet time server:
bash-4.1# ntpdate time.nist.gov
...
Finally to make the new set right time permanent also for the BIOS battery clock issue:
bash-4.1# hwclock --systohc
By the way its curious fact Slackware Linux is the oldest still existent GNU / Linux based distribution. Its up and running since the very day GNU and Linux came to merge at one Free OS
Tags: ambigious, Auto, bios clock, clock settings, configure, Coordinated, coordinated universal time, curious fact, Desktop, distribution, Draft, EET, feth, free os, Fri, gnu linux, hardware, hardware clock, host, host time, hwclock, improper time, incorrect time, internet time server, laptop, level, Linux, ntpdate, possibility, quot, reading, reason, script, show, slack, slackware linux, slackware users, system bios, system clock, systohc, time, time accuracy, time run, timezone, timezone settings, Universal, UTC, YES
Posted in Linux, System Administration | 3 Comments »
Saturday, February 18th, 2012
I've hit an interesting article in Wikipedia called Comparison of BSD operating systems
The article explains basic difference between different BSD (Berkley Software Distributions) and what is the primary accent of each of the BSD (free software OS) distributions. It also reveals basic details about the history and how each of the BSD's came to existence. I recommend to anyone interested in free software as it is just a great reading for everybody interested in FOSS.
The most interesting part of the wiki thread is a bar chart, provided by BSD Certification Group research conducted in September 2005.
The above diagram is showing the proportion of users of each BSD variant from the BSD usage survey prior conducted
The research is already 6 years old, and unfortunately as of time of writting seems to be the only publicly available. Though being outdated, I believe generally the bar charts distributions along different BSD variants would be mostly true. The only big difference will be probably in PC-BSD which is not even on the diagram should have outbeaten DragonflyBSD's use. Since there is no public data available for 2012 and the years 2005 – 2012 for the use percantage of each of the BSD distributions, I've thought about a pseudo way to get some general statistics on each of the BSD distributions popularity. The methodology to gather the required statistics comes to simply, type in Google each of the BSD variant "code names" (e.g. freebsd, netbsd, openbsd etc.) and look at the number of results returned. It seems logical the more results distribution keyword searched returns, the bigger the probability of more users to be involved in developing or using the respective BSD variant.
Below you see the results, I've gathered in my quick "google research":

As you can see in the above data FreeBSD is still probably leading the BSD use, the public interest to OpenBSD – BSD focused on security has significantly grow since the last 6 years. Next it is seen the PC-BSD users base has probably tremendously increased and according to the Google results returned it is probably on a 3rd place by users interest (use?) followed by NetBSD with only 1.47% of all the BSD users. Lastly with only 0.99%, orders Dragonfly BSD which no longer is so popular as a Desktop BSD based OS as it used to be back in 2005.
Again the presented diagram results are based on only on the factor of Google BSD variant popularity and hence shouldn't be consired too trustworthy, still I'm sure it gives a general idea on how used is each of the BSD variants as of Jan 2012.
Tags: 6 years, Auto, bar charts, Berkley, bsd distributions, bsd variant, bsd variants, Certification, certification group, code names, comparison, distribution type, distributions, Draft, DragonflyBSD, everybody, existence, foss, general statistics, google, google research, Group, group research, interest, NetBSD, OpenBSD, pc bsd, percantage, place, primary accent, probability, proportion, pseudo, public interest, reading, software, software distributions, survey, thread, time, type, usage survey, Wikipedia
Posted in FreeBSD, System Administration, Various | No Comments »
Saturday, January 7th, 2012

On 6th of January in our Bulgarian Orthodox Church just like in the most Christian realm, we celebrate the great feast of Theophany / Epiphany (Baptizm of our Saviour Jesus Christ in Jordan).
What exactly we celebrate is the Baptizm of our Saviour Jesus Christ in Jordan by st. John the Baptist (John the Forerunner as we call him in the church). This day is very important for us as Christians and this is why the holy fathers in the church has ordered this feast to be among the 12 most important feasts in our Church, the so called (Lords feasts).
On Theophany's day it is a rule in orthodox Church that the Great Blessing of Water is performed. The Blessing of the water and the preceding holy water from the priests blessing is taken by Church layman and we bring a little of this water to our homes to bless through that our homes.
In our Church belief the Holy Water from the Theophany feast is considered the most powerful in spiritual sense holy water as this water is the same water with which our sinless Saviour and lamb (Son) of God Jesus Christ was baptized in Jordan.
The reason why we call the feast Theophany is because God in his essence of Holy Trinity appeared clearly to mankind for a first time in Human history. Our Holy Trinity (3 essence God in one indistructable and insaparatable God – one God as God said for himself in the beginning of writtings) has revealed himself in front of all the people gathered along John the Baptist in Jordan waiting to be baptized in his three essences:
1. God the Father spoke from heaven manifesting and testifying about Jesus Christ being his beloved and only son and saviour of mankdin
,br />2. God the Son (Jesus Christ), has physically appeared to receive the baptizm to fulfill all righteousness and (the old testemential prophecies) and to begin his 3 years mission on earth.
3. God Holy Spirit) has descended from heaven on Jesus Christ in a publicly observable form of a dove
Theophany's feast is called by some english speaking orthodox christians Epiphany, but this is a term less used in orthodox christendom and much more spread in Roman Catholic one.
The Gospel readings in the church tell of the Lord's baptism by John in the Jordan River. The epistle reading of the Divine Liturgy tells of the consequences of the Lord's appearing which is the divine epiphany.
After the end of the st. Basil the Great Holy Liturgy served, the Great Blessing of Water is performed by one or more priests (depending on the number of present priests). The meaning of the blessing of the waters meaning is to show that mankind and all of God's creation, were created to be blessed and filled with the sanctifying of God's presence.
A very local unique bulgarian tradition on this number is that if the great blessings of water is performed by a priest near a river or a sea shore the cross be thrown in the water in order to bless the waters. 
Then a number of brave man jump in and do a race swimming aiming to pull out the crucifixion of the water. It is believed that the one who could pull out the cross will get God's great blessings through the upcoming church year.
Let us pray trust and hope on God to also appear to us who seek him, and show us his Holy Trinity wholeness mercies just like he did himself to the people waiting for Baptizm from John the Baptist by the holy prayes of the Theotokos and his holy saints and all heavinly hosts. Amen
Tags: Auto, baptizm, belief, br 2, bulgarian orthodox church, Catholic, divine, doveTheophany, Draft, epistle, essence, Father, feast, form, god jesus christ, god the father, great feast, Holy, holy spirit, holy trinity, holy water, indistructable, john the baptist, john the forerunner, layman, mankind, number, one god, reading, realm, reason, Roman, saviour jesus christ, son jesus christ, son of god, Spirit, spiritual, spiritual sense, st john the baptist, theophany, time, Trinity, writtings
Posted in Christianity | 1 Comment »
Saturday, December 3rd, 2011

I'm currently reading Free as in Freedom (2.0) R. Stallman and the Free Software Revolution
The book includes a reference to Eric S. Raymond 's famous The Cathedral and the Bazaar which does makes a point about the important of Open Source . I've read the The Cathedral and the Bazaar paper some very long time ago (in my young days so to say) and hence I couldn't resemble much of the document so I jumped in after the footnote in the FAIF book and decided to take a quick look on The Cathedral and the Bazaar once again to bring up some memories. I was stunned to find the paper is available in many formats but officially not included in PDF . Since i'm a GNU / Linux user I've never managed to get into the habit to read postscript documents which from modern day stand point are also already a bit of obsolete and therefore I found it as a wise idea to convert and mirror the POSTSCRIPT (PS) version of the document to PDF on pc-freak.net
Happily the ps2pdf command to convert the ps to pdf on my debian gnu / linux is really easy:
ps2pdf cathedral-and-the-bazaar-Eric_Raymond.ps Cathedral-and-the-bazaar-Eric_Raymond.pdf
ps2pdf is part of the ghostscript deb package, so if you can't find the program you will need to have it installed with apt-get first.
By the way the Postscript file is easily readable using my default gnome PDF reader evince , but anyways I converted and mirrored the paper for all those windows users who might like to take a look at the document in PDF.
I've also made a mirror of the original Cathedral and the Bazaaar postscript document here , for all those who want to check out The PDF version of the Cathedral and the Bazaaar is for download here
Even though the "open source" movement is an interesting idea and it had some major impact on the development of some free software the idiology of open source which was very much influenced by this document is very weak compared to the philosophy Richard Stallman indcuded as of the great need of the software to be free.
To be honest looking back in time for a long time being a Linux user I did not make any distinguishment between "Free Software" concept and "Open Source", even worser I considered to evangelize on Open Source not realizing that initially what attracted me to free software was the idiology of open source and not the real values on which ground free software is built.
This kind of miss understanding between perception of "open source" and "free software" I got and spread for years now I fully realize and I seem like when I red back then The Cathedral and the Bazaar document I didn't looked any critical at the document but it had a major, I would say "bad" impact on my idiology on software for a long time. So for all those who had not checked it it's worthy checking but only in case if one fully understands Richard Stallman's concept of Free Software, without this understanding one can easily slip into the wrong believe (just like me back in thme) that open source is the same as free software. Even though open source can be free software it is not presumably that an open source is free software and that it guarantees that the published source will be free. But I'll stop now as I slept away from my goal of the article to just log here how a convertion of postscript to pdf on gnu / linux is done.
Just to close up this article I warmly recommend on all people interested into hacking and the history of Free operating systems and Free software as FreeBSD and GNU / Linux the Free as in Freedom (2.0) book ! Its truly a remarkable and great inspirational reading for all people like me involved into free software realm of ICT.
Tags: bazaar, bit, Cathedral, Cathedral-and-the-bazaar, deb package, debian gnu, download, eric s raymond, evangelize, evince, file, Free, free as in freedom, free software revolution, freedom 2, ghostscript, GNU, gnu linux, impact, Linux, linux user, movement, need, Open, open source movement, package, philosophy, Postscript, postscript document, postscript documents, postscript files, postscript ps, ps version, ps2pdf, quot, reading, software, Source, stallman, time, windows users, wise idea
Posted in Everyday Life, FreeBSD, Linux, Various | No Comments »
Thursday, November 24th, 2011

As a System Administrator I need to check daily the log files produced on various GNU / Linux distributions or FreeBSD. This can sometimes take too much time if the old fashioned way using the normal system tools cat, less and tail etc. is used.
Reading logs one by one eats too much of my time and often as logs are reviewed in a hurry some crucial system irregularities, failed ssh or POP3 / Imap logins, filling disk spaces etc. are missed.
Therefore I decided to implement automated log parsing programs which will summary and give me an overview (helicopter view) on what were the system activities from the previous day (24h) until the moment I logged the system and issued the log analyzer program.
There are plenty of programs available out there that does "wide scale" log analysis, however there are two applications which on most GNU / Linux and BSD systems had become a de-facto standard programs to scan system log files for interesting lines.
These are:
- 1. logwatch – system log analyzer and reporter
- 2. logcheck – program to scan system log files for interesting lines
1. logwatch is by default installed on most of the Redhat based Linux systems (Fedora, RHEL, CentOS etc.). On Debian distributions and as far as I know (Ubuntu) and the other deb based distros logwatch is not installed by default. Most of the servers I manage these days are running Debian GNU / Linux so, to use logwatch I needed to install it from the available repository package, e.g.:
debian:~# apt-get install logwatch
...
logwatch is written in perl and with some big files to analyze, parsing them might take hell a lot of time. It does use a bunch of configuration scripts which defines how logwatch should read and parse the various services logwatch support by default. These conf scripts are also easily extensible, so if one has to analyze some undefined service in the conf files he can easily come up with a new conf script that will support the service/daemon of choice.Using logwatch is very easy, to get an overview about server system activity invoke the logwatch command:
debian:~# logwatch
################### Logwatch 7.3.6+cvs20080702-debian (07/02/08) ####################
Processing Initiated: Thu Nov 24 05:22:07 2011
Date Range Processed: yesterday
( 2011-Nov-23 )
Period is day.
Detail Level of Output: 0
Type of Output/Format: stdout / text
Logfiles for Host: debian
#################################################
--------------------- dpkg status changes Begin -------------
Upgraded:
libfreetype6 2.3.7-2+lenny7 => 2.3.7-2+lenny8
libfreetype6-dev 2.3.7-2+lenny7 => 2.3.7-2+lenny8
---------------------- dpkg status changes End -------------------------
--------------------- httpd Begin ------------------------
Requests with error response codes
400 Bad Request
HTTP/1.1: 2 Time(s)
admin/scripts/setup.php: 2 Time(s)
401 Unauthorized
...
...
---------------------- vpopmail End -------------------------
--------------------- Disk Space Begin ------------------------
Filesystem Size Used Avail Use% Mounted on
/dev/md0 222G 58G 154G 28% /
---------------------- Disk Space End -------------------------
###################### Logwatch End #########################
The execution might take up from 10 to 20 seconds up to 10 or 20 minutes depending on the log files size and the CPU / RAM hardware on the machine where /var/log/… logs will be analyzed.
logwatch output can be easily mailed to a custom mail address using a crontab if the server runs a properly configured SMTP server. Using a cron like:
00 5 * * * /usr/sbin/logwatch | mail -s "$(hostname) log files for $(date)"
Here is time to make a note that logwatch is ported also to FreeBSD and is available from BSD's port tree, from a port with path:
/usr/ports/security/logcheck
2. logcheck is another handy program, which does very similar job to logwatch . The "interesting" information it returns is a bit less than compared to logwatch
The good thing about logcheck is that by default it is made to mail every 1 hour a brief data summary which might be of an interest to the sys admin.
Logcheck is available for install on RedHat distros via yum and has existing package for Debian as well as a port for FreeBSD under the port location /usr/ports/security/logcheck
To install on logcheck on Debian:
debian:~# apt-get install logcheck
...
After installation I found it wise to change the default mailing time from each and every hour to just once per day to prevent my email from overfilling with "useless" mails.
This is done by editting the default cron tab installed by the package located in /etc/cron.d/logcheck
The default file looks like so:
# /etc/cron.d/logcheck: crontab entries for the logcheck package
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
@reboot logcheck if [ -x /usr/sbin/logcheck ]; then nice -n10 /usr/sbin/logcheck -R; fi
2 * * * * logcheck if [ -x /usr/sbin/logcheck ]; then nice -n10 /usr/sbin/logcheck; fi
# EOF
To change it run only once per day its content should looks something like:
# /etc/cron.d/logcheck: crontab entries for the logcheck package
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
@reboot logcheck if [ -x /usr/sbin/logcheck ]; then nice -n10 /usr/sbin/logcheck -R; fi
2 5 * * * logcheck if [ -x /usr/sbin/logcheck ]; then nice -n10 /usr/sbin/logcheck; fi
# EOF
Altering it that way the log summary interesting info analysis will be sent on mail every day in 05:02 a.m.
Changing the default email logcheck will ship its log analyzer report emails on deb based distros is done via editting the file:
/etc/logcheck/logcheck.conf
And changing the SENDMAILTO="" variable to point to the appropriate admin email email addr.
Tags: 24h, Begin, bsd systems, CentOS, configuration scripts, cron, Date, deb, debian distributions, debian gnu, Disk, dpkg, end, fedora, freebsd, gnu linux, helicopter view, hurry, imap, irregularities, libfreetype, linux distributions, linux systems, logcheck, logwatch, nbsp, Output, package, quot, reading, reading log files, reading logs, reporter, repository, Space, ssh, summary, system administrator, system tools, time, Ubuntu
Posted in FreeBSD, Linux, System Administration, Various | 1 Comment »