Cramsession Linux Newsletter

Cramsession.com Linux News Archive

Please note that I've stopped writing the Linux News as of January 30, 2003, as Cramsession has cancelled most of their newsletters. You can send any questions or comments about this content to me (sean at ertw . com)
People have been asking for a downloadable version of the archives. [My mbox (one big file, 1.4MB)] [Individual files, text, tarball] [Individual files, html, tarball]
If you're looking for more Linux content, you might like my blog.
Jan 30, 2003
  Linux News - Issue #117
Jan 23, 2003
  Linux News - Issue #116
Jan 16, 2003
  Linux News - Issue #115
Jan 9, 2003
  Linux News - Issue #114
Jan 2, 2003
  Linux News - Issue #113
Dec 19, 2002
  Linux News - Issue #112
Dec 12, 2002
  Linux News - Issue #111
Dec 5, 2002
  Linux News - Issue #110
Nov 28, 2002
  Linux News - Issue #109
Nov 21, 2002
  Linux News - Issue #108
Nov 14, 2002
  Linux News - Issue #107
Nov 7, 2002
  Linux News - Issue #106
Oct 31, 2002
  Linux News - Issue #105
Oct 24, 2002
  Linux News - Issue #104
Oct 17, 2002
  Linux News - Issue #103
Oct 10, 2002
  Linux News - Issue #102
Oct 3, 2002
  Linux News - Issue #101
Sep 26, 2002
  Linux News - Issue #100
Sep 19, 2002
  Linux News - Issue #99
Sep 12, 2002
  Linux News - Issue #98
Sep 5, 2002
  Linux News - Issue #97
Aug 29, 2002
  Linux News - Issue #96
Aug 22, 2002
  Linux News - Issue #95
Aug 15, 2002
  Linux News - Issue #94
Aug 8, 2002
  Linux News - Issue #93
Aug 1, 2002
  Linux News - Issue #92
Jul 25, 2002
  Linux News - Issue #91
Jul 18, 2002
  Linux News - Issue #90
Jul 11, 2002
  Linux News - Issue #89
Jul 4, 2002
  Linux News - Issue #88
Jun 27, 2002
  Linux News - Issue #87
Jun 20, 2002
  Linux News - Issue #86
Jun 13, 2002
  Linux News - Issue #85
Jun 6, 2002
  Linux News - Issue #84
May 30, 2002
  Linux News - May 30, 2002
May 23, 2002
  Pearl In The Shell
May 16, 2002
  Linux Filesystems - Part Two
May 9, 2002
  Inside The Linux Filesystem
May 2, 2002
  CD Burning Under Linux
Apr 25, 2002
  Star Office Vs. Open Office
Apr 18, 2002
  Surfing With Mozilla
Apr 11, 2002
  "We Don't Support Linux..."
Apr 4, 2002
  Visit The UNIX Library
Mar 28, 2002
  Linux and World Domination
Mar 21, 2002
  Working With Keyservers
Mar 14, 2002
  A Look At Public Key Cryptography
Mar 7, 2002
  Monitoring Systems With "vmstat"
Feb 28, 2002
  Star Office 6 Not to be Free for Linux?
Feb 21, 2002
  How Can Programming Benefit a Systems Administrator?
Feb 14, 2002
  Alias: It's Not Just a TV Show
Feb 8, 2002
  Using The diff and patch Utilities
Jan 31, 2002
  How To Detect Cracks
Jan 24, 2002
  Using Razor to Shave Away Spam
Jan 17, 2002
  Stomping Spam
Jan 10, 2002
  Sair Linux Courseware Review
Jan 3, 2002
  2002: The Year of the Penguin!
Dec 27, 2001
  UNIX Apps on a Windows Box?
Dec 20, 2001
  Directory Assistance
Dec 13, 2001
  How Do You Kill Zombies?
Dec 6, 2001
  Using Hard and Soft Symlinks
Nov 29, 2001
  Change Terminal-Based Apps Into Network Apps
Nov 22, 2001
  Adventures In Booting
Nov 15, 2001
  Getting To Know PAM
Nov 8, 2001
  Know Your Enemy
Nov 1, 2001
  Do Mulder and Scully Use X-Windows?
Oct 25, 2001
  A Quick Look at the RHCE Certification
Oct 18, 2001
  What's Up With Linux Certification?
Oct 11, 2001
  Express Yourself Regularly
