Sunday, May 24, 2009

Tips: solution for [warning: dict_nis_init: NIS domain name not set - NIS lookups disabled]

error messages in maillog:


May 24 23:24:03 TXB-FW postfix/smtpd[31444]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled
May 24 23:24:03 TXB-FW postfix/smtpd[31444]: warning: SASL: Connect to private/auth failed: Connection refused
May 24 23:24:03 TXB-FW postfix/smtpd[31444]: fatal: no SASL authentication mechanisms

First of I didn't ask postfix to do NIS lookups.

The fix was simple.

alias_maps when commented, uses the default settings:
alias_maps = hash:/etc/aliases, nis:mail.aliases

This allows postfix to work even without explicit alias_maps settings. However the default also encumbers it with checking nis. Setting alias_maps explicitly eliminates the problem:
alias_maps = hash:/etc/aliases


http://blog.taragana.com/index.php/archive/how-to-fix-postfix-warning-dict_nis_init-nis-domain-name-not-set-nis-lookups-disabled/

Friday, May 22, 2009

free command information explanation

# free

total used free shared buffers cached
Mem: 1021452 90948 930504 0 5320 61128
-/+ buffers/cache: 24500 996952
Swap: 2104472 0 2104472


total - size of the total memory 1021452Bytes
used - memory that has been used 90948Bytes
free - memory that hasn't been used 930504Bytes
shared - abandoned currently is always 0
buffers - buffer memory 5320Bytes
cache - cache memory 61128Bytes

The relationship:

total = used + free

(- /buffers/cache) used memory: used memory=used-buffers-cached
(+/buffers/cache) free memory: free memory=free + buffers + cached

-/buffers/cache
reflects the size of memory that the programe really have used , and +/buffers/cache reflect the total size of memory that can be misappropriated.

Wednesday, May 13, 2009

Suse 9: Network configuration

Network configuration on Suse has substantially evolved since version 8.0 and resembles the one found in various other Linux distributions.
As usual Yast2 can be used to fully configure network devices nad TCP/IP settings and since we presume you already know how to do it with a graphical interface, let's see, more deeply the involved files.

