21 Examples To Make Sure Unix / Linux Configuration Files Are Free From Syntax Errors

Posted on in Categories Howto, Linux, Sys admin, Tips, UNIX last updated June 24, 2017

Check for syntax errors on Linux or Unix
In Linux and UNIX system services are configured using various text files located in /etc/ or /usr/local/etc/ directory tree. A typical server system could have dozens of configuration files.You can check your configuration files for syntax errors without starting the server and validate all settings. In some cases, it is possible to to check the sanity of the specific data (such as keys) or directories (such as /var/lib/cache/). Text files are easier to manage remotely. You can use ssh and a text editor. If there is an error in configuration, the server may not start. It may result in a disaster. This post explains how to quickly find out a syntax error for popular servers and test configuration file for syntax errors.

FAQ Updates: Sep/05/2011

Posted on in Categories FAQ, Sys admin last updated September 5, 2011

Our FAQ section is updated in last few days with new howtos:

FAQ & Howtos RSS Feed

Get intimated about our new howtos / faqs as soon as it is released via RSS feed.

Top 25 Nginx Web Server Best Security Practices

Posted on in Categories Debian Linux, Howto, Linux, RedHat/Fedora Linux, Security, Sys admin, Ubuntu Linux, UNIX last updated September 19, 2017

Nginx is a lightweight, high-performance web server/reverse proxy and e-mail (IMAP/POP3) proxy. It runs on UNIX, GNU/Linux, BSD variants, Mac OS X, Solaris, and Microsoft Windows. According to Netcraft, 13.50% of all domains on the Internet use nginx web server. Nginx is one of a handful of servers written to address the C10K problem. Unlike traditional servers, Nginx doesn’t rely on threads to handle requests. Instead, it uses a much more scalable event-driven (asynchronous) architecture. Nginx powers several high traffic web sites, such as WordPress, Hulu, Github, and SourceForge.

FAQ Updates – Nov/13/2010

Posted on in Categories FAQ last updated November 13, 2009

Our FAQ section is updated in last few days with new howtos:

  • Linux Network IP Accounting – I need to know how much data are transmitted on my ppp0 network or eth0 Internet links? How do I set IP accounting by address such as 123.1.2.3 and 123.1.2.4? How do I set IP accounting per Apache virtual domain? How do I set accounting by service port (http, smtp) and protocol (tcp, udp, icmp)? How do I record how much traffic each of the clients computer is using?
  • Linux / UNIX: DNS Lookup Command – How do I perform dns lookup under Linux or UNIX or OS X operating systems without using 3rd party web sites for troubleshooting DNS usage?
  • Linux: Find Out Which Process Is Listening Upon a Port – How do I find out running processes were associated with each open port? How do I find out what process has open tcp port 111 or udp port 7000 under Linux?
  • Google Apps Domain Create SPF Records For BIND or Djbdns – I work for a small business and outsourced our email hosting to Google. However, I noticed that spammers are using our From: First Last to send their spam messages. All bounced messages come to our catch only account. How do I stop this? How do I validate our domain using SPF? How do I configure a SPF for Google Apps domain using BIND 9 or djbdns?
    Mac Os X: Mount NFS Share / Set an NFS Client – How do I access my enterprise NAS server by mounting NFS filesystem onto my Mac OS X based system using GUI and command line based tools?
  • Explains: echo Command (echo $”string”) Double-quoted String Preceded By a Dollar Sign – I noticed that many shell scripts in /etc/init.d/ directory use the following syntax – echo $”Usage $prog start|stop|reload|restart”. Why a double-quoted string preceded by a dollar sign ($”string”) using the echo command under Linux / UNIX bash scripts?
  • Get intimated about our new howtos / faqs as soon as it is released via RSS feed.

Do You Blame Users For IT Security?

Posted on in Categories Linux, Linux desktop, Security, Sys admin, UNIX, Windows, windows vista last updated March 12, 2009

