ace3@midway.uchicago.edu
dd if=/dev/hda8 of=/etc/dosswap
gzip -9 /etc/dosswap
mkswap /dev/hda8 XXXXX
swapon -av
Sigoyreyteite oti pros8esate mia grammh gia to swap partition sto arxeio /etc/fstab
swapoff -av
zcat /etc/dosswap.gz | dd of=/dev/hda8 bs=1k count=100
# Note that this only writes the first 100 blocks back to the partition. I've found empirically that this is sufficient
>> Poia einai ta pleonekthmata kai ta meionekthmata gia to parapanw;
Pleonekthma: ejoikonomeite oysiastiko xwro apo to disko sas.
Meionekthma: an to bhma 5 de ginetai aytomata, prepei na 8ymh8eite na to kanete me to xeri, kai epibarunei th diadikasia ekkinhshs kata ena nanosecond :-)
michael@actrix.gen.nz
Na ena tryk poy eprepe na xrhsimopoihsw merikes fores.
undelete arxeioy keimenoy gia apelpismenoys.
An kata la8os sbhsate ena text arxeio, gia paradeigma, kapoio email, h ta apotelesmata mias olonuxtias programmatistikhs synedrias , mporei na mh xa8hkan ola. An to arxeio poy ftiajate sto disko, htan ekei p.x gia perissotero apo 30 deyterolepta, mporei ta periexomena toy na briskontai akomh sthn katatmhsh toy diskoy.
Mporeite na xrhsimopoihsete thn entolh grep gia na cajei to raw disk partition gia ta periexomena toy arxeioy.
Gia paradeigma, prosfata, esbhsa kata la8os ena kommati enos email. Etsi, stamathsa amesws opoiadhpote energeia poy mporouse na metaballei to partition: se ayth thn periptwsh apla apefyga na apo8hkeusw arxeia h na kanw metaglwttish (compile) klp. Se alles periptwseis, mphka pragmatika ston kopo na katebasw to susthma se single user mode, kai na apodesmeusw (unmount) to susthma arxeiwn.
Xrhsimopoihsa tote thn entolh egrep sto partition toy diskoy: sthn periptwsh moy to email mhnyma htan sto /usr/local/home/michael/, etsi apo to output toy df, eida oti hmoyn sto /dev/hdb5
sputnik3:~ % df
Filesystem 1024-blocks Used Available Capacity Mounted on
/dev/hda3 18621 9759 7901 55% /
/dev/hdb3 308852 258443 34458 88% /usr
/dev/hdb5 466896 407062 35720 92% /usr/local
sputnik3:~ % su
Password:
[michael@sputnik3 michael]# egrep -50 'ftp.+COL' /dev/hdb5 > /tmp/x
Twra eimai yperbolika prosektikos otan paizw me tis katatmhseis twn diskwn, etsi stamathsa na bebaiw8w oti katalabainw th suntajh ths entolhs PRIN na pathsw to plhktro return. Se ayth thn periptwsh to email perieixe th lejh 'ftp' akoloy8oumenh apo kapoio text poy to akoloy8ouse to 'COL'. To mhnyma htan peripoy 20 grammes, etsi xrhsimopoihsa to -50 gia na ferw oles tis lejeis gurw apo th frash. Sto parel8on eixa xrhsimopoihsei to -3000 gia na eimai sigoyros oti 8a parw oles tis grammes apo kapoio phgaio kwdika. Kateu8yna thn ejodo ths egrep se ena diaforetiko partition diskoy- etsi apefyga na gracw panw apo to palio mhnyma poy ecaxna.
Meta xrhsimopoihsa thn entolh strings gia na me boh8hsei na ejetasw thn ejodo
strings /tmp/x | less
To email htan pragmatika ekei.
Ayth h me8odos den einai gia na basisteite se ayth, olos, h meros, toy xwroy toy diskoy mporei na exei hdh janaxrhsimopoih8ei.
Ayto to tryk einai pi8ana xrhsimo mono se systhmata poy doyleuei enas xrhsths. Se systhmata pollaplwn xrhstwn me ychlh drasthriothta diskoy, o xwros poy eley8erwsate mporei na exei hdh xrhsimopoih8ei. Akomh perissotero, den mporoume na trabame to xali katw apo toys xrhstes mas ka8e fora poy xreiazomaste na anakthsoyme ena arxeio.
Sto susthma poy exw spiti, ayto to tryk fanhke boliko se treis peripoy periptwseis ta teleytaia xronia - synh8ws otan sbhnw tyxaia merikes meres doyleias. An o,ti doyleuw ftanei se ena shmeio opoy niw8w oti exw kanei shmantikh beltiwsh, kanw antigrafo asfaleias se ena floppy, etsi de xreiazomai ayto to tryk kai polu syxna.
jadestar@rahul.net
Xrhsimopoihsete to sta8ero Flag
Amesws molis egkatasthsete kai ry8misete to susthma sas phgainete sta /bin, /sbin/, /usr/bin, /usr/sbin kai /usr/lib (kai merika of the other usual suspects kai kante gennaiodwrh xrhsh ths 'chattr +i entolhs'. Epishs pros8este ta arxeia toy pyrhna sto root. Kante 'mkdir /etc/.dist/' antigracte ta ola apo to /etc/ on down (ayto to kanw se duo bhmata xrhsimopoiwntas to /tmp/etcdist.tar gia na apofugw thn anadromh) se ekeino ton katalogo. (Proairetika mporeite na dhmioyrghsete to /etc/.dist.tar.gz) -- kai na to markarete sa sta8ero.
O logos gia ola ayta einai na elattwsoyme th zhmia poy mporei na prokalesete an mpeite san root. De 8a gracete panw apo arxeia me ena telesth anakateu8ynshs (redirection operator) stray, kai de 8a kanete to susthma axrhsto me ena stray keno se mia entolh 'rm -fr' (mporeite akomh na kanete polles zhmies sta dedomena sas -- alla oi biblio8hkes kai ta ektelesima 8a einai pio asfalh.
Ayto epishs kanei ena plh8os problhmatwn asfaleias kai arnhshs ejyphrethshs (denial of service) eite adunato eite pio duskolo na dhmioyrgh8oun (mia kai polloi basizontai sto na gracoyn panw apo ena arxeio mesw twn leitoyrgiwn kapoioy programmatos SUID poy *den parexei mia ay8aireth grammh entolwn*).
O monos mpelas se ayto einai otan xtizete ton pyrhna kai kanete 'make install' se diafora eidh ektelesimwn toy systhmatos. Apo thn allh, empodizei epishs to 'make install' na grafei panw apo ta arxeia. Otan jexasete na diabasete to Makefile kai na kanete chattr -i ta arxeia poy prokeitai na graftoun apo panw (kai oi katalogoi stoys opoioys 8elete na pros8esete arxeia) -- to make apotygxanei, xrhsimopoieite apla thn entolh chattr kai to janatrexete. Mporeite epishs na arpajete ayth thn eykairia gia na metaferete ta palia sas bin's, lib's, h otidhpote se ena katalogo .old/ h na toy allajete onoma h na ta kanete tar h oti allo.
jadestar@rahul.net
Ola ta nea arxeia mpainoyn katw apo to /usr/local! h /usr/local/`hostname`
An h dianomh sas afhnei to /usr/local adeio tote dhmioyrghste to /usr/local/src, /usr/local/bin klp. kai xrhsimopoihste ta. An h dianomh sas egka8ista programmata sto dendro /usr/local tote mporei na 8elete na kanete 'mkdir /usr/local/`hostname`' kai na dwsete to 'wheel' group +w se ayto (to kanw epishs SUID kai SGID gia na ejasfalisw oti ka8e melos toy wheel group mporei na anakateuetai me ta dika toy arxeia apo ekei kai katw, kai oti ola ta arxeia poy dhmioyrgh8hkan 8a anhkoyn sto 'wheel' group.
Twra pei8arxhste ton eayto sas kai *PANTA! PANTA! PANTA!* balte ta nea paketa katw apo to /usr/local/src/.from/$OPOY_TA_EBAĻA/ (gia ta .tar h opoiadhpote arxeia) kai xtiste ta katw apo to /usr/local/src (h .../$HOSTNAME/src). Sigoyreyteite oti egka8istatai katw apo thn topikh ierarxia. An *prepei ypoxrewtika* na egkatasta8ei pisw sto /bin h /usr/bin h kapoy allou -- balte ena symlink apo thn topikh ierarxia se ka8e stoixeio toy apo na to balete opoydhpote allou.
O logos gi' ayto -- akomh ki an apaitei perissoterh doyleia -- einai oti boh8a na apomonwsete o,ti prepei na ginei antigrafo asfaleias kai restore h na janaegkatasth8ei se periptwsh plhroys epanegkatastashs apo ta distribution media (synh8ws CD stis meres mas). Xrhsimopoiwntas to /usr/local/.from directory mporeite na krathsete ena anepishmo hmerologio (log) apo poy proerxontai oi phgaioi kwdikes -- to opoio boh8aei otan caxnete gia nees anaba8miseis -- kai mporei na einai polu apofasistiko otan kanete monitore tis listes anakoinwsewn sxetika me asfaleia.
E-na apo ta systhmata moy sto spiti (ayto apo to opoio me to opoio kanw kai tis syndeseis moy) synarmologh8hke prin na yio8ethsw ayth thn taktikh gia ton eayto moy. Akomh de "gnwrizw" oles tis diafores apo to susthma poy afhnetai "opws egkatasta8hke". Ayto einai para to gegonos oti exw kanei polu liges ry8miseis sto susthma toy spitiou moy kai eimai to *mono* atomo poy to xrhsimopoiei.
Anti8eta, ta systhmata poy exw sthsei sth doyleia (otan apekthsa ekei to rolo toy diaxeiristh systhmatos) exoyn ola ry8mistei me ayton ton tropo -- exoyn diaxeiristei apo pollous anadoxoys kai alloys an8rwpoys toy MIS, kai ekanan ena megalo ari8mo anaba8misewn kai egkatastasewn paketwn. Exw mia polu kalh idea gia to poia akribh stoixeia topo8eth8hkan sto susthma *meta* thn arxikh egkatastash kai ru8mish.
dossey@ou.edu
Parathrhsa merikes yperbolika duskoles h mh aparaithtes diadikasies poy proteinontai sto tmhma 2c tips toy teuxoys 12. Mia kai einai perissoteres apo mia, tis stelnw se sena:
#!/bin/sh
# lowerit
# convert all file names in the current directory to lower case
# only operates on plain files--does not change the name of directories
# will ask for verification before overwriting an existing file
for x in `ls`
do
if [ ! -f $x ]; then
continue
fi
lc=`echo $x | tr '[A-Z]' '[a-z]'`
if [ $lc != $x ]; then
mv -i $x $lc
fi
done
Wp, ayto einai megalo script. De 8a egrafa tetoio script gia na kanw ayto.
Anti8eta, 8a xrhsimopoiousa ayth thn entolh:
for i in * ; do [ -f $i ] && mv -i $i `echo $i | tr '[A-Z]' '[a-z]'`;
done;
sth grammh entolwn.
O an8rwpos poy ekane ayth th syneisfora, leei oti egrace to script me ayto ton tropo wste na einai katanohto (deite parakatw).
Sthn epomenh ypodeijh, ayth sxetika me thn pros8hkh kai diagrafh xrhstwn, o Geoff ta paei mia xara mexri to teleytaio bhma. Epanekkinhsh; Wx, elpizw na mh xreiazetai epanekkinhsh toy systhmatos ka8e fora poy diagrafei ena xrhsth. O,ti xreiazetai na kanete einai ta duo prwta bhmata. Ti eidoys diergasies 8a exei afhsei o xrhsths, allwste; Ena irc bot; Skotwste tis diadikasies apla me thn
kill -9 `ps -aux |grep ^<username> |tr -s " " |cut -d " " -f2`
Paradeigma, to username einai foo
kill -9 `ps -aux |grep ^foo |tr -s " " |cut -d " " -f2`
Twra poy frontisame ki ayto, as proxwrhsoyme sto jexasmeno kwdiko toy root.
H lush poy dinetai sto Gazette einai h pio koinh, alla oxi kai h pio eukolh. Me to LILO kai to loadlin, mporeite na dwsete thn parametro gia boot se periballon enos xrhsth (single) gia aytomath ekkinhsh sto proka8orismeno shell xwris login h password prompt. Apo ekei, mporeite na allajete h na afairesete passwords prin na gracete "init 3" na jekinhsete se katastash pollaplwn xrhstwn (multiuser mode). Ari8mos Epanekkinhsewn: 1 Me ton allo tropo Ari8mos Epanekkinhsewn: 2
Justin Dossey
jadestar@rahul.net
Dhmioyrghste kai synthrhste ena /README.`hostname` kai/h ena /etc/README.`hostname` [H pi8ana /usr/local/etc/README.`hostname` -Maint. ]
Opwsdhpote, krathste shmeiwseis apo *thn prwth mera* ths diaxeirishs toy systhmatos se ena online log arxeio. Mporeite na ftiajete ena vi /README.$(hostname). Mia grammh sto arxeio toy root /bash_logout. Enas allos tropos na to kanete ayto einai na gracete su h ena sudo script poy kanei kati san to parakatw:
function exit \
{ unset exit; exit; \
cat ~/tmp/session.$(date +%y%m%d) \
>> /README.$(hostname) && \
vi /README.$(hostname)
}
script -a ~/tmp/session.$(date +%y%m%d)
/bin/su.org -
(xrhsimopoihste thn entolh typescript gia na dhmioyrghste ena session log kai dhmioyrghste mia synarthsh poy 8a pros8etei kai 8a enhmerwnei aytomata to log).
Paradexomai oti den exw ylopoihsei ayto thn politikh aytomaths enhmerwshs -- exw basistei ws twra sthn aytopei8arxia moy ws twra. Parolayta, exw paijei me ayth thn idea (mexri to shmeio na ftiajw ena protypo deigma (prototype) twn scripts kai twn shell synarthsewn opws tis blepete). Ena pragma poy me krataei einai h idia h 'script' entolh. Nomizw oti 8a prepei na parw ton kwdika kai na pros8esw dyo parametroys sth grammh entolwn (gia na diakoptw/stamatw to script na katagrafei apo th grammh entolwn) prin na desmeytw oti 8a to xrhsimopoiw).
H teleytaia moy protash (gi' ayto to guro):
To path toy Root 8a prepei na periexei to 'PATH= /bin'
Ayta kai tipota allo sto path toy root. O,ti kanei o root parexetai apo ena symlink apo to /bin h apo ena alias h shell roytina, h einai ena script h ena ektelesimo sto /bin, h grafetai me to plhres path.
Ayto kanei ton ka8ena poy trexei san root na gnwrizei (merikes fores epwdyna) poso empisteuetai ta ektelesima. O gnwstikos admin enos host pollwn xrhstwn 8a koitaei periodika mesw toy dikou toy /bin kai twn arxeiwn /.*history caxnontas patterns kai para8yra.
O pragmatika drasthriopoihmenos admin 8a entopisei akoloy8ies poy mporoun na aytomatopoih8oun, merh sta opoia elegxoi mporoun/prepei na eisax8oun , kai diadikasies gia tis opoies "root" ta dikaiwmata 8a prepei na apofeyx8oun proswrina (h ektelesh diaforwn epejergastwn, MTA's kai alla megala dialogika (interactive) programmata me periploka xarakthristika scripting ta opoia *mporei* na enswmatw8oun se diafanh arxeia h arxeia dedomenwn -- opws to aisxro vi ./.exrc kai to emacs ./.emacs kai to akomh perissotero upoylo $EXINIT kai oi enswmatwmenes makroentoles epikefalidwn (header/footer macros)). Fysiologika oi entoles aytou toy tupoy mporoun na trejoyn me kati san:
cp $data $some_users_home/tmp
su -c $origcommand $whatever_switches
cp $some_users_home/tmp $data
(...opoy oi leptomereies ejartwntai apo thn entolh).
Aytes oi teleytaies kyriws profylajeis yperbolikes gia to spiti h to "single" sta8mo ergasias toy xrhsth -- alla einai polu kalh taktikh gia th diaxeirish enos systhmatos pollaplwn xrhstwn -- eidika gia ena susthma dhmosia ekte8eimeno (opws ayto sto netcom).
a.triulzi@ic.ac.uk
/usr/bin/X11/xdm
exec /usr/bin/X11/X -indirect hostname
Ayto to pros8esa otan prospa8ousa apegnwsmena na to egkatasthsw gia to diko moy subnet edw xreiasthke peripoy mia bdomada gia na kateynasw ola ta problhmata.
Proeidopoihsh: me to palio SLS (1.1.1) gia kapoio logo mporeite na afhste ena -nodaemon meta th grammh xdm -- ayto DE doyleuei gia metagenesteres ekdoseis.
Gia sxolia, parathrhseis, dior8wseis, enhmerwseis peri ths Ellhnikhs metafrashs aytou toy HOWTO, steilte email sthn Boula Sanida : voulariba@hellug.gr h ston Eyripidh Papakwsta : evris@hellug.gr kai enallaktika : ep@rocketmail.com