Linux Gazette #24

:  ( ѱ۹ Ʈ )
http://kldp.linux-kr.org, cessi@kldp.linux-kr.org

2Ʈ¥  

 ϳ  
Date: Sun 30 Nov 1997 03:48:40 -0800(PST)
From: Gary Johnson gjohnson@season.com
̹    ˰  ִ    𸣰ڴµ,     Linux 
Gazette Ǹ  ٸ Ǿּ.
 ʴ  ַܼ ȭ ȯϸ ȭ鿡 ƹ͵ Ÿ 
 ǰ, Űε    ° ˴ϴ.     
 غʽÿ.

setterm -clear > /dev/tty12

Alt Ű F12Ű ÿ ų  츦 ϰ   Alt 
Ű Ctrl Ű, F12Ű ÿ   ˴ϴ.   ܼ(/dev/tty12)
 α μ ư  ʱ  Ư ϰ  ִ  
ϴ. 

 ķ
Date: Fri, 5 Dec 1997 00:55:55 -500
From: Joey Hess Joey@kitenet.net
 ϴ  ϱ ؼ   ķ͸   մϴ. 
׷ C:\> Ʈ  Ⱦ. ׷ ϱ⸦,  ķ
Ͱ   Ư ɾ ϵ ϰ ;   
½ϴ.  帮  ũƮ ٷ ׷  .  
κ ּ  . ʿ ־    ϰ ֽ
. ⺻ ̵ Ȩ 丮 dos_do.bat    
  Ͽ  ķͰ  ϱ⸦ ϴ ɵ   
, lredir ̿ؼ  ķͰ   Ȩ 丮  
 ã  ֵ ϴ .

#!/usr/bin/perl
# # This runs dosemu.# 
# Any parameters specified after  "--" will be passed  in to dosemu to 
be 
# run as dos commands.
#
# Setup: add to autoexec.emu:
#       lredir.com h: linux\fs\${home}
#       if exist h:\dos_do.bat call h:\dos_do.bat#
# GPL Copyright 1996, 1997 Joey Hess
# Split params into dosemu parameters and dos commands.
while ($a=shift @ARGV) {
        if ($a=~m/--/ ne undef) { last } 
        $dosemu_command_line.="$a ";}
$dos_command_line=join(' ',@ARGV);
$dos_command_line=~s/;/\r\n/g;

open      (OUT,">$ENV{HOME}/dos_do.bat")     ||      exit     print 
"$ENV{HOME}/dos_do.bat:
$!";
if ($dos_command_line) {
        print OUT "$dos_command_line\r\n"; # note dos CR LF
        print OUT "exitemu\r\n";
        }
close OUT;
system "/usr/bin/dos $dosemu_command_line";
unlink "$ENV{HOME}/dos_do.bat";

Re: "find ؼ ϴ  ãƳ"
Date: Wed, 03, Dec 1997 16:03:30 +0100
From: Mike Neuhauser mike@gams.co.at
Jon Rabone, jkr@camcon.co.uk   12ȣ Linux Gazette 
  ϴ.
>1997 10 Linux Gazette Dave Nelson 
>grep ϴ ڿ ϴ  ̸ 
>Ÿ  ֵ   ߾.
>
>find . -type f -exec grep "string" /dev/null {} \;
>
>̰  Ͽ ؼ grep ϴµ   ª ȿ 
 ֽϴ.
>
>grep "string" 'find . -type f'
>
>  ǿ ´         
 
>    ִٴ Դϴ.

  ÷ο츦 ϱ ؼ   Ͻʽÿ.

        find . -type f | xargs grep "string"

   ̸    (touch  "test file" ϰ 
'ls' Ȯ ʽÿ.)    ֽϴ.  ̷  ذ
 ؼ

        find . -type f -print0 | xargs -0 grep "string"

find ɺ ũ  丮 ؼ ⺻  ˻ ǽ 
 -follow ɼ ؾ  쵵 ִٴ  ˾ μ.

Re:find ̿ؼ ϴ  ãƳ
Date: 5 Dec 1997 17:47:50 -0000
From: Dale K. Hawkins khawkins@mines.edu
 ϰ ִ   ϴ.

        find . -type f -exec grep "string" /dev/null {} \;

׷  ģ    ˷ ִ. ſ  ̾
ϴ.

        find . -type f | xargs fgrep "string" /dev/null

  Ź ο grep  μ  ʾƵ ȴٴ   
