System Administrators SAs need a set of tools with which to manage their
often unmanageable systems and environments. These ten essential Linux
administration tools provide excellent support for the weary SA. Those
listed aren’t your standard list of tools deemed essential by industry
bystanders. These are tools that have proven track records and have
stood the test of time in the data center.
If you are developing an application for Linux desktop and would like to
automatically find out more information about system, use the following
commands in shell scripts to gather information about system. Recently I
was involved in project where I need to collect information about
running GUI, browser and other information such as disk space, running
kernel etc.
A basic tutorial about the Linux commands ssh and scp. It features
explanation about the syntax, the possibilities and the differences
between the two. It also features some tips and tricks that'll come in
handy when working with these programs.
| ShellSQL - SQL for shell
scripts
| ShellSQL is a suite of programs designed to enable LINUX/UNIX shell
scripts to connect to SQL engines and execute SQL queries and commands
in a simple way enabling intergration with the rest of the script. For
example, it can do things like..
#/bin/shHANDLE=`shpostgres dbname=mydb`
shsql $HANDLE "begin"
for ARG in $
do
shsql $HANDLE "insert into mytable fld1, fld2" \
"values nextvalmyseq, $ARG"
done
shsql $HANDLE "commit"
if [ $# -gt 0 ]
then
ROWS=`shsql $HANDLE "select count from mytable"`
echo "No of rows now in table is" $ROWS
fi
shsqlend $HANDLE
For details on how it hangs together have a look at the
overview.
| All about Linux: Enabling and disabling services during start up in
GNU/Linux
| In any Linux distribution, some services are enabled to start at boot
up by default. For example, on my machine, I have pcmcia, cron daemon,
postfix mail transport agent ... just to name a few, which start
during boot up. Usually, it is prudent to disable all services that
are not needed as they are potential security risks and also they
unnecessarily waste hardware resources. For example, my machine does
not have any pcmcia cards so I can safely disable it. Same is the case
with postfix which is also not used.
Whenever I login remotely to my machine in Canada, the ssh session dies
after a while if I don’t actively type something. This is not the server
timing out, but rather the TCP connection hanging. Figuring out a way to
keep sending it keystrokes automatically is beyond my ability, but I
found out that I could just have it send me data continually, and that
works just as well to keep the terminal session alive. The following
Bourne Shell loop works:
Here is a collection of security tools that you should look through to
add to your arsenal to help keep the peace on your pc/network or unleash
war on others for whatever reason.
| Most of these are command line tools which need to be invoked via the
Terminal:
| Applications->Accessories->Terminal
| How to Change the Timezone in Linux -
wikiHow
| Most modern Linux distributions have user-friendly programs to set the
timezone, often accesible through the program menus or right-clicking
the clock in a desktop environment such as KDE or GNOME. Failing that
it's possible to manually change the system timezone in Linux in a
few short steps.
| 1. Logged in as root, check which timezone your machine is currently
using by executing date. You'll see something like Mon 17 Jan
2005 12:15:08 PM PST, PST in this case is the current timezone.
| 2. Change to the directory /usr/share/zoneinfo here you will find a
list of time zone regions. Choose the most appropriate region, if you
live in Canada or the US this directory is the "America" directory.
| 3. If you wish, backup the previous timezone configuration by copying
it to a different location. Such as
Some windows programs use a compression for larger files that is not
compatible with the linux unzip command. Resulting in the following
error:
need PK compat. v4.5 (can do v2.1)
There is a special program for handling these large files:
p7zip
Run these commands to install and run:
$ curl -o p7zip_4.20_src.tar.bz2 http://internap.dl.sourceforge.net/sourceforge/p7zip/p7zip_4.20_src.tar.bz2
$ bunzip2 p7zip_4.20_src.tar.bz2
$ tar xvf p7zip_4.20_src.tar
$ cd p7zip_4.20_src
$ make
$ make install
$ 7za x largefilename.zip
This saved my ass... let me know how it works for you.
| O+P Insights: Linux HW RAID
Howto
| Hardware RAID boxes are cool things. Plug them in and they behave like
a big and fast disk. If properly configured, they'll be another 30%
faster.
| Issue
There is great software RAID support in Linux these days. I still prefer
having RAID done by some HW component that operates independently of the
OS. This reduces dependencies a great deal and takes load of the server.
| Using Rsync and SSH by Try
Johnson of troy.jdmz.net
| I like to backup some logging, mail, and configuration information
sometimes on hosts across the network and Internet, and here is a way
I have found to do it. You'll need these packages installed:
| * rsync
| * openssh
| * cron (or vixie-cron)
| Please note these instructions may be specific to Red Hat Linux
versions 7.3, 9, and Fedora Core 3, but I hope they won't be too hard
to adapt to almost any *NIX type OS. The man pages for 'ssh' and
'rsync' should be helpful to you if you need to change some things
(use the "man ssh" and "man rsync" commands).
| First, I'll define some variables. In my explanation, I will be
synchronizing files (copying only new or changed files) one way, and I
will be starting this process from the host I want to copy things to.
In other words, I will be syncing files from /remote/dir/ on
remotehost, as remoteuser, to /this/dir/ on thishost, as thisuser.
| I want to make sure that 'rsync' over 'ssh' works at all before I
begin to automate the process, so I test it first as thisuser:
| $ rsync -avz -e ssh remoteuser@remotehost:/remote/dir /this/dir/
| and type in remoteuser@remotehost's password when prompted. I do
need to make sure that remoteuser has read permissions to /remote/dir/
on remotehost, and that thisuser has write permissions to /this/dir/
on thishost. Also, 'rsync' and 'ssh' should be in thisuser's path
(use "which ssh" and "which rsync"), 'rsync' should be in
remoteuser's path, and 'sshd' should be running on remotehost.
| SUPERGUIDE: The Open Source Challenge. How to replace Windows
completely with Ubuntu. | APC
Magazine
| When I was first given this task I had to sit and blink a few times,
if for nothing else than dramatic pause. Im a self-confessed Linux
nut, as some of you may know, but even Im cautious to do away with
Windows completely. Theres a reason I have a dual-boot Windows and
Linux machine. Several of them, in fact.
| Learning and Mastering the Linux VI / VIM
editor
| VIM is my preferred text editor for configuring system and writing
code at a shell prompt. However many new Linux user finds it difficult
to cope with vim. This tutorial provides a good introduction:
The VI editor is a screen-based editor used by many Unix users. The VI
editor has powerful features to aid programmers, but many beginning
users avoid using VI because the different features overwhelm them. This
tutorial is written to help beginning users get accustomed to using the
VI editor, but also contains sections relevant to regular users of VI as
well. Examples are provided, and the best way to learn is to try these
examples, and think of your own examples as well… There’s no better
way than to experience things yourself.
This simple guide will bring up the Windows start menu inside GNOME and
allow you to run, use and install any Windows app (that can run in a VM)
inside your existing desktop. It takes about 10 minutes to setup, minus
the time to install Windows, and involves one command in total.
| Here’s a bunch of damn useful commands you haven’t heard before.
| 1. A Simple way to Send Output and Errors
| 2. Parallelize Your Loops
| 3. Catch Memory Leaks By Using Top via Cron
| 4. Standard in directly from the command line
| 5. Set a Random Initial Password, That Must be Changed
| 6. Add Your Public Key to Remote Machines the Easy Way
| 7. Extract an RPM without any additional software
| 8. See How a File Has Changed from Factory Defaults
| 9. Undo Your Network Screwups After You’ve Lost the Connection
| 10. Check a Port is Open
Every machine needs an individual address. To keep things simple, we
assign them in clumps; each network of machines generally gets a range
of addresses.
A single IP address is 32 bits long: printed in binary has 32 binary
digits, each 1 or 0. Its standard to print them as 4 decimal numbers,
each representing 8 bits, such as 192.168.1.1. In binary, this would be 11000000101010000000000100000001.
You can take your desktop wherever you go, on USB stick, and newest
working Debian 4.0 'Etch' to boot! The well-known flavor of Debian,
engineered in Germany by Klaus Knopper, empowers you to step over all
them troubles with freaky Windows. MS-Windows stuff is so much last
century... totally uncool bloatware. USB Knoppix might be the right
answer!
read
more | digg story \<http://digg.com/linux_unix/HOWTO_Create_Your_Personal_All_In_One_USB_Knoppix_5_1_0_hot\>__
This howto will show you howto store your users in LDAP and authenticate
some of the services against it. I will not show howto install
particular packages, as it is distribution/system dependant. I will
focus on "pure" configuration of all componenets needed to have LDAP
authentication/storage of users.
This is mainly for Linux folk but Mac Admins should be able to find
equivalent tools.
"Every administrator has a set of software tools that he just can't
live without. These are the utilities that you install as soon as you
log into a new machine, to help make day-to-day tasks a little easier.
Here are my top 10 tools."
read
more | digg story \<http://digg.com/linux_unix/My_sysadmin_toolbox\>__
Articles > Trash or Treasure"
href="http://maczealots.com/articles/hiddenfiles/">MacZealots >
Articles > Trash or Treasure
The idea of a hidden file has changed since the days of the classic Mac
OS, where a file's "hidden" attribute was set in the resource fork of
the file, and wasn't immediately accessible to the user. In OS X (and
UNIX in general), it's much easier. All you have to do is preface the
name of a file with a period ("."), and the file won't show up in the
Finder, as well as Save/Open dialogs, etc. This can be a good way to
hide a confidential file