Oct 4, 2001
  Advice For Lazy Penguins?
Sep 27, 2001
  NVIDIA Jumps On Linux Bandwagon
Sep 20, 2001
  Understanding DNS in a Linux Environment
Sep 13, 2001
  Be Careful With Binaries
Sep 6, 2001
  Party Like It's 999,999,999
Aug 30, 2001
  Rooting Out Memory Hogs
Aug 23, 2001
  Spin Your 'Top'
Aug 16, 2001
  Keeping Time With NTP
Aug 9, 2001
  Supporting True Type Fonts
Aug 2, 2001
  Getting Perl To Fetch
Jul 26, 2001
  Who's The Man?!
Jul 19, 2001
  Adobe Cracks The DMCA Whip
Jul 12, 2001
  Due Processes
Jul 5, 2001
  Going Adobe Free
Jun 28, 2001
  Don't Send Mixed SIgnals
Jun 21, 2001
  Everything is a File. (almost)
Jun 14, 2001
  Know Your Partitions
Jun 7, 2001
  Where it's "at"!
May 31, 2001
  A Sneak Peek at RedHat 7.1
May 24, 2001
  Scheduling Tasks With cron - Part 2
May 17, 2001
  Scheduling Tasks With cron
May 10, 2001
  Open Source - Seeing Through The FUD
May 3, 2001
  A Look At Ximian's New Release
Apr 26, 2001
  Rev Up Your X-Windows Session
Apr 19, 2001
  Wrangling With GNU Cash
Apr 12, 2001
  Tame the syslogd Daemon
Apr 5, 2001
  Test Your Admin Skills At Honeynet
Mar 29, 2001
  Software RAID on Your Linux Box
Mar 22, 2001
  Prevent Disasters: Back It Up
Mar 15, 2001
  Notes From Underground!
Mar 8, 2001
  SuSE 7.1 - A First Look
Mar 1, 2001
  Certification Boot Camp
Feb 22, 2001
  Understanding Runlevels
Feb 15, 2001
  What Are The Advantages of Joining a LUG?
Feb 8, 2001
  Diving For Perls
Feb 1, 2001
  How To Secure Your Linux Installation
Jan 25, 2001
  Linux Problem Solving
Jan 18, 2001
  Stand up and Be Counted!
Jan 11, 2001
  2.4.0 is Here!
Jan 4, 2001
  When will Mom use Linux?
Dec 28, 2000
  The Year in Review
Dec 21, 2000
  The SourceForge Solution
Dec 15, 2000
  How to Compile and Install the New Kernel
Dec 7, 2000
  Put Your E-mail Into A Blackberry Basket
Nov 30, 2000
  Using Perl With Linux
Nov 23, 2000
  Working With MP3's Under Linux
Nov 16, 2000
  Apache 2.0 alpha 4
Nov 9, 2000
  Dell loves Linux!
Nov 2, 2000
  What's Up With RedHat 7?
===========================================================
                        LINUX NEWS
            Resources & Links From CramSession.com
                 Thursday, July 11, 2002
===========================================================

-----------------
TABLE OF CONTENTS
-----------------

1) Sean's Notes

2) Linux News

	Lessons Learned From Tolkein
	LSB Certification
	Lindows PC Reviewed
	Countdown to Y2Pay

3) Linux Resources

	Hooking Up Linux with AD
	Use BIND With AD
	Advanced Bash Scripting Guide
	C-shell Cookbook
	How to Switch to Dvorak

4) App o' the Week


~~~~~~~~~~~~~~~~~~~~~~ ADVERTISEMENT ~~~~~~~~~~~~~~~~~~~~~~~

Serebra Learning Corporation knows that it's true, you get
paid more if you have the skills. Learn at your own pace
with our dynamic training programs for the skills needed to
succeed in today's IT market. The Best Way to Learn Anything,
Anywhere, Anytime. Check out this month's specials!

http://ad.brainbuzz.com/?RC06&AIT65

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

For information on how to advertise in this newsletter
please contact mailto:adsales@CramSession.com or visit
http://cramsession.com/marketing/default.asp

===========================================================
1) Sean's Notes
===========================================================

For the past couple of weeks we've been learning about Unix
file permissions.  Two weeks ago, it was the basics of file
permissions, and last week, it was applied to directories.

http://newsletters.cramsession.com/Newsletters/NewsletterArchive/Li
nuxNews/july-4-2002linux.txt

