Next Previous Contents

8. Ry8miste to Linux mhxanhma sas san NCP pelath (client).

An eiste xrhsths enos diktuoy diaforetikwn texnologiwn poy syndyazei kai ta dyo, IP kai IPX, prwtokolla einai pi8anon oti kapoia stigmh 8a 8elete to Linux na prospelaunei dedomena apo8hkeymena se ena diakomisth arxeiwn Novell toy diktuoy sas. H Novell exei prosferei ena paketo NFS server gia toys diakomistes arxeiwn, poy to kanei dynato, alla an eiste ena mikro site h exete mono enan mikro ari8mo an8rwpwn poy endiaferontai na to kanoyn ayto, einai duskolo na dikaiologhsete to kostos toy emporikou paketoy.

O Volker Lendecke <lendecke@namu01.gwdg.de> exei gracei ena Linux module gia systhmata arxeiwn poy yposthrizei ena yposunolo toy Novell NCP poy 8a sas epitrecei na prosarthsete diskoys Novell sto susthma arxeiwn toy Linux sas xwris na apaitountai pros8eta proionta gia ton diakomisth arxeiwn sas. o Volker onomase to paketo ncpfs kai apespase tis aparaithtes plhrofories kyriws apo to biblio "Netzwerkprogrammierung in C" toy Manfred Hill kai Ralf Zessin (perissoteres leptomereies toy biblioy periexontai mesa sto README arxeio sto paketo ncpfs).

To logismiko kanei to Linux na prosomoiazei me ena fysiologiko sta8mo ergasias Novell gia yphresies arxeiwn. Akomh symperilambanei mia mikrh ektypwtikh efarmogh poy sas epitrepei na typwsete se oyres ektupwshs Novell (Ayto tekmhriwnetai argotera sto Tmhma "Pelaths Ektypwsewn"). To paketo ncpfs 8a paijei me diakomistes arxeiwn Novell ths ekdoshs 3.x kai neoteroys, den 8a leitoyrghsei me to Novell 2.x. To ncpfs client 8a leitoyrgei me proionta poy einai isxyra symbata me Novell , alla dystyxws orismena proionta poy isxyrizontai oti einai symbata den einai kai toso. Gia na xrhsimopoihsete to ncpfs me diakomistes arxeiwn Novell 4.x , o diakomisths arxeiwn prepei na ry8mistei gia na leitoyrghsei se bindery emulation mode, giati to ncpfs den yposthrizei akomh to NDS.

8.1 Apoktwntas to ncpfs.

To neotero paketo ncpfs sxediasthke gia na xtistei me ton pyrhna ekdoshs 1.2.13 h pyrhnes meta apo th ekdosh 1.3.71 (ayto symperilambanei kai toys 2.x.x) An den xrhsimopoieite ena pyrhna kamias apo aytes tis kathgories, tote 8a prepei na anaba8misete ton pyrhna sas . To Kernel-HOWTO perigrafei leptomerws pws na to kanete.

Mporeite na parete to paketo ncpfs me anwnymo ftp apo to home site toy Volker sto: ftp.gwdg.de h sunsite.unc.edu h mirror site. H trexoysa ekdosh th stigmh poy grafw einai h ejhs: ncpfs-2.0.10.tgz

8.2 Xtizontas to ncpfs gia ton pyrhna 1.2.13.

Dhmioyrghste ena pyrhna me yposthrijh Ethernet kai IPX

. To prwto pragma poy xreiazeste na kanete einai na ejasfalisete pws o pyrhnas sas dhmioyrgh8hke me energopoihmenh yposthrijh IPX. Sto pyrhna ekdoshs 1.2.13 xreiazeste mono na sigoyrecete oti exete apanthsei Y sth erwthsh: 'The IPX protocol' opws deixnei parakatw:

 ...
 ...