. 
׷     ֽϴ.   غ.

        locate $PWD | grep "^$PWD" | xargs fgrep "string" /dev/null

     grep Ź ǰ,  丮 ؼ 
grep ȴٴ  . 

locate $PWD | grep "^$PWD" |xargs -ifilename sh -c \
  "if [ -f filename ]; then echo filename; fi " | \
  xargs fgrep "string" /dev/null

  ô ںе: lesspipe.sh ġǾ ִٸ ѹ . 

find ϴ  ãƳ  ° ̾߱
Date: Thu, 11 Dec 1997 17:12:46 +100(MET)
From: Axel Dietrich Axel.Dietrich@newroinformatik.ruhr-uni-bochum.de
>Linux Gazette 1997 10ȣ Dave Nelson 
>
>find . -type f -exec grep "string" /dev/null {} \;
>
> ߾ϴ.
Jon Rabone " ª ȿ"   ϴ.

grep "string" 'find . -type '

     ÷ο   ʿ  
 ֽϴ.

find . -type f -exec grep -l "string" {} \;

'-l' ɼ grep "string" ϴ ϸ Ÿ ݴϴ. 
  ˻ Ư ϵ鿡 ؼ ϱ ؼ  -type -name 
ɼ .   .

find . \( -type f -name "*\.html" \) -exec grep -l "string" {} \;

̰ html Ȯڸ   Ͽ ؼ "string" ϴ 
˾ƺ ϰ ִ ϸ  ݴϴ.

/Axel

find   ˾ƺ?
Date: Tue, 16 Dec 1997 14:12:57 +100 (MET)
From: Alexander Larsson alla@lysator.liu.se
1997 12 Linux Gazette  Jon Rabone     ߾
.
------------------------------------------------------------
-----------
̰  Ͽ ؼ grep ϴµ  ª   
ֽϴ.

grep "string" `find . -type f`

׷ ˾Ƶξ   ǿ ´ ϵ     
 ÷οɼ ִٴ Դϴ.
------------------------------------------------------------
-----------
̰ͺ     .

find . -type f | xargs grep "string"

   ۰    ο grep μ   
ݴϴ.

find ̿ϴ ϳ 
Date: Sat, 27 Dec 1997 12:06:47 -0500
From: rchandra@letter.com
 ǵǰ ִ " 丮 ִ ϵ鿡 ؼ grep 
  ִ°?"ϴ      ſ ϱ 
 ˻ ǽϴ 丮 ̳ʸ    쿡 ͹
  ϴ     ֽϴ. ֳϸ ̳ʸ 
   ڵ(Control Characters) ͹̳ ׷   
  ֱ Դϴ.  ̷ Ǿ  ͹̳ ٽ ٷ
  ֱ  ƹ    ׷    
ó ϴ   .

 ȭ鿡 ü  ڵ   ֺô. ·  
      .

sed -e 's/[^-~][^-~]*/ /g'

  ȭ鿡 µɼ  () ڵ ׳ ̽ ٲ 
ϴ.     ̿ϸ  ٸ  ɾ ؼ 
  ֽϴ.      ũƮ ֽϴ.   ̰ 
grepfind ̸ٿ ϰ .

#!/bin/sh
#save this in a file called grepfind and do a "chmod 755 grepfind"
#
if test $# = 0 -o "$1" = "-h" -o "$1" = "--help" ; then
echo ' grepfind -- recursively descends directories and egrep all files '
echo ''
echo      '      Usage:       grepfind      [--help][-h][start_directory] 
egrep_search_pattern'
echo ''
echo ' The current directory is used as start_directory if parameter'
echo ' start_directory is omitted. The search is case insensitive.'
echo '  Multiple occurrences  of control  characters are  replaced by  a 
single'
echo '  space. This  makes  it possible  to grep   around in files  that 
contain'
echo ' binary data and strings without setting the terminal accidently '
echo ' to graphics mode.'
echo ''
echo ' Example: grepfind /home "hello world" '
else
if [ "$2" = "" ]; then
find .  -type f  -exec  egrep -i  "$1" /dev/null  {}  \; |  sed -e   's/[^ 
-~][^-~]*/ /g'
else
if [ -d "$1" ];then
    find $1  -type f  -exec  egrep -i  "$2" /dev/null   {} \; |  sed  -e 