A file or a directory can have the read, write, and execute
flags applied to its owner, group, or everyone, for a total
of 9 different permission bits.  Hold on to your shirt,
though: there are some that I didn't tell you about earlier.

The 't' bit is usually reserved for directories (it has a
meaning for files, but not really used).  Last week, I said
that you could give read/write/execute access to everyone
on a directory (octal permissions 777), except that people
could then delete each other's files.  Well, +t is what you
want.  On a directory, it ensures that only the owner of a
file can delete it.  /tmp is like that, a global place that
you can dump temporary files:

drwxrwxrwt   25 root     root       5120 Jul 10 21:31 /tmp

To set or clear it, you can use the long format:

$ chmod +t /tmp #set
$ chmod -t /tmp #clear

It's got an octal equivalent of 1, but to use it we'll have
to go to four digits instead of three.

$ chmod 1777 /tmp

(Note that you have to resupply the normal permission bits,
one reason I prefer to use the long approach.)

Or, to clear all the special bits:

$ chmod 0777 /tmp

When applied to a file, it means that you want the program
image saved to swap, in the hopes that the next time it's run,
it'll start up faster.  I've never tried, nor used it, so I
can't say how well it works.

The next special permission is the 's' bit.  It's both
dangerous and confusing, but incredibly helpful, so be careful
when you use it!  This bit is always applied specifically to
a user or group (or both).  In octal, 4 applies to the user,
and 2 applies to the group.  Thus, 4555 sets +s on the user,
and read/execute to all classes.  In the long form, specify
group or user:

chmod u+s foo
chmod g-s foo

On an executable program, the file runs as the owner when
applied to the owner, or the group when applied to the group.
Thus, they're usually referred to as the setuid and setgid
bits respectively, because they cause the programs UID or
GID to be set.

This needs some more explanation.  Take for example a program
that needs to run as root such as tcpdump.  If you want a
normal user to be able to run it, but don't want to give them
the root password, then setting the setuid bit will cause
tcpdump to run as the owner (presumably root), no matter who
executes it.

NOTE: THIS IS A BIG SECURITY RISK. USE IT WITH CAUTION.

Two things can go wrong here.  One is that there is something
like a buffer overflow can cause the program to give up a
shell.  It's running as root, even though an unprivileged
user started it, so guess what kind of shell that's going to
give you?  Yup, a root shell.

The second is that the program itself is nice enough to run
programs for you.  Take for example, vi.  With a few
keystrokes, vi can run other programs...  As root, if it was
running setuid.

Scary stuff aside, there are many cases where this is needed.
In order to edit your crontab, you have to be able to edit
files in protected areas.  /usr/bin/crontab has the setuid
bit set, within the program itself it does any necessary
security checks.

-rwsr-xr-x    1 root   root   21280 Jun 24  2001 /usr/bin/crontab

Here, you can see a lowercase 's' where the 'x' usually goes,
which tells you it's running setuid.  Had it been running
setgid, it would have been in the group execute:

-r-xr-s--x    1 root    games   233356 Sep 16  2001 /usr/games/gtali

Most of the games are setgid to "games" so that they can
write to a system wide high score file.  This prevents normal
users from overwriting the scores.

When using the setuid or setgid bits on your own, it's often
best to restrict access to the binary itself through the use
of groups.  Say you wanted your network admins to be able to
use tcpdump without root access.

- create a group, netadmins
- change the group ownership of tcpdump to netadmins
- change the permissions of tcpdump to 4550 (setuid, owner/group
  read/execute, no one else can execute)
- put the netadmins in the netadmin group (/etc/group)

Last note on the setuid/setgid bits -- don't use 'em on shell
scripts.  Modern shells will give up the permissions anyway,
but there are just too many ways for an attacker to exploit a
script running with elevated permissions.

On a directory, the setgid bit has special meaning (the
setuid bit does nothing).  Assuming the user in the directory
is a member of the same group that the directory is, then all
newly created files will be owned by that group.  (Remember
that a user can belong to several groups).  By giving group
write access to the directory and setting the setgid bit, you
can ensure that everyone in the group can share files properly.

Remember this:

