old-www/LDP/LG/issue75/lg_tips.html

491 lines
18 KiB
HTML

<!--startcut ======================================================= -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<META NAME="generator" CONTENT="lgazmail v1.4F.k">
<TITLE>More 2 Cent Tips & Tricks LG #75</TITLE></HEAD><BODY BGCOLOR="#FFFFFF" TEXT="#000000"
LINK="#3366FF" VLINK="#A000A0">
<!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
<P> <hr>
<CENTER>
<!-- *** BEGIN navbar *** -->
<IMG ALT="" SRC="../gx/navbar/left.jpg" WIDTH="14" HEIGHT="45" BORDER="0" ALIGN="bottom"><A HREF="lg_mail.html"><IMG ALT="[ Prev ]" SRC="../gx/navbar/prev.jpg" WIDTH="16" HEIGHT="45" BORDER="0" ALIGN="bottom"></A><A HREF="index.html"><IMG ALT="[ Table of Contents ]" SRC="../gx/navbar/toc.jpg" WIDTH="220" HEIGHT="45" BORDER="0" ALIGN="bottom" ></A><A HREF="../index.html"><IMG ALT="[ Front Page ]" SRC="../gx/navbar/frontpage.jpg" WIDTH="137" HEIGHT="45" BORDER="0" ALIGN="bottom"></A><A HREF="http://www.linuxgazette.com/cgi-bin/talkback/all.py?site=LG&article=http://www.linuxgazette.com/issue75/lg_tips.html"><IMG ALT="[ Talkback ]" SRC="../gx/navbar/talkback.jpg" WIDTH="121" HEIGHT="45" BORDER="0" ALIGN="bottom" ></A><A HREF="../faq/index.html"><IMG ALT="[ FAQ ]" SRC="./../gx/navbar/faq.jpg"WIDTH="62" HEIGHT="45" BORDER="0" ALIGN="bottom"></A><A HREF="lg_answer.html"><IMG ALT="[ Next ]" SRC="../gx/navbar/next.jpg" WIDTH="15" HEIGHT="45" BORDER="0" ALIGN="bottom" ></A><IMG ALT="" SRC="../gx/navbar/right.jpg" WIDTH="15" HEIGHT="45" ALIGN="bottom">
<!-- *** END navbar *** -->
</CENTER>
</p>
<!-- QUICK TIPS SECTION ================================ -->
<!-- endcut ======================================================= -->
<center>
<H1><A NAME="tips"><IMG ALIGN=MIDDLE ALT="" SRC="../gx/twocent.jpg">
More 2&cent; Tips!</A></H1> <BR>
<!-- BEGIN tips -->
Send Linux Tips and Tricks to <A HREF="mailto:linux-questions-only@ssc.com">linux-questions-only@ssc.com</A></center>
</center>
<UL>
<!-- index_text begins -->
<li><A HREF="#tips/1"
><strong>pseudo-chroot</strong></a>
<li><A HREF="#tips/2"
><strong>See LILO only when you need it</strong></a>
<li><A HREF="#tips/3"
><strong>Active Directory...</strong></a>
<li><A HREF="#tips/4"
><strong>CSS2? Try XML and its kin instead</strong></a>
<li><A HREF="#tips/5"
><strong>Linux with win2000</strong></a>
<li><A HREF="#tips/6"
><strong>Cable Modem Setup</strong></a>
<li><A HREF="#tips/8"
><strong>read a timestamp... the EASY way</strong></a>
<li><A HREF="#tips/11"
><strong>How to manually label a tape in linux</strong></a>
<li><A HREF="#tips/14"
><strong>Problem faced while using script to backup</strong></a>
<li><A HREF="#tips/15"
><strong>Posters for [LG 72] help wanted #7</strong></a>
<!-- index_text ends -->
</UL>
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="tips/1"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">pseudo-chroot</FONT></H3>
Fri, 4 Jan 2002 09:34:18 -0500
<BR>trevor (<a href="mailto:linux-questions-only@ssc.com?subject=%20Re%3A%20%5BLG%2075%5D%202c%20Tips%20%231%20pseudo%20chroot">tlist from vtnet.ca</a>)
<P>
hi,
</P>
<P>
in issue 74 there's a question from Faber Fedor asking about how to
setup an environment so that a user can't wander from their home
directory.
</P>
<P>
i believe the person asking the question was looking for something
along the lines of a restricted shell. tell the person asking the
question to look at the "-r" option to bash, smrsh, and/or do a google
search for "restricted shell".
</P>
<P>
best regards,
<br>trevor
</P>
<!-- end 1 -->
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="tips/2"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">See LILO only when you need it</FONT></H3>
Fri, 04 Jan 2002 13:21:36 -0800
<BR>John R. Jones (<a href="mailto:linux-questions-only@ssc.com?subject=%20Re%3A%20%5BLG%2075%5D%202c%20Tips%20%232%20lilo%20when%20needed">jonejr from gat.com</a>)
<P>
Hello gazette,
</P>
<P>
Being a new Linux administrator, I had "hardened" down my install by implementing
a "protected" and "password=&lt;pass&gt; entry in my <TT>/etc/lilo.conf</TT> file to keep people
just as dangerous as myself out of single mode.
</P>
<P>
I also rem'd out the timeout= value so my install would always boot straight into
Linux.
</P>
<P>
My question for the day was "how could I boot Linux Single if I had to?
a Boot and Root set would work, but I discovered this...
</P>
<P>
After the BIOS Mem check, hold down either control key and the LILO boot "screen" is
displayed! And of course, you'd need the password=&lt;value&gt; to use it...
</P>
<P>
Wow, Now I am scary on 2 platforms.
<IMG SRC="../gx/dennis/smily.gif" ALT=":)"
height="24" width="20" align="middle">
</P>
<P>
--
Thank you,
</P>
<P>
John R. Jones
</P>
<p><em>3, if you count that he's an Oracle DBA. -- Heather</em></p>
<!-- end 2 -->
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="tips/3"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">Active Directory...</FONT></H3>
Fri, 04 Jan 2002 01:38:57 -0600
<BR>John Lederer (<a href="mailto:linux-questions-only@ssc.com?subject=%20Re%3A%20%5BLG%2075%5D%202c%20Tips%20%233%20active%20directory">john from jhml.org</a>)
<P>
OpenLDAP is the Linux equivalent of Active Directory.
</P>
<P>
Regards.
<br>John
</P>
<p><em>There's been enough small-comment interest in this, it would probably
be good to see an article on the subject of setting up this sort of environment
the Linux way. -- Heather</em></p>
<!-- end 3 -->
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="tips/4"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">CSS2? Try XML and its kin instead</FONT></H3>
Sun, 30 Dec 2001 22:18:56 -0500
<BR>XunDog (<a href="mailto:linux-questions-only@ssc.com?subject=%20Re%3A%20%5BLG%2075%5D%202c%20Tips%20%234%20CSS2%20equivs">dwight1 from attcanada.ca</a>)
<P>
Ok,
</P>
<P>
If the feature is unique to CSS2 then
you won't replicate it with CSS1 and cross-platform
browser support for either is restrictive ...
</P>
<P>
so .... I would suggest using Xml, xsl, xslt
and either DTD or xsd schema formats ...
</P>
<P>
this is more completely supported ... just a
little (mabye a lot) more work ... Check out
the books by Benoit Marchal ...
</P>
<P>
regards
<br>XunDog
</P>
<!-- end 4 -->
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="tips/5"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">Linux with win2000</FONT></H3>
Mon, 14 Jan 2002 13:56:00 -0500 (COT)
<BR>nadeem (<a href="mailto:linux-questions-only@ssc.com?subject=%20Re%3A%20%5BLG%2075%5D%202c%20Tips%20%235%20Linux%20with%20win2000">abc from studiosmile.com</a>)
<br>answered by John Karns (The Answer Gang)
<P><STRONG>
Anybody please tell me about installation of linux with win2000.
I already installed linux 7 on my pc.
now i want that without format my system i install win2000 on my pc.
</STRONG></P>
<P><STRONG>
any body pls give me any utility. don't tell me FAQ.
this is boring for me. if anybody wants help me out than pls provide me
utility.
</STRONG></P>
<P>
If you find reading FAQ's boring, I don't think you're going to like Linux
too much.
</P>
<P>
Three recommendations:
</P>
<P>
For disk partition manipulation:
<ol>
<li> fips or
<li> Partition Magic (there are others, but these are two I've used)
</ol></P>
<P>
For installing and running Windows (MSW) with Linux.
<br>3) VMWare
</P>
<P>
It would be nice to be able to avoid MSW entirely, but since my work
demands it, using VMWare allows me to run it without having to reboot and
leave the Linux environment.
</P>
<P>
-- John Karns
</P>
<!-- end 5 -->
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="tips/6"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">Cable Modem Setup</FONT></H3>
Wed, 2 Jan 2002 10:26:11 +0100
<BR> Eugene Poole
(<a href="mailto:linux-questions-only@ssc.com?subject=%20Re%3A%20%5BLG%2075%5D%202c%20Tips%20%236%20cablemodem">etpoole from attglobal.net</a>)
<br>answered by Yann Vernier and Mike Orr (The Answer Gang)
<P><STRONG>
On January 3, 2002 I'm having a external cable modem installed. I've
been looking around for some simple suggestions on what needs to be
done, confuguration wise, to my Linux machine. Can you help? Naturally,
the normal statement has been made - "We don't support Linux". The Linux
machine that it's being connected to has a second NIC installed and I've
accessed the machine via the second NIC to that's all set up. Where do I
go from there?
</STRONG></P>
<P>
We can't know the next step until you have the instructions for how to
connect using the cable modem. If you are using <A HREF="http://www.debian.org/">Debian</A> GNU/Linux, a
simple way to prepare for running a masquerading gateway is to install
the ipmasq package, but we don't know if you need PPPOE, DHCP, or some
special login methods. A useful resource may be
<A HREF="http://www.cablemodeminfo.com/LinuxCableModem.html"
>http://www.cablemodeminfo.com/LinuxCableModem.html</A>
</P>
<P>
Good luck! -- Yann
</P>
<em>
<P>
The extra Ethernet card should be all you need. Beyond that, just follow
the Windows dialogs in the manual and see whether it's dhcp or a static IP,
which nameservers to put in <TT>/etc/resolv.conf</TT>, etc.
</P>
<P>
Yann is right about setting up masquerading if you have a local
network. I don't think of that as "setting up a cable modem" though.
That's another step, connecting a local network to the Internet.
</P>
<P>
Be glad you have an external modem. It would be much harder to set up
if it were internal, because it would probably require some
proprietary DLL that isn't available for Linux. -- Mike
</P>
</em>
<!-- end 7 -->
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="tips/8"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">read a timestamp... the EASY way</FONT></H3>
Wed, 2 Jan 2002 23:19:54 -0500
<BR>Joe Smith (<a href="mailto:linux-questions-only@ssc.com?subject=%20Re%3A%20%5BLG%2075%5D%202c%20Tips%20%238%20date">jes from martnet.com</a>)
<P><font color="navy"><em>
I was looking for a solution to extract the timestamp of a file with
plain shell methods.
</em></font></P>
<P>
...
(Lots of all-too-complicated suggestions followed)
</P>
<strong>
<P>
What's wrong with
</P>
<P><CODE>
date -r file
</CODE></P>
<P>
Which only goes to show that we <EM>really</EM> need a friendly way to query the
vast obscurity which is Unix documentation... sigh.
</P>
<P>
&lt;Joe
</P>
</strong>
<em>
<P>
&lt;laugh&gt; Bravo! Well done, sir!
</P>
<P>
This illustrates the point that I often make to folks just learning Unix:
the tools are in there, <EM>somewhere</EM>. It's <EM>finding</EM> them that's the
problem. -- Ben
</P>
</em>
<p>......... the original querent replies .........</p>
<P>
Indeed.
</P>
<P>
Especially when some of your man pages are out of date. In my case,
</P>
<P><CODE>
date --help
</CODE></P>
<P>
would have given the solution, while
</P>
<P><CODE>
man date
</CODE></P>
<P>
just keeps this secret. Sob.
</p>
<P>
--
Regards, Fakir
</P>
<!-- end 10 -->
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="tips/11"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">How to manually label a tape in linux</FONT></H3>
Wed, 9 Jan 2002 10:18:29 +0530
<BR>FRANCO FERNANDES (<a href="mailto:linux-questions-only@ssc.com?subject=%20Re%3A%20%5BLG%2075%5D%202c%20Tips%20%2311%20date&20label&20tapes">franco from lauren.co.in</a>)
<br>Answered by Jay Ashworth (The Answer Gang)
<P><STRONG>
I manually backup my linux server every day for that i need to put a label
on my tape according to the date, I backup my server. Does anyone know how
to manually label a tape in linux is there any command for doing that.
</STRONG></P>
<P><STRONG>
Please help
<br>Thanks in Advance
<br>Franco.F
</STRONG></P>
<P>
Well, <EM>my</EM> approach to this is to create a directory called
<TT>/tmp/TIMESTAMP</TT>, and, just before you make a backup, clear out all the
files, then use
</P>
<P><CODE>
touch /tmp/TIMESTAMP/`date +%Y%m%d-%a%H%M%S`
</CODE></P>
<P>
This wlil give you a label for the backup which you can read without
having to actually load any data.
</P>
<P>
Cheers,
jra
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="tips/14"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">Problem faced while using script to backup</FONT></H3>
Wed, 9 Jan 2002 10:26:14 +0530
<BR>FRANCO FERNANDES (<a href="mailto:linux-questions-only@ssc.com?subject=%20Re%3A%20%5BLG%2075%5D%202c%20Tips%20%2314%20log%20backups">franco from lauren.co.in</a>)
<BR>answered by Dan Wilder (The Answer Gang)
<STRONG>
<P>
I have created a automated script to backup my server for that i want my
log file to display the date it backsup my server every day.
My script has this line ,
</P>
<pre>
echo " BACKUP OF fileserver STARTED " &gt;&gt;
/var/log/bkuplogs/fileserver/mainlog
</pre>
<P>
Is there any parameter which has to be put like %m %h %d.
Any kind of help will be highly appreciated
</p>
</STRONG>
<P>
Try
</P>
<P><CODE>
echo " BACKUP OF fileserver STARTED $(date +'%c') " &gt;&gt; whatever
</CODE></P>
<P>
See
</P>
<P><CODE>
man date
</CODE></P>
<P>
for other format strings.
--
Dan Wilder
</P>
<!-- end 14 -->
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="tips/15"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">Posters for [LG 72] help wanted #7</FONT></H3>
Fri, 28 Dec 2001 11:36:12 +0100
<BR>Yann Vernier, Chris Gianakopoulos, Jim Dennis (<a href="mailto:linux-questions-only@ssc.com?subject=%20Re%3A%20%5BLG%2075%5D%202c%20Tips%20%2315%20posters">The Answer Gang</a>)
<p>Brian Keyse (<a href="mailto:linux-questions-only@ssc.com?subject=%20Re%3A%20%5BLG%2075%5D%202c%20Tips%20%2316">bkeyse2 from yahoo.com</a>)
<P>
I feel I must recommend O'Reilly's "Anatomy of a Linux System" poster.
It is a large, colourful poster giving a rough overview of how things
fit together and recommending (O'Reilly, of course) books.
</P>
<P>
Their address is <A HREF="http://www.ora.com"
>http://www.ora.com</A> but I didn't find the poster in
their product list; it is probably promotional material which you'll
have to ask them for. -- Yann
</P>
<P><BLOCKQuote>It's available as a PDF file:
<br><A HREF="ftp://ftp.oreilly.com/pub/poster/oreilly_linux_poster.pdf"
>ftp://ftp.oreilly.com/pub/poster/oreilly_linux_poster.pdf</A>
<br>-- Brian Koyse
</BLOCKQuote></P>
<P>
I saw some sort of a thing like that for Linux. Is it 3 or 4 feet
in diameter and it shows the ring structure of the operating system?
You know..., the kernel in the middle, with the applications at the
outer ring? If that's the thing, it's kinda cool. I think that I
am gonna get one of those. -- Chris G.
</P>
<P><em>
Hmmm. The one I saw was just of the Linux kernel sources.
Core memory management and scheduler in the center and VFS
and core networking support forming a second tier, with
filesystems and specific device drivers on the periphery.
That one was a sort of a fractal star or "peacock." -- JimD
</em></P>
<P>
I'll have to look at the chart when I go back to work next week. There's a
book entitled "The Design of the Unix Operating System" by Maurice Bach.
The poster that I saw, for Linux, looks like the structure on the cover of
that book.
</P>
<P>
Regards,
Chris G.
</P>
<!-- end 19 -->
<P> <hr> </p>
<!-- *** BEGIN copyright *** -->
<H5 align="center">This page edited and maintained by the Editors
of <I>Linux Gazette</I>
<a href="http://www.linuxgazette.com/copying.html"
>Copyright &copy;</a> 2002
<BR>Published in issue 75 of <I>Linux Gazette</I> February 2002</H5>
<H6 ALIGN="center">HTML script maintained by
<A HREF="mailto:star@starshine.org">Heather Stern</a> of
Starshine Technical Services,
<A HREF="http://www.starshine.org/">http://www.starshine.org/</A>
</H6>
<!-- *** END copyright *** -->
<!--startcut ======================================================= -->
<P>
<CENTER>
<!-- *** BEGIN navbar *** -->
<IMG ALT="" SRC="../gx/navbar/left.jpg" WIDTH="14" HEIGHT="45" BORDER="0" ALIGN="bottom"><A HREF="lg_mail.html"><IMG ALT="[ Prev ]" SRC="../gx/navbar/prev.jpg" WIDTH="16" HEIGHT="45" BORDER="0" ALIGN="bottom"></A><A HREF="index.html"><IMG ALT="[ Table of Contents ]" SRC="../gx/navbar/toc.jpg" WIDTH="220" HEIGHT="45" BORDER="0" ALIGN="bottom" ></A><A HREF="../index.html"><IMG ALT="[ Front Page ]" SRC="../gx/navbar/frontpage.jpg" WIDTH="137" HEIGHT="45" BORDER="0" ALIGN="bottom"></A><A HREF="http://www.linuxgazette.com/cgi-bin/talkback/all.py?site=LG&article=http://www.linuxgazette.com/issue75/lg_tips.html"><IMG ALT="[ Talkback ]" SRC="../gx/navbar/talkback.jpg" WIDTH="121" HEIGHT="45" BORDER="0" ALIGN="bottom" ></A><A HREF="../faq/index.html"><IMG ALT="[ FAQ ]" SRC="./../gx/navbar/faq.jpg"WIDTH="62" HEIGHT="45" BORDER="0" ALIGN="bottom"></A><A HREF="lg_answer.html"><IMG ALT="[ Next ]" SRC="../gx/navbar/next.jpg" WIDTH="15" HEIGHT="45" BORDER="0" ALIGN="bottom" ></A><IMG ALT="" SRC="../gx/navbar/right.jpg" WIDTH="15" HEIGHT="45" ALIGN="bottom">
<!-- *** END navbar *** -->
</CENTER>
</p>
</BODY></HTML>
<!--endcut ========================================================= -->