's/[^-~][^ -~]*/ /g'
else
    echo "ERROR: $1 is not a directory"
fi
fi
fi
#__END__OF_grepfind


Re: ּ
Date: Sun, 7 Dec 1997 14:25:25 +0100(MET)
From: Roland Smith rsmith@ibm.net

Javier,
  Linux Gazette翡  Դϴ.
 MOZILLA(ݽ) Ǿ ִ 丮  ȯ  
 Ͽ Ѵٰ ϼ̾.
ΰ  ֽϴ. 
'export MOZILLA_HOME=/usr/local/netscape' ǻͰ Ź  ǻͰ 
۵   ְų Ȥ /etc/profile ϸ ˴ϴ. 
 bash ۵  о Դϴ.  Ͽ   
 ߰ϼ.(ݽ /usr/local/netscape丮 ġǾ 
ٰ մϴ.)

MOZILLA_HOME=/usr/local/netscape
export MOZILLA_HOME

  Ŵ  Ͽ ݽ   ġ 
־ ݽ  Ŵ ϴ ٳ ޴ ٷ 
̿  ֽϴ. ̰ ϴ  Ŵ  Ʋ.
 fvwm2-95 ϽŴٸ     Ȩ 丮 ִ 
.fvwm2rc95Ͽ ߰ ּ.

#add to this menu
AddMenu "Utilities" Title
+ "Netscape%mini-sacape.xpm% Exec netscape -geometry 931x683+54+9 
&


 ʴ ϵũ ȸӵ ̱
Date: Mon, 08 Dec 1997 14:21:31 -0500
From: Peter S Galbraith galbraith@mixing.qc.dfo.ca
Linux Gazette 12ȣ   ϵ ũ ȸ ӵ ̱  ؼ 
hdparm  ϴ  ־. ̰   SCSI  ϵ 
ũ    ҽϴ.

bash-2.01#hdparm -S6 /dev/sdb

/dev/sdb:
 operation not supported on SCSI disks

ŸԵ SCSI ϵ ũ hdparm   ۵ ʴ±.(
      ̻?)

 ũƮ
Date: Mon, 15 Dec 1997 20:49:53 -0600 (CST)
From: Corey G cgaff@interaccess.com
   ǻͰ  ͳݿ ִ äο ڸ   
մϴ. 翬 ̽ð  Ȥö Ŀ   ǻͿ ħ ʾ
  . ׷   (root)    ð  
ο μ ߴ θ  ˼ ִ α׷  ߾
. 
 ũƮ ̷  Ǵ Դϴ.   ̰Ͱ  ٸ 
Ư α׷ ִ    ũƮ   ׽Ʈ
    ϴ.   ũƮ  ǻ͸ ϰ 
  ϸ    ֽϴ. 

 ϴ°?
 ũƮ ó   Ǵ  μ  ˾Ƴ
 ӽ Ͽ ϴ. ⺻ 10ʰ   ο μ 
Ǿ ӽ    ؼ ˾Ƴ .  ̷ ο 
μ ' 'μ ƴϸ ﰢ killǴ ̴ϴ. 

:
root αϿ ũƮ մϴ.  ׷ 켱 ڵ   
   丮   Դϴ.   ⼭      
("TRUSTED_ITEMS", "TRUSTED_USERS") ߽ϴ.    
Ư α׷̳ Ư  ο μ ϴµ  ƹ 
  ϱ  ؼԴϴ.     α׷  (: 
xterm  "xterm" "bash" ÿ(bash  ϰ  ) 
 ־ ) ϳ ̻ α׷   ־ Ѵٴ Դ
.

: ũƮ ׽Ʈ  ߿ ۾   ʰ ֳ Ȯ
 . 

 ũƮ ϱ ؼ: nohup ./secmach &

  ũƮ Ű ͽϴ.   ̳ Ͻ  
ø  ڿ  ּ. 

#!/bin/sh
# Secmach - security program
# v1.0  12-14-97
# By: Corey Gaffney

export PATH=/usr/bin:/bin:/sbin

COUNTER=0
LOCATION=/usr/secmach
CHECK_TIME=10
TRUSTED=/usr/secmach/trusted
UNTRUSTED=/usr/secmach/untrusted
DIFFKILL=/usr/secmach/diffkill
TRUSTED_USERS="johndoe"
TRUSTED_ITEMS="$TRUSTED_USERS|pppd|chat|netscape|xterm|egrep|
ps|sed|secmach|awk"