1 - t (must be owner to delete file for a directory)
2 - setgid (process assumes gid on files, forces group ownership
    on directories
4 - setuid (process assumes uid on files)

In practice, I never use octal values when dealing with special
permissions, instead always preferring to set it explicitly
with the +/- operators.  You don't want to accidentally give
setuid permissions (4) when you meant to do a setgid (2).

The permissions I showed you today are both very powerful, but
require a great deal of thought before using.  It's tempting
to simply setuid any binary that is causing you trouble, but
often, a more elegant solution is available (for example,
rather than setuid'ing CD writing utilities, relax the
permissions on the CD device itself).  Use them with care!


Long live the Penguin,

Sean
swalberg@cramsession.com


===========================================================
2) Linux News
===========================================================

-----------------------------
Lessons Learned From Tolkein
-----------------------------
Linux is playing a big role in the making of The Two Towers,
the next movie in the Lord of the Rings series. The CTO of a
company doing work on the project speaks a bit about the
making of the movie, and the challenges they've encountered.

http://www.digitalanimators.com/2002/07_jul/features/lessons.htm


-------------------
LSB Certification
-------------------
A while ago the Linux Standards Base was announced as ready
to be used. The Open Group has now created a program to
certify and brand LSB certified distributions and
applications. Fees are quite reasonable, and unlike the so
called "United Linux", likely won't result in fees being
passed on to consumers.

http://www.opengroup.org/lsb/cert/


--------------------
Lindows PC Reviewed
--------------------
NewsForge reviewed the Lindows PC offering from WalMart, and
the results were disappointing. Poor documentation, a
subscription fee for the software service, and a general lack
 of polish are the marks against it. Still, it's progress.

http://newsforge.com/article.pl?sid/07/02/1247234&mode=thread&tid#



-------------------
Countdown to Y2Pay
-------------------
Afraid of the new licencing scheme coming down the pipe from
Microsoft? Ximian might make it worth your while, as they're
offering some discounts on their Linux desktop solutions.

http://www.ximian.com/solutions/y2pay.html


===========================================================
3) Linux Resources
===========================================================

-------------------------
Hooking Up Linux with AD
-------------------------
Microsoft guru QCumber dug up this little gem on how to get
your Linux box to authenticate to an Active Directory server.
It's even able to use SSL to protect the data in transit.

http://jaxen.ratisle.net/~jj/nss_ldap-AD_Integration_how-to.html


------------------
Use BIND With AD
------------------
Windows 2000 makes heavy use of DNS. Linux is good with DNS.
Hey! A match made in heaven. You've got Q to thank for this
one, too.

http://ibiblio.org/gferg/ldp/BIND+AD-HOWTO/BIND+AD-HOWTO.html


------------------------------
Advanced Bash Scripting Guide
------------------------------
Here is a very complete shell scripting guide. The subtitle,
"An in-depth exploration of the gentle art of shell scripting"
doesn't do it justice. Hell, it implements the "Game of Life"
in the examples. Bookmark this one.

http://tldp.org/LDP/abs/html/index.html


-----------------
C-shell Cookbook
-----------------
"This cookbook describes the fundamentals of writing scripts
using the UNIX C shell. It shows how to combine Starlink and
private applications with shell commands and constructs to
create powerful and time-saving tools for performing
repetitive jobs, creating data-processing pipelines, and
encapsulating useful recipes."

http://www.starlink.rl.ac.uk/star/docs/sc4.htx/sc4.html


------------------------
How to Switch to Dvorak
------------------------
The Dvorak keyboard layout is supposed to be more efficient,
and also less prone to cause injury. Switching your keyboard
layout is pretty easy, though learning it is a pain (yes, I
gave up soon after starting this week's edition).

http://www.mwbrooks.com/dvorak/


===========================================================
4) App o' the Week
===========================================================
Microsoft Proxy Server has a setting where all clients have
to provide NTLM authentication before going out on the
Internet, effectively limiting your choice of browsers to
Internet Explorer. Here's a proxy that will let any browser
emulate IE; the proxy server will be none the wiser, and you
can use your favorite browser.

http://www.geocities.com/rozmanov/ntlm/


===========================================================
(C) 2002 BrainBuzz.com, Inc. All Rights Reserved.
===========================================================
_______________________________________________________

          This message is from CramSession

You are currently subscribed to the following list
   Hottest Linux News and Resources
   as: sean@ertw.com

To un-subscribe from this newsletter by e-mail,
   send a blank email message to:
   mailto:leave-linuxnews-3825955Y@list.cramsession.com

To subscribe to this newsletter and many others visit
our site at:
http://newsletters.cramsession.com/signup/default.asp

-------------------------------------------------------