An interesting article published by security guru Bruce Schneier:

Blaming the victim is common in IT: users are to blame because they don’t patch their systems, choose lousy passwords, fall for phishing attacks, and so on. But, while users are, and will continue to be, a major source of security problems, focusing on them is an unhelpful way to think.

=> Blaming the user is easy – but it’s better to bypass them altogether

Dealing with Recession – Saving Money With Free and Open Source Software

Posted on in Categories Debian Linux, Howto, Linux, Linux desktop, News, RedHat/Fedora Linux, Ubuntu Linux last updated March 2, 2009

According to wikipedia – “An economy which grows over a period of time tends to slow down the growth as a part of the normal economic cycle. An economy typically expands for 6-10 years and tends to go into a recession for about six months to 2 years”. The current defaults on homeloan have led to a major crisis in the US. Once recession started consumers lose confidence in the growth of the economy and spend less including technology and software. Is free and open source software (FOSS) a way to cut business costs? As concern about recession – even depression – deepens, more and more companies are asking this question. However, many have trouble knowing how to begin to find an answer.

How To Write Object-Oriented Shell scripts For Multiple Platforms

Posted on in Categories Howto, Linux, programming, Shell scripting, Sys admin, UNIX last updated January 19, 2009

This may come handy while writing cross-platform scripts.

If you don’t want to commit to the idiosyncrasies of a specific shell running on a particular platform, try the Squirrel Shell. The Squirrel Shell provides an advanced, object-oriented scripting language that works equally well on UNIX, Linux, Mac OS X, and Windows systems. Write a script once, and run it anywhere.

Squirrel is a high level imperative/OO programming language, designed to be a light-weight scripting language that fits in the size, memory bandwidth, and real-time requirements of applications like video games.

=> Speaking UNIX: The Squirrel portable shell and scripting language

Nokia To Add LGPL Option For the Qt UI and Application Framework

Posted on in Categories Kde, Linux, Linux desktop, OS X, UNIX, Windows, windows vista, X server last updated January 14, 2009

Good news for all developers! QT will be available under the LGPL starting with version 4.5. The GNU Lesser General Public License (LGPL) is a free software license published by the Free Software Foundation. The LGPL places copyleft restrictions on the program itself but does not apply these restrictions to other software that merely links with the program. There are, however, certain other restrictions on this software. The LGPL is primarily used for software libraries, although it is also used by some stand-alone applications, most notably Mozilla and OpenOffice.org.

This option could increase Qt usage and adoption. You may see more cross platform commercial application on the Linux desktop. This is huge news for cross-platform developers.

New Notification System for GNOME and KDE

Posted on in Categories Gnome, Kde, Linux desktop, News last updated December 24, 2008

Canonical the makers of Ubuntu about to introduce a new desktop notification system proposal. New changes should improve the usability of the Linux desktop including desktop notification system for both GNOME and KDE. From the Mark Shuttleworth blog:

The key proposals we are making are that:

* There should be no actions on notifications.
* Notifications should not be displayed synchronously, but may be queued. Our implementation of the notification display daemon will display only one notification at a time, others may do it differently.

That’s pretty much it. There are some subtleties and variations, but these are the key changes we are proposing, and which we will explore in a netbook device with a partner, as well as in the general Ubuntu 9.04 release, schedule gods being willing.

I think new changes looks more like Growl system used in Mac OS X. You can read more about proposal including mockup video that shows new notification system here.

Yet Another Reason To Get Open Source Software

Posted on in Categories Linux desktop, News, OS X last updated December 17, 2008

The USB Overdrive is a device driver for Mac OS X that handles any USB mouse / trackball / joystick / gamepad and any Bluetooth mouse from any manufacturer and lets you configure them either globally or on a per-application basis. Some one posted a screen shot of USB Overdrive software. If you are a sensitive pirate you might feel guilty (found via Digg). Maybe it is a time to switch to Linux.