if [ ! -s $LOCATION ]
        then
        mkdir $LOCATION
        chmod 700 $LOCATION
        fi

while :
do
COUNTER=`expr $COUNTER + 1`
if [ $COUNTER -eq 1 ]
        then
        ps -aux | sed -e '1d' | awk '{print $2}' > $TRUSTED
fi
        sleep $CHECK_TIME

ps -aux | sed  -e '1d' |  egrep -v $TRUSTED_ITEMS  | awk '{print 
$2}' >
$UNTRUSTED
        diff $TRUSTED $UNTRUSTED > $DIFFKILL
        KILL=`grep ">" $DIFFKILL | awk '{print $2}'`
        kill -9 $KILL
done

cron.hourly ϱ
Date: Sun, 21 Dec 1997 10:36:16 -0500 (EST)
From: Jeff Johnson jbj@JBJ.ORG
Gary Turkington :
> ""     ˰ ִµ  ʳ׿.
> ϸ cron.hourly  root fortune޽     
 ?
> ̰ Ϸ翡 ѹ̾  δ㽺 ʾҴµ
>5.0 ׷̵ϰ  Žð  ׷׿....
>̷ ͵  Ը :-)
cron.hourly   ȴϴ.
1)cron Žð  root ڰ ۾ Ѵ.
2) ۾ ϱ ؼ  ȣۿ ϴ( stdin/stdout
 tty Ǿ  ʰ cron  Ǿ ִٴ )  
ȴ.
3)  ʱȭ  оδ. : /etc/profile, ~/.bashrc 
4)ʱȭ ϵ fortune Ѵ.
5)۾ ȴ.
6)cron ȭ鿡    ߰ϰ root  .

  ذϱ ؼ    ʱȭ Ͽ fortune ϵ
  ξ ˾Ƴ  fortune  ϰ ϰų  fortune 
 ȣۿ ϴ  Ҷ ۵ ʰ ϸ ˴ϴ.



The Answer Guy

ݽ   ʽϴ.
From: Jim Kelly, the-jim@swbell.net
 ݽ Ŀ´ 4.04     ýۿ 
 Խϴ. ׷ ʹ  ο   Գ üũ غ
 ο ׷ ֳ üũ ⸸ ϸ α׷ ߴܵǾ 
׿. ׷  4.04  ٽ  ġ . ׷ ε 
 ϸ ?

 ݽ 4.04  ̴ٸ Ȩ 丮  .netscape 丮 
 ̳? 