Configuration files
/etc/sysconfig/network/ifcfg-*
These are the systems's configuration files for every network interface where "*" can be the name of the inteface (eth0, eth1, lo, ppp0...), its MAC address (ex: 00c09f2dc8a4) or indicate what hardware is used (usb, pcmcia).
The main parameters used in these files are:
BOOTPROTO - Can be static (IP configured manually), dhcp (IP oubtained through DHCP)
IPADDR BROADCAST NETMASK NETWORK - Define typical IP parameters: IP address, broadcast, netmask and network address
MTU - Defines the Maximum Transfer Unit (the size of every IP packet). Default on ethernet devices is 1500.
STARTMODE - Indicates the to activate the interface: onboot (at system's boot), hotplug (when a pluggable network device is inserted), manual (manually).
Other parameters can be used and can vary according to the interface type.

/etc/sysconfig/network/config
Contains various, well commented, variables that are applied to every interface, they include also what actions can be done when the interface status is changed. The same values can be specified in the single /etc/sysconfig/network/ifcfg-* files, for a more granular control on the single interfaces.
/etc/sysconfig/network/dhcp, similarly, sets parameters related to dhcp use (logging, lease time, timouts, modification of system's settings, wait time at boot and so on).
/etc/sysconfig/network/wireless sets and describes the various parameters that can be applied to wireless devices (wieless mode, essid, frequency, sensibility, encryption key...). As usual they can be used in the ifcfg files of the single wireless devices, but it's useful to know the options than can be used.

/etc/sysconfig/network/routes
Defines all the (general) static routes. It's possible to specify routes exclusively related to the activation of single interfaces with the files /etc/sysconfig/network/ifroute-interface.
The format of this file is:
DESTINATION GATEWAY NETMASK|PREFIX INTERFACE [TYPE] [OPTIONS]


/etc/resolv.conf
Defines, as in most Unixes, the address of the DNS server to be used by the system.
Some services (pppd, ipppd, dhcpclient, hotplug, pcmcia, pptpclient) can temporarily modify this file in order to use, according to the new connection established, the appropriate DNS server. This is done by Suse's nice shell script /sbin/modify_resolvconf which has various options to handle and manage different dynamic entries in /etc/resolv.conf and /etc/named.conf.

/etc/hosts
As in most Unixes, in this file you can statically assign IP addresses to host names. You can also use /etc/networks for IP networks. The resolver by default first checks this file, before querying the DNS servers in /etc/resolv.conf. This order and other settings about how the system assigns names to resources can be changed (as in every Linux) in /etc/host.conf (old configuration file used by libc4 and libc5 linked programs) or /etc/nsswitch.conf (used by every recent program linked with glibc libraries).

/etc/HOSTNAME
Contains the hostname of the system, used by various startup scripts.

Commands
SuSE features typical Linux network related commands as ifconfig route netstat ip and other commands which can be found in various distros such as ifup (can be invoked also by the symlinks ifstatus or ifdown giving status info on the specified interface or shutting it down) .
Similarly to RedHat's service command, SuSE provides a set of scripts, or better symlinks, to manage to init scripts for the various services:
/sbin/rcnetwork restart restarts the network services as would do the command /etc/init.d/network restart.

SourceForge Tools

FormEntry can generate an HTML form directly from a table, providing an easily created and maintained form which is tightly tied to your database table.

GPlot is a simple front-end to GNU plot. It makes generating plots from one or more files of data just a simple command.

Pipemore is intended to be used as the last of a series of piped commands. It captures the data on the pipe (STDOUT) and displays it in a scrolled text window where you may search or save it. Think of it as a 'more' window you can leave open and reference later.

Simple Website Software is my attempt to provide software to generate a reasonably modern looking web site while requiring a minimal amount of effort to set up and yet keep the HTML pages independent so they can be easily modified outside the web site. This web site uses SWS.

SQLDiff tries to help answer the question 'What Changed' in a database table.

SQLView provides a user friendly interface for browsing a SQL database and modifying SQL tables using a web browser.

backmeup.pl is a script to help manage disk-to-disk backups of my data.

dosql.pl is a script to invoke MySQL using passwords in a series of config files.

dosqlclone.pl is a script to clone a MySQL table to another database or just make a copy of it. This uses the same configuration files as dosql.pl.

Genostore is aimed at small and medium sized genotyping projects. It provides a place for you to save your genotypes as well as providing a means to extract the data for analysis. Once the analysis is done, it'll help organize all those results and provide a way for you to find them again later.

getcomics.pl sends me my daily dose of comics.

jump2nr.pl is yet another way to automate upgrading Linux systems.

loginfailure.pl is a script to close the IP door on people I do not want in.

lvmmgr.sh is a script to help manage all things related to LVMs. This is especially useful if your system has LOTS of drives.

perlwh.pl is 'wh' for Perl Modules.

reminder.pl sends me reminders when important dates like birthdays and anniversaries are coming up.

important.pl is a script to create a map of drives on systems which have LOTS of drives.


SIFTER assists in managing the massive amounts of data that are generated by groups doing genetic analysis. Results are saved in a database and may be searched looking for "interesting" results which can be conveniently displayed. Unfortunately, by the time this was completed, the intended 'customer' no longer needed it, so it's in mothballs. If you think you might be interested, drop me a line.

Simple Maildata Forwarder is used to send Email from forms.

WebFile - Simple Actions for Simple Files is a rule-based tool for maniuplating files from a browser.

wh.pl is a smarter 'which'.

PuTTY for Symbian OS

http://s2putty.sourceforge.net/download.html

PuTTY for Symbian OS - Installing on S60 3rd ed.

Getting error messages about certificate errors when installing PuTTY? Read on!

PuTTY for S60 third edition is currently a self-signed application. This means that while it works without issues once installed, the application installer can either display warnings or refuse to run completely. Since installing self-signed applications can be risky, you should always check the PGP signature to ensure you are installing a real PuTTY package. However, some phones may require additional work to get PuTTY installed.

Some, or possibly all, Nokia E-series phones refuse to install self-signed applications by default. This can be fixed by changing installer settings as follows. From the device menu, open:

Tools / App. mgr. / Options / Settings

Then set "Software installation" to "All". The default on most E-series phones is "Signed only". The names will be different in devices using a different language but the same setting should be present.

Warning! This will enable installing all self-signed applications, including possible malware, so be careful what you install and don't accept installation packages from an unknown source. The installer will also list the capabilities the application needs, and you should check that those make sense. For example, it's natural that PuTTY needs network access, but if a simple game requires it something may be wrong.