Assume subnets are local (CONFIG_INET_SNARL) [y] 
Disable NAGLE algorithm (normally enabled) (CONFIG_TCP_NAGLE_OFF) [n] 
The IPX protocol (CONFIG_IPX) [n] y
*
* SCSI support
 ...
 ...
Xreiazetai akomh na bebaiw8eite oti symperilabate ena katallhlo odhgo gia thn Ethernet karta sas. An den gnwrizete pws na kanete ayto, tote prepei na diabasete to Ethernet-HOWTO.

Twra mporeite na proxwrhsete sto xtisimo toy pyrhna sas. 8ymh8eite na na trejete to lilo gia na ton egkatasthsete otan exete teleiwsei.

Kanete Untar to logismiko ncpfs

# cd /usr/src
# tar xvfz ncpfs-2.0.10.tgz
# cd ncpfs

Elegjte to Makefile

An skopeuete na xrhsimopoihsete to kerneld gia na fortwnete aytomata ta ncpfs module toy pyrhna, tote prepei na bgalete apo ta sxolia th grammh sto Makefile poy anaferete sto: KERNELD. An den eiste bebaios ti shmainei ayto tote prepei na diabasete to Kernel-HOWTO gia na ejoikeiw8eite me tis ry8miseis twn module toy pyrhna.

Kane make to logismiko ncpfs

To logismiko prepei na metaglwttistei aneta, xwris na apaiteitai kapoia allh ru8mish:

# make

Antigracte ta IPX ergaleia kapoy an den to exete hdh kanei.

Otan teleiwsei to make , prepei na breite ola ta ergaleia poy xreiazeste ston katalogo ncpfs/bin. Mporeite na xrhsimopoihsete to:

# make install

gia na egkatasthste ta ergaleia stoys katalogoys poy epeleje o Volkers. An trexete ena susthma basismeno se ELF, tote prepei na janatrejete to `ldconfig -v' gia na sigoyreyteite oti mporei na bre8ei h shared biblio8hkh.

Antigracte to module ncpfs.o se kapoio meros xrhsimo an einai aparaithto.

An metaglwttizete ena pyrhna 1.2.* tote 8a breite ston katalogo ncpfs/bin ena arxeio poy onomazetai ncpfs.o, afou to make exei teleiwsei. Ayto einai to module toy pyrhna ncpfs. Prepei na to antigracete se kapoio meros xrhsimo. Sto debian susthma moy, to exw antigracei ston katalogo /lib/modules/1.2.13/fs kai exw pros8esei to ncpfs sto arxeio /etc/modules etsi wste na jekina aytomata kata thn ekkinhsh toy systhmatos. An xrhsimopoieite kapoia allh dianomh, 8a prepei na breite pou fylaei ta modules ths kai na to antigracete ekei, h apla antigracte to ston katalogo /etc. Gia na fortwsete ta modules xeirokinhta xrhsimopoihste thn entolh:

# insmod ncpfs.o

8.3 Xtizontas to ncpfs gia pyrhnes 1.3.71++/2.0.*.

Gia thn teleytaia ekdosh toy ncpfs 8a prepei na xrhsimopoihsete ton pyrhna 1.3.71 h newtero toy, symperilambanomenwn kai twn 2.0.* .

An skopeuete na xrhsimopoihsete kapoion pyrhna poy einai ekdoshs 1.3.71 h pio prosfatos, tote o kwdikas toy ncpfs exei symperilhf8ei sth dianomh toy pyrhna. Xreiazetai mono na apanthsete Y sto:

Networking options  --->
    ...
    ...
    <*> The IPX protocol
    ...
Filesystems  --->
    ...
    ...
    <*> NCP filesystem support (to mount NetWare volumes)
    ...

Xreiazetai akoma na akoloy8hsete tis odhgies gia to xtisimo twn pyrhnwn 1.2.*, etsi wste na dhmioyrghste ta ergaleia alla den 8a yparxei arxeio module na egkatasta8ei.

8.4 Ry8mizontas kai xrhsimopoiwntas to ncpfs.

Ru8mish toy logismikou enos diktuoy IPX

. Yparxoyn dyo tropoi ru8mishs toy logismikou enos diktuoy IPX. Mporeite na ry8misete xeirokinhta oles tis parametroys toy IPX diktuoy sas h na afhsete sto logismiko na apofasisei orismenes logikes ry8miseis, xrhsimopoiwntas thn entolh:

# ipx_configure --auto_interface=on --auto_primary=on

Ayto prepei na arkei stis perissoteres periptwseis, alla an den paizei se sas tote diabaste to tmhma 'Ergaleia IPX (IPX tools)' parapanw gia na to ry8misete xeirokinhta.

Elegxos ry8misewn

Afou to IPX diktyo sas exei ry8mistei 8a prepei na mporeite na xrhsimopoieite thn entolh slist gia na deite mia lista apo oloys toys diakomistes arxeiwn Novell toy diktuoy sas:

# slist
An h entolh slist bgalei kapoio mhnyma san ayto: ncp_connect: Invalid argument tote o pyrhnas sas isws na mhn yposthrizei IPX. Na elegjete oti pragmati exete ekkinhsei ton katallhlo pyrhna. Kata thn ekkinhsh, prepei na deite sta mhnumata ekkinhshs toy systhmatos mhnumata opws 'IPX' kai 'ncpfs'. An h entolh slist den emfanizei oloys toys diakomistes arxeiwn toy diktuoy sas tote isws na xreiastei na xrhsimopoihste th me8odo xeirokinhths ru8mishs toy diktuoy.

Prosarthsh enos diskoy (volume) Novell(tm).

An to logismiko diktuoy gia IPX leitoyrgei kanonika, 8a prepei twra na mporeite na prosarthsete ena disko enos diakomisth arxeiwn Novell sto susthma arxeiwn toy Linux sas. H entolh ncpmount xrhsimopoieitai gia ayto to skopo kai apaitei na prosdiorisete toylaxiston tis akoloy8es plhrofories:

  1. To onoma toy diakomisth arxeiwn
  2. Thn taytothta toy login sas sto diakomisth. An exete kai password 8a to xreiasteite kai ayto.
  3. To shmeio prosarthshs px, ekei opoy 8elete na prosarth8ei o diskos. Ayto 8a einai enas yparxwn katalogos sto mhxanhma sas.

Yparxei mia antistoixh entolh ncpumount gia na apoprosarthsete ena prosarthmeno NCP susthma arxeiwn. Ta NCP systhmata arxeiwn apoprosarth8oun omala (cleanly) an katebasete (shutdown) to mhxanhma sas omala, etsi den xreiazetai na anhsyxhsete gia na kanete ncpumoun ta systhmata arxeiwn sas xeirokinhta prin to halt h to shutdown.

Ena paradeigma entolhs gia na prosarmosoyme to diakomisth arxeiwn ACCT_FS01, me ena login id guest kai kanena kwdiko, katw apo ton katalogo /mnt/Accounts mporei na moiazei me thn akoloy8h:

# ncpmount -S ACCT_FS01 /mnt/Accounts -U guest -n
Shmeiwste th xrhsh ths epiloghs -n, gia na deijete oti kanenas kwdikos den apaiteitai gia to login. To idio login otan prosdiorizoyme kai kwdiko (password) secret 8a moiazei me:

# ncpmount -S ACCT_FS01 /mnt/Accounts -U guest -P secret
An den prosdiorisete tis epiloges -n h -P 8a erwth8eite gia kwdiko.

Na elegjete to apotelesma ths entolhs mount

An h entolh mount einai epityxhmenh 8a exete toys diskoys aytous prosbasimoys, sto xrhsth me userid aythn poy xrhsimopoih8hke kata to login, ws katalogoys katw apo to shmeio prosarthshs. 8a prepei epishs na mporeite na diasxizete thn domh twn katalogwn gia na breite o,ti alla arxeia. Epeidh to NCP den parexei uid h gid idiothtes arxeiwn, ola ta arxeia 8a exoyn tis idies idiothtes idiokthsias me ton arxiko katalogo prosarthshs, exete to loipon sto noy sas, otan moirazete tis prosarthseis metaju Linux xrhstwn.

Ru8mish twn prosarthsewn wste ektelountai aytomata.

An exete anagkh gia kapoia monimh prosarthsh tupoy ncp tote 8a 8elhsete na ry8misete tis parapanw entoles sta arxeia rc, etsi wste na symbainoyn aytomata kata thn wra ths ekkinhshs. An h dianomh sas den parexei hdh kapoio tropo ru8mishs toy IPX, opws to debian, tote sas synistw na tis topo8ethsete sto /etc/rc.local arxeio sas, an exete ena. Isws na xrhsimopoihsete kati san:

#
# Start the ncp filesystem
/sbin/insmod /lib/modules/1.2.13/fs/ncpfs.o

# configure the IPX network
ipx_configure --auto_interface=on --auto_primary=on

# guest login to the Accounting diakomisth arxeiwn
ncpmount -S ACCT_FS01 /mnt/Accounts -U guest -n

#

Yparxei kai allo meso gia na ry8mistoun oi NCP prosarthseis kai ayto ginetai me th dhmioyrgia enos arxeioy $HOME/.nwclient. Ayto to arxeio periexei leptomereies gia tis proswrines prosarthseis h tis prosarthseis sygkekrimenwn xrhstwn, poy 8a ektelountai syxna. Sas epitrepei na apo8hkeusete tis leptomereies twn prosarthsewn etsi wste na mporeite na ta janadhmioyrghsete xwris na xreiazetai ka8e fora na prosdiorizete oles tis parametroys.

H suntajh einai sxedon aytonohth:


# The first entry is the 'preferred server' entry and is
# used whenever you do no specify a server explicitly.
#
# User TERRY login to DOCS_FS01 fileserver with password 'password'
DOCS_FS01/TERRY password
#
# Guest login to the ACCT_FS01 fileserver with no password.
ACCT_FS01/GUEST -
Gia na energopoihsete aytes tis prosarthseis mporeite na xrhsimopoihsete:
$ ncpmount /home/terry/docs

gia na prosarthsete to: DOCS_FS01 me TERRY ws login katw apo ton katalogo /home/terry/docs. Shmeiwste oti h kataxwrhsh ayth epilexthke, giati kanenas diakomisths arxeiwn den ka8oristhke sth entolh prosarthshs (mount). An dinate thn akoloy8h entolh :

$ ncpmount -S ACCT_FS01 /home/terry/docs
tote to ACCT_FS01 8a prosartiotan ekei me GUEST login .

Shmeiwsh: gia na leitoyrghsei aytos o mhxanismos oi idiothtes (permissions) toy $HOME/.nwclient arxeioy, 8a prepei na einai 0600. 8a xreiasteite loipon na xrhsimopoihste th entolh:

$ chmod 0600 $HOME/.nwclient
An prokeitai na epitrapei se mh-root xrhstes na xrhsimopoioun ayto to mhxanismo tote h entolh ncpmount prepei na einai Set Userid Root, etsi 8a xreiastei na toy xorhghsete ta katallhla dikaiwmata:
# chmod 4755 ncpmount

Dokimaste th boh8htikh efarmogh nsend

, mia boh8htikh entolh gia apostolh mhnymatwn pros xrhstes Novell, h opoia epishs symperilambanete mesa sto paketo, legetai nsend kai xrhsimopoieitai ws ejhs:

# nsend rod hello there
8a steilei to mhnyma "hello there" se ena xrhsth poy einai mesa ston kurio diakomisth arxeiwn sas, san "rod" (ston prwto diakomisth poy emfanizetai sto arxeio .nwclient. Mporeite na prosdiorisete allon diakomisth arxeiwn me th idia suntajh opws kai gia thn entolh ncpmount.


Next Previous Contents