ٸ ڷ αϼż Ͻ  ϱ? ٸ  α
 Ͻðų  ٸ   α׷   ̴?(elm, 
pine, emacs'mh, tin, nn, trn, gnus)
Ƹ   ջ ʾҳ Ǵµ.  α׷ 
 Է    츦    Խϴ.  ׷ 
Ʈ  / α׷ Ѵϴ.(emacs' mh-e  Gns)

 ּ
From: Ralph, RPMAXEDGE@aol.com
ּ!!!
  3.2 ġ߰,    Ǵ  Ҵµ root 
н带 ٲٰ    ߻߱.     
 ٲ нδ α ȵ˴ϴ. ׷   Ʈ 丮 
Ʈؼ /etc/shadow ִ  н带  ϴµ  
 ʳ׿.  SCSI ϵ ũ sda1, sda2  ؼ  ġ
ϴ.   ذϴµ    ִ Ʈ ֽŴٸ  
ϰڽϴ. 

 ֱٿ    غ ʾ  Ϲ  
 ϴ.
̷ (root н н)      (
   ̻ Ͻ  ٸ   ص ) Ʈ 
 ִ Ƽ Ʈϸ  ˴ϴ. ׸    ϴ 
 ϸ . 
 Ѱ Ӽ н     chroot ٷ 
ϴ ̴ϴ. ⺻     Ʈ   
ϴ.

cd /mnt/oldroot/ && usr/sbin/chroot . bin/sh

׸:

passwd

(     passwd     ְ   ݴϴ.  ׸ 
(chroot)/etc 丮 н  Ʈϵ  ݴϴ.)
  ϱ ؼ Ʈ Ƽ ٸ  ϳ   
 /etc 丮 Ʒ   ī δ  ϴ. 


 PDT ϱ

From: Karl Rossing, gtivr6@pangea.ca

 PDC(Primary Domain Controller) NIS/NIS+   
 ϱ

95/NT  NIS/NIS+  ̿Ͽ     
 ִ  ִ  ˰ ͽϴ.  ڸ  Ź NT 
ϴ  ʹ ǰ ̳׿. Ȥ   κ  Ʈ
 ִ ˷ֽø ϰڽϴ.

   ϱⰡ Ƴ׿.  ϸ MS Ŭ̾Ʈ ӽŵ
(95 or NT)  ׼      ̿ 
        䵥   GINA(Graphical  Identification  and 
Authentication) NTֿܼ α ϴ  NT DLL ̿  
ֽϴ.  GINA    ִµ Novell NDS  
 ͵ ְ MIT kerberos  ؼ  ͵   AFS 
ϱ  ͵ ֽϴ.  URL  ϴ.

NT GINA: http://web.mit.edu/cartel/ntgina.html --  very informative -- 
leads to all the rest that I found. 

ND_GINA(NT               ִ     ϳ     GINA): 
http://www.nd.edu/~dobbins/ntarch/nd_gina_doc.html 

NT/UNIX : http://www.arch.usyd.edu.au/~doug/gina.html 

GINA  95 ۵ ʴ  ٴ Դϴ. 

н带 ȭ ϴ  ؼ  ״  Ⱑ    
ϴٸ 丮 񽺶    ؼ   
  ֽϴ.    ϴ ְ. ̷   
ؼ Cygnus  鼭 ϳ ߰  ֽϴ.

http://www.cygnus.com/product/unifying-security.html

̿ܿ غ  ִ ͵δ 

Microsoft's WINS (and its PDC/BDC domain model) 
Kerberos and Cygnus Kerbnet 
NIS/NIS+ 
RADIUS/TACACS 
LDAP (lightweight directory access protocol) 
Netware NDS, Banyan StreetTalk, etc. 
Host based security -- custom synchronization 
scripts. 

 . δ    ʽϴ.  NIS/NIS+ ַ 
NFS  ̰  Kerberos AFS/DFS/CODA  յǾ Դϴ. 
CIFS/SMB filesharing   ̾   񽺳 WINS 
  ֽϴ.
ü  CODA   ̶ ϰ ֽϴ. CODA 
 ڼ   ϸƮ Ͻʽÿ.
http://www.coda.cs.cmu.edu/maillist/linux-coda/0175.html

 Samba     Ŭ̾Ʈ   
 ֵ ϱ  Ѵٰ  ϰڽϴ. Samba META-FAQ 
о   linux Samba ̿ؼ ü Ʈũ 
   ִٰ  ִ     ̴ϴ. 

Samba:  
http://samba.anu.edu.au/samba/docs/smb_serv/html/smb_se-4.html#ss4.1
Samba: Samba  HOWTO
http://samba.anu.edu.au/samba/docs/smb_serv/html/smb_se.html

(     Ŷ ٴ μ 'н ' 
  մϴ. ̰ NTý Ŭ̾Ʈ   䱸 
ϱ  PDC/BDC(Backup  Domain Controller)μ     
  ǹϴ    ֽϴ.)
̷ ƹ LDAP Kerberos NT ٸ  OS, Ű鿡 
Ǹ鼭  ֵ  ̶ Ǵµ    
 󰡴  ƴ϶ ׷ Ǵ ͵  Դϴ.
   LDAP(丮  ) Kerberos( ), 
  ڽŵ  ȿ '' Ƿ   ̱  
 ٸ ¸   ִٴ Դϴ. ׵() ƹ ڽŵ 
ý ȣ 뼺 ؼ     ϰ κ 
ڽŵ ý ٸ  Ǵ  Ʈ  α׷ӵ鿡 
  ֵ ϱ   'Ȯ强' ؼ      
  Һ ϱ .
  ý ڵ ϵ 丮 񽺿   
 ޵ ϱ ؼ    ð  ʿϴٰ ϴ. 
 ׿ Ȼ   ⼭ Ƣ.(н 27
  ׷   ԰ NT  ׷  ݿ 
̸ ٽ ְ ִ.)
׵ 츮  ٸ  ( ׷, ū   )  
 ϴ   Ʈũ α׷   Դϴ. 
  , ݱ      ̹ 
 Ǹŵǰ ִٴ Դϴ. ý       
 ٰ ִ .
