Tuesday, September 26, 2006

Understand And Configure Linux Printer System

Starting Redhat 7.3, Redhat Linux support two type of printing system known. These two subsystem are known as LPRng and CUPS respectively.

  1. LPRng printing system, Redhat default printer subsystem, provides printconf as printer manager utility to configure /etc/printcap configuration file, printer spooler, etc.

    While at command prompt, executing printconf-tui (Redhat 7.3) or redhat-config-printer-tui (Redhat 8.0) to bring up command line version of LPRng printing manager.

    For the graphical version, click on the Main Menu => System Settings => Printing or type redhat-config-printer or printconf-gui at a XTerm or Gnome terminal shell prompt to bring up the same GUI program.

  2. CUPS, shorts for Common UNIX Printing System, is an Internet Printing Protocol-compliant system for UNIX and Linux. CUPS printer subsystem uses the printer manager utility called lpadmin to configure /etc/printcap configuration file, printer spooler, etc. If CUPS is not the default printer subsystem, launch the Printer System Switcher application by executing the command redhat-switch-printer and set CUPS as the new default printer subsystem.

    To allow only a few selected users to use a printer called inkjet-graphic, execute the command lpadmin -p inkjet-graphic -u allow:keith,jazz,alice and these setting will be updated to /etc/cups/printers.conf configuration file.
Note! The printer manager utility, printconf or lpadmin, saves any printer configurations made to the /etc/printcap setting file. If there is a need to make any printer configurations outside the printer manager utility, add them to the /etc/printcap.local file. The /etc/printcap file will be deleted whenever the printer manager executing or a server reboot.
Steps to add new printer is almost the same among printer manager utilities. In brief, these are the key points to get it works:
  1. Give a descriptive queue name to distinguish the new printer with other printers or network resources, such as keith_laser, boss_laser, tenfloor_inkjet, etc.
  2. Choose the appropriate printer queue type, such as LOCAL queue type for local physical attached printer, JETDIRECT for jetdirect printer, etc.
  3. If there is option to select the Printer Device, rescan the devices for the correct device, or create a custom device. This will be the /dev entry that represents the interface between the device driver and the printer itself. In most instances, the device will be named /dev/lp0.
  4. Choose a Printer Driver by selecting one from the extensive list. Drivers marked with an asterisk (*) are recommended drivers. If to configure remote printer or printer that does not have a corresponding driver in the list, the safest choice would be Postscript Printer. For JetDirect printers, Raw Print Queue is recommended.
To enable local printer sharing for remote host:
  1. In local host which the printer attached, edit the /etc/lpd.perms configuration file to add in one line that will read ACCEPT SERVICE=X REMOTEHOST=</etc/host.lpd and make sure it should added before the line containing REJECT SERVICE=X NOT SERVER.
  2. In the local host as well, edit the /etc/host.lpd printer access control file add in the full qualify DNS host name or IP address, one record per line, of hosts that are allowed to share the printer attached.
  3. At the remote host, add the network printer as adding local printer except one has to choose a Unix Printer queue type and type the print server hostname and port (usually 631).
Related information:
  1. LinuxPrinting.org is a database of documents about printing, along with a database of nearly 1000 printers compatible with Linux printing facilities.
  2. Linux printing how-to from the Linux Documentation Project.
  3. Search more related info with Google Search engine built-in

Monday, September 25, 2006

Redhat Enterprise Linux System File Permission

Redhat Enterprise Linux device file permission could not be changed simply by using the chmod command. Instead, the device file permission is set by udev hotplug subsystem which is included in almost every 2.6 kernel based Linux distribution that is shipping.

The configuration file /etc/udev/permissions.d/50-udev.permissions defines the permission of each devices present in the Linux system. For example,

  • To change the raw devices file permission, search for the line that read as raw/*:root:disk:0660
  • To change tape drive file permission, search for the line that read as st*:root:disk:0660
The default permission defined is 0660. Simply change the 4 digits code as usual to an expected permission, say 0666 instead of 0660.

Related information:
  • Search more related info with Google Search engine built-in

System And Network Monitoring Freeware

Nagios is the answer!

Nagios is the a GNU GPL software that could used to monitor diverse servers and networking devices. Although the Nagios server running only in Linux and UNIX variants there are Windows based Nagios client that could used to monitor Windows server as well.
It is licensed under the terms of the GNU General Public License Version 2 as published by the Free Software Foundation.

Nagios is a powerful system and network monitoring application. It monitors hosts and services specified, alerting administrators when threshold triggered, and when they recover to healthy state.

Nagios is only available in Linux or UNIX variants. Although, it could helps to monitor Windows servers as well via the Windows version of Nagios client.

Nagios features:

  1. Monitors network services such as SMTP, POP3, HTTP, NNTP, PING, etc.
  2. Monitors server resources such as processor load, disk usage, etc.
  3. Simple plugin design that allows users to easily customize own service checks.
  4. Parallelized service checks.
  5. Ability to define network devices hierarchy using "parent" hosts, allowing detection of and distinction between network devices that are down and those that are unreachable.
  6. Notifications to contacts of email, pager, or user-defined method, when service or host status change.
  7. Ability to define event handlers to be run during service or host events for proactive problem resolution.
  8. Automatic log file rotation.
  9. Support for implementing redundant monitoring hosts.
  10. Optional web interface for viewing current network status, notification and problem history, log file, etc.
Related information:

Internet Explorer Turns FTP Browser

FTP is a legacy file transfer protocol that has been widely used since the day of networked computing.

Other than using the serious typing of command line FTP client, such as the standard FTP client offers by all Windows system, Internet Explorer able to serve as GUI FTP browser too!

Follow these simple steps to turn IE into a graphical FTP client:

  1. Click the Tools menu from Internet Explorer,
  2. Click on Internet Options,
  3. Click the Advanced tab,
  4. Check the check box labeled as "Enable Folder View For FTP Sites",
  5. Check the check box labeled as "Use Passive FTP". Set this option only if the PC is behind a firewall.
  6. Click OK button to complete the setting.
  7. Now, IE is ready to serve as graphical FTP browser. For example, type ftp://keith@188.8.1.10 in the IE address bar and press ENTER to instruct IE connect to FTP server 188.8.1.10 using FTP user account keith. Enter the password when prompt.
  8. Click OK and wait. After successful authentication, an interface similar to Windows Explorer shown. Copy files or folders as usual!
Related information:
  • Search more related info with Google Search engine built-in

Saturday, September 23, 2006

Tweaking Windows Recovery Console

The Windows Recovery Console is designed to help system administrators recover Windows-based computer that fails to start up properly. It is available only in command prompt. Hence the name "Console" attached. It looks like the Windows 9x boot disk, but Windows Recovery Console is more powerful and features rich than the old Windows boot disk.

Basically, Windows Recovery Console allow system administrators to:

  1. Copy, rename, replace, and access to operating system files and folders
  2. Enable or disable Windows services for next system bootup
  3. Repair the file system boot sector or the Master Boot Record (MBR)
  4. Create and format partitions
By default setup, Windows Recovery Console with Administrator account logon allows access to only
  1. the root folder
  2. the %SystemRoot% folder and sub folders of the Windows installation
  3. the Cmdcons folder
  4. the removable media drives such as the CD-ROM drive or the DVD-ROM drive
Trying access to folders other than those listed above will rejected with an "Access Denied" error message. Besides that, Windows Recovery Console disallow copy files from local hard disk to removable storage such as floppy disk. However, Windows Recovery Console allow copy files from removable storage to local hard disk or copy files from one hard disk to another hard disk.

Although, limitations imposed on default setup that stated above could be resolved by
  1. First, enable setting in Local Security Policy.

    1. Click on Start button,
    2. Click on Run menu,
    3. Type gpedit.msc and click OK button,
    4. Click on Computer Configuration, Windows Setting, Security Setting, Local Policies, Security Options,
    5. Look for "Recovery Console: Allow floppy copy and access to all drives and all folders" policy on the right pane and double-click it,
    6. Select Enabled,
    7. Click OK

    Note! As a security measures, it might be wise to double-click on "Recovery Console: Allow automatic administrative logon" policy too and disable it.

  2. Second and last, boot up to Windows Recovery Console, logon with Administrator login account, and execute these two commands:

    1. set AllowRemovableMedia = true
    2. set AllowAllPaths = true

    3. It might be useful to turn on these two features too:

    4. set AllowWildCards = true to allow wildcard support for some commands such as del.
    5. set NoCopyPrompt = true to disable prompt when overwriting an existing file.
Related information:
  • Install Windows Recovery Console
  • Search more related info with Google Search engine built-in

Friday, September 22, 2006

Shell Scripts Monitoring Disk Space Utilization

Nothing special. Just a simple shell scripts, could be served as an introduction of Unix Shell scripts programming, written to check disk space utilization of Linux (applicable to Unix too) filesystems or partitions.

Note! Ignore the left most numeric digits which are not part of the Shell scripts coding. These are line number indicators, which could be turned on in Vi editor using the :set nu command code.

It might be useful to comment out line 14th and remove the hash key on line 15th, which disable echo alert to console and enable alerts emailed to mail box. Configure Linux scheduler via the crontab -e to run this shell scripts, perhaps once a day, and get system administrators alarmed of critical free disk space before the system comes to halt.

Related information:

Tuesday, September 19, 2006

Restart Disabled Windows Services

What could be done besides rebooting Windows server when a particular Windows service become unavailable to start, stop, pause, resume, or restart?

Restarting a Windows service, particular a poorly coded third party Windows service, may turns out to become unable to start, stop, pause, resume, or restart, after the service timeout and fail to startup successfully again. All these five common actions or tasks are dimmed and become unavailable. Restart the Windows server is not the only way, and might not advisable too, to resolve the problem.

Try this before deciding to reboot the Windows server:

Resolve Windows service which dimmed all its associated actions, i.e. start, stop, pause, resume, restart

  1. Right-click on the Windows service,

  2. Select property,

  3. Set the Startup type to Disabled,

  4. Click OK,

  5. Set to Startup type again to either Manual or Automatic,

  6. Click OK again,

  7. Now, this particular Windows service might able to perform one of the five common actions again. Restart the Windows server if these do not work perfectly too.