I-Samba: Ama-CIFS-Utils

Sanibonani zihlobo !. «Common Iisibongo FIle SIzinsiza ze-ystem »noma Izinsiza Ezivamile ze-Internet File Systems, zizosisiza ukukhwela ohlelweni lwethu lwendawo lwe-Linux, izinsiza zenethiwekhi ze-CIFS ezabiwe kumishini ekude.

Iphakheji Ama-CIFS-Utils ibiyingxenye yeSamba Suite kuze kube yinguqulo ngaphambi kuka-5.5-1 (bona / usr / share / doc / cifs-utils / README) okuyiyo eza noDebian 7 "Wheezy" nalapho le ndatshana isekelwe khona. Njengamanje, izinsiza ze-CIFS yiphrojekthi ehlukile kuneSamba futhi zigcinwa ngokuqinile yiThimba leSamba.

Ngaphambi kokuqhubeka, kufanele sifunde i-athikili Samba: SmbClient Yebo, sizobhekisa kuyo. Ngokuvamile, lokhu okuthunyelwe ukuqhubeka kwalo.

Sizobona:

  • Ukufakwa kanye nolwazi olujwayelekile oluncane
  • Kusetshenziswa umyalo we-mount.cifs
  • Isibonelo se-1
  • Isibonelo se-2
  • Isibonelo se-3
  • Isifingqo

Ukufakwa kanye nolwazi olujwayelekile oluncane

Uma singenayo iphakheji efakiwe smbclient noma okunye okuhlobene ne-Samba suite, lapho ufaka ama-cifs-utils nganoma iyiphi indlela bazokwenza lokhu:

  • ukhiye: Amathuluzi okuphatha ukhiye we-Linux. Ama-Keyutils iqoqo lamathuluzi okuphatha ukugcinwa kokhiye ku-kernel angasetshenziswa ezinhlelweni zefayela, amadivayisi wokuvimba, nabanye ukuthola nokugcina okhiye bokugunyazwa nokubethela okudingekayo ukwenza imisebenzi ephephile.
  • winbind: I-Daemon ehlanganisa ukufakazela ubuqiniso kanye nezinqubo zokusesha zomsebenzisi kanye / noma zeqembu ezisuka ku-Directory Esebenzayo kusistimu ye-Linux.
  • libnss-winbind: Iphakheji esinikezwa yi-plugin nss_winbind, ehlangana neseva yendawo Winbind ukuhlinzeka ngokuseshwa kwamagama abasebenzisi namaqembu. Iphinde isinike i-plugin nss_wins, okunikeza usesho lwamagama wokusingathwa noma wekhompyutha, zombili ngokusebenzisa i-NBNS ("NetBIOS Name Service") kanye nezinqubo zokusakaza zeNetBIOS.
  • i-samba-evamile y i-samba-common-bin: Izivumelwano kokuthunyelwe Samba: SmbClient kuyo kanye le sayithi.

Izinsiza noma amathuluzi noma imiyalo enikezwe yiphakheji ama-cifs-utils Yilezi: ama-cifscreds, getcifsacl, setcifsacl, cifs.upcall, cifs.idmap, kanye nentaba.cifs. Ngezinhloso ezisebenzayo sizobona umyalo kuphela ukukhweza. Ngokuningi esikufunayo, asikwazi ukwenza isivumelwano ngale ndaba. Labo abafuna noma abadinga ukungena ngokujulile, sicela ukhiphe umyalo womuntu.

Kusetshenziswa umyalo we-mount.cifs

Ngokuvamile sikunxusa njengo:

i-mount.cifs {service} {mount point} [-o izinketho] i-mount -t cifs {service} {mount point} [-o izinketho]

ukukhweza faka isistimu yefayela le-Linux CIFS. Kungumyalo wendabuko we-Linux futhi i-kernel kumele ibe nokusekelwa kwezinhlelo zamafayela ama-cifs. Iphrothokholi ye-CIFS ingumlandeli wephrothokholi ye-SMB futhi isekelwa amaseva amaningi we-Windows namanye ama-server amaningi we-"Network Attached Storage" namakhompyutha we-NAS. Vele isekelwa ngokuphelele yiseva yomthombo ovulekile weSamba.

Le nsiza namathisela noma khweza insiza yenethiwekhi eyabiwe (noma ethunyelwa ngaphandle) kuseva ekude echazwe njenge isevisi kusetshenziswa i-syntax // iseva / isisetshenziswa lapho "iseva" igama noma ikheli le-IP lapho isabelo sihlala khona nokuthi "insiza" igama lesabelo - enkombeni yangakini ezoba yi- "mount point". IMount Point kufanele ibe khona kusistimu yethu yefayela yangaphambi kokufaka insiza.

I-Las Izinketho womyalo wenziwe ngohlu lwamabili wamanani ahlukaniswe ngamakhoma, izinhlobo ukhiye = inani.

Ukwenza lula ukusebenza nale nsiza, sincoma ukwenza izinguquko eziboniswe kokuthunyelwe Samba: SmbClient ukufaka ifayela /etc/samba/smb.conf ukuthatha okokusebenza njengesethenjwa umvolug.amigos.cu enganamathiselwe kusizinda. Kunconywa futhi ukufaka iphakheji smbclient uma kungenjalo, ukwazi ngokushesha ukuthi yiziphi izinsizakusebenza ezabiwe kunethiwekhi. Vele, singanquma okungenhla ngeNautilus noma isiphequluli sefayela esisisebenzisayo, inqobo nje uma inokwesekwa kweprotocol ye-SMB / CIFS.

Isibonelo se-1

Sifuna ukukhweza isabelo // w2003 / umhlaba ophakathi kufolda yendawo / ikhaya / xeon / lan ngezimpawu zomsebenzisi ipayipi okungokwesizinda abangani.cu. Njengomsebenzisi wezimpande noma ngokusebenzisa sudo senza:

xeon @ miwheezy: ~ $ sudo mount.cifs // w2003 / middle earth / home / xeon / lan -o user=pipin@amigos.cu [sudo] iphasiwedi ye-xeon: Iphasiwedi:

Qaphela ukuthi okokuqala sicelwa iphasiwedi yomsebenzisi wendawo xeon @ miewheezy, bese kuba umsebenzisi okude pipin@amigos.cu. Vele kufanele siyazi ngaphandle kokuthi iqembu lethu lijoyine isizinda futhi singene endaweni yangakini kuDebian wethu njengo ipayipi. Sizobona lelo cala ezihlokweni zakamuva.

Kumele futhi ukuthi sakhe ifolda lan (/ ikhaya / xeon / lan) ngaphambi kokufaka umyalo. Uma kungenjalo, singakhombisa ukuthi iphuzu lokukhweza lizoba umkhombandlela / mnt, uma singenayo enye insiza efakwe kuleyo nkomba ejwayelekile.

Masibe nelukuluku futhi sibhale amafayela enkombeni yasendaweni lapho sibeke khona isabelo esikude futhi sizobona ukuthi umsebenzisi nabanikazi beqembu lamafolda namafayela izimpande. Kusho ukuthi siyoba nokufinyelela okufundwayo kuphela. Kuhlole.

Kwabanye kuzoba nzima ukukuqonda okungenhla, kepha yile mininingwane egqamisa imininingwane ye- Amandla nokuphepha kohlelo lwefayela le-UNIX / Linux.

  • Sikwazile ukufaka esakhiweni sefayela lethu elisezingeni eliphezulu esizalwa kulo /, isistimu yefayela engekho ext3 o ext4, njengoba kwenzeka lapho sikhweza isistimu yefayela I-NTFS, FAT, noma FAT32 eqenjini lethu le-Debian. Imisebenzi ejwayelekile esiyenzayo ngaphandle kokubheka ingqikithi yayo.
  • Ngemuva kokufaka isisetshenziswa esikude, singaphatha amafolda namafayela awo njengasendaweni.
  • Ayikho incwadi noma yini yalolo hlobo edingekayo ukuze kubhekiswe isisetshenziswa esikude.
  • Akudingeki ukuthi iLinux yethu ijoyine kwiWindows Domain. Sidinga kuphela i-akhawunti yomsebenzisi kuleso Domain ukufinyelela izinsiza ezabiwe lapho umsebenzisi wethu anezimvume khona. Lokhu kungenziwa futhi kusuka kuklayenti leWindows. Kulungile?.

Isibonelo se-2

Sifuna ukukhweza isabelo // w2003 / umhlaba ophakathi kufolda yendawo / ikhaya / xeon / lan ngezimpawu zomsebenzisi ipayipi okungokwesizinda abangani.cu. Sidinga futhi ukufinyelela amafayela ngezimvume zokufunda / ukubhala nokuthi umnikazi ungumsebenzisi wasendaweni esingene kuye ngemvume nokuthi ngokwesibonelo sethu xeon:

xeon @ miwheezy: ~ $ sudo mount.cifs //w2003.amigos.cu/tierramedia / home / xeon / lan -o user = pipin, uid = xeon, forceuid

Masibe nelukuluku futhi futhi sibhale ifolda lan. Manje umnikazi i-xeon neqembu lisamile izimpande. Akudingeki sitshele i- ukukhweza inketho rw ukuthola ukufinyelela kokufunda / ukubhala. Izimvume ezivela kuhlelo lwefayela le-UNIX / Linux zikuqinisekisa lokhu. Singayihlola ngokwakha nokususa izinkomba; ukulungisa amafayela akhona, njalonjalo.

Isibonelo se-3

Njalo lapho umshini wethu wendawo uqala, sifuna ukukhweza isabelo // w2003 / umhlaba ophakathi kufolda yendawo / ikhaya / xeon / lan ngezimpawu zomsebenzisi ipayipi okungokwesizinda abangani.cu. Sidinga futhi ukufinyelela amafayela ngezimvume zokufunda / ukubhala nokuthi umnikazi ungumsebenzisi wasendaweni esingene kuye ngemvume nokuthi ngokwesibonelo sethu xeon.

Isixazululo esilula ukudala iskripthi enkombeni /etc/init.d, inikeze izimvume zokwenza futhi uyifake phakathi kwezinhlelo ezisebenza ekuqaleni. Njengomsebenzisi izimpande senza:

 nano /etc/init.d/monta-tierramedia.sh

bese ungeza okuqukethwe okulandelayo kuskripthi sokuqala esanda kudalwa:

#! / bin / sh ### BEGIN INIT INFO # Inikeza: Khweza insiza ekude // w2003 / umhlaba ophakathi / ekhaya / xeon / lan # Okudingekayo-Qala: $ local_fs $ syslog # Okudingekayo-Misa: $ local_fs $ syslog # Okuzenzakalelayo- Qala: 2 3 4 5 # Okuzenzakalelayo-Stop: 0 1 6 # Incazelo emfushane: Khweza insiza eyihlane ### END INIT INFO mount.cifs //10.10.10.30/tierramedia / home / xeon / lan \ -o user = pipin , iphasiwedi = iphasiwedi, uid = xeon, gid = xeon, forceuid, forcegid

Kamuva sinikeza imvume yokusebenzisa iskripthi futhi siyifaka phakathi kwemibhalo yokuqalisa. Njengomsebenzisi izimpande senza:

chmod u + x, noma, ox /etc/init.d/monta-tierramedia.sh buyekeza-rc.d okuzenzakalelayo kwe-monta-tierramedia.sh

Uma senze konke kahle, akufanele sithole noma yimiphi imilayezo enamaphutha. Ukubheka ukuthi ngabe i-syntax yombhalo ilungile, siwenza ngesandla, futhi akufanele futhi sithole nomyalezo wephutha. Njengomsebenzisi izimpande senza:

/etc/init.d/monta-tierramedia.sh

Isifingqo

Singabhala izibonelo eziningi, kepha leyo akuyona inhloso yethu. Kumele sisuke kokulula siye kokuyinkimbinkimbi futhi lokhu okuthunyelwe kuyi- Iphoyinti lokungena esihlokweni. Izindatshana zethu zisuselwa kuzisekelo ezisemakhasini ezandla noma Amakhasi Omuntu nasemibhalweni ehambisana nayo yephakeji ngalinye. Sizama ukunikela ngokuhlukile noma okugcwalisa izindatshana eziningi ezitholakala eWWW Village.

Uma sifuna ukusebenzisa i-Free Software kumanethiwekhi we-Microsoft, i-SMB / CIFS, ne-Samba, kufanele okungenani sifunde !!!. Ngaphandle kwalokho, sizohlupheka ngemiphumela yokungazi okuyisisekelo.

Ithiphu yamahhala: Kungani sizokwenza izinto zibe nzima uma sikwazi ukuzisebenzisa kalula?

Okwamanje, umsebenzi usuphelile, Abangane !!!.


Okuqukethwe yi-athikili kunamathela ezimisweni zethu ze izimiso zokuhlelela. Ukubika iphutha chofoza lapha.

Amazwana ayi-20, shiya okwakho

Shiya umbono wakho

Ikheli lakho le ngeke ishicilelwe. Ezidingekayo ibhalwe nge *

*

*

  1. Ubhekele imininingwane: Miguel Ángel Gatón
  2. Inhloso yedatha: Lawula Ugaxekile, ukuphathwa kwamazwana.
  3. Ukusemthethweni: Imvume yakho
  4. Ukuxhumana kwemininingwane: Imininingwane ngeke idluliselwe kubantu besithathu ngaphandle kwesibopho esisemthethweni.
  5. Isitoreji sedatha: Idatabase ebanjwe yi-Occentus Networks (EU)
  6. Amalungelo: Nganoma yisiphi isikhathi ungakhawulela, uthole futhi ususe imininingwane yakho.

  1.   Erick kusho

    Okuthunyelwe okuhle kakhulu engingakusho, kuhle ukuthi umngani uyalukhulisa lolu lwazi ngoba i-samba iyinkinga yabaningi

    1.    UFederico Antonio Valdés Toujague kusho

      Siyabonga ngokuphawula u-Erick !!!. Uma ubona, indlela esiyithathayo yehluke kancane kunokujwayelekile ukuze abafundi basiqonde kangcono isihloko seSamba. Uma ufunda lezi zikhala ezine ezishicilelwe kuze kube manje, "kuyambula." 🙂

  2.   futhi kusho

    Futhi ungafaka isabelo ngama-samba / cifs ekuqaleni ngokufaka umugqa kufayela le-fstab. Okuthile okunje:

    // (ip noma igama leseva ye-samba) / (isisetshenziswa esabiwe) / (isiqondisi ukukhweza) iziqinisekiso ze-cifs = / (indlela eya efayeleni enegama lomsebenzisi nephasiwedi), uid = (id yomsebenzisi okule khompyutha ozo ungumnikazi wamafayela), gid = (kuyafana nakuqala kodwa kweqembu), iocharset = utf8, auto 0 0

    iocharset = utf8 kuyacaca ukuthi kwenzelwa ukufaka ikhodi ekufakeni amafayela.
    i-auto ukufaka ngokuzenzakalela ekuqaleni. Uma singafuni ukuthi yenzeke, kuzofanele sibeke okungekho okuzenzakalelayo, kepha kulokhu izimpande kuphela ezingakhweza isistimu yefayela. Uma sifuna noma yimuphi umsebenzisi akwazi ukufaka insiza eyabiwe, kufanele sibeke inketho "abasebenzisi" ekugcineni.

    Esikhundleni senketho yokuqinisekisa, ungabeka leyo oyisebenzisa njengomsebenzisi nephasiwedi. Inkinga kungaba ukuthi noma ngubani one-akhawunti kukhompyutha angazi igama lomsebenzisi nephasiwedi esetshenziselwa ukufaka. Ngakolunye uhlangothi, uma igama lomsebenzisi nephasiwedi zikufayela elihlukile, leli fayela linganikezwa izimvume zokuvimbela ukuze kungabikho muntu owazi igama lomsebenzisi nephasiwedi, kepha kuyimpande.

    Kunemigqa emibili kufayela lokuqinisekisa:

    igama lomsebenzisi = (igama lomsebenzisi)
    iphasiwedi = (iphasiwedi)

    Ngokwesibonelo sakho umugqa we-fstab uzoba:

    //10.10.10.30/tierramedia / home / xeon / lan cifs credentials = / etc / credentials, uid = xeon, gid = xeon, iocharset = utf8, auto 0 0

    Futhi kufayela le- / etc / credentials:

    igama lomsebenzisi = ipayipi
    iphasiwedi = iphasiwedi

    Futhi sizobeka leli fayela njengomsebenzisi wezimpande neqembu, nokuthi umnikazi wefayela kuphela ofunde imvume kulo.

    Kulula futhi kuyashesha, futhi inketho enconywe kakhulu.

    1.    Rafael kusho

      Ngingumsebenzisi we-OpenSUSE esizindeni seWindows futhi ngifaka ukuxhumana ku-fstab, kepha, yize ngine _netdev njengepharamitha, ekugcineni yehluleka ukuqala ngoba inethiwekhi ayifikanga ngesikhathi futhi kufanele ngiphoqelele intaba ngokuhamba kwesikhathi.

      Kodwa-ke, ngombhalo okulesi sihloko, ngingawuthwala ngemuva kokuqalisa i-KDE, bona ukuthi uyasebenza yini ...

      Un saludo

    2.    U-Alvaro Garcia Bruce kusho

      U-ANDYE Kuthiwani uma insizakusebenza ibizwa ngokuthi yi-Middle Earth esikhundleni se-Middle Earth? Ngizamile ukusebenzisa isibonelo ngokususelwa kunketho oyishoyo. Nge-Middle Earth ibekwe ngaphandle kwenkinga kepha nge-Middle Earth ingithumela iphutha kulolo layini lwe-fstab. Ungayilungisa kanjani uma ngasizathu simbe kungenzeki ukushintsha igama lefolda?

      1.    futhi kusho

        Qaphela ukuthi igama lokwabelana akudingeki lifane negama lefolda. Mhlawumbe yindlela oyixazulula ngayo.

        Ngaphandle kwalokho, ungahlala uphunyuka esikhaleni sokwabelana okwabiwe nge-backslash, uyishiye njengendawo ephakathi. Khumbula angikaze ngiyizame ku-fstab, kepha kufanele isebenze.

  3.   futhi kusho

    Esibonelweni sakho ungashintsha futhi umsebenzisi nephasiwedi yefayela lokuqinisekisa:

    mount.cifs //10.10.10.30/tierramedia / home / xeon / lan
    -o izifakazelo = / etc / credentials, uid = xeon, gid = xeon,
    amandla, amandla

  4.   UFederico Antonio Valdés Toujague kusho

    Ngiyabonga kakhulu ngemibono nangeqhaza lakho, @andye !!! Ngiyazi ukuthi intaba ingamenyezelwa ku-fstab, ukuze ifakwe njalo lapho siqala uhlelo. Ngokwami ​​ngincamela isixazululo esingathinti ifayela le- / etc / fstab, yingakho ngibeka leso sibonelo esilula. Iphinde iphendule imibuzo engibuzwe yona ngokuthi ngingahola kanjani imibhalo yokuqalisa emisebenzini elula eSqueeze nase Wheezy.

    1.    Julio Cesar kusho

      Okuthunyelwe okuhle, uzakwethu uyaqhubeka nokwenza iminikelo emihle, ngiyabingelela uFreeke

      1.    UFederico Antonio Valdés Toujague kusho

        Siyabonga ngokuphawula, Freeke !!! Okuthunyelwe okulandelayo kuzobheka ukuthi ungayisebenzisa kanjani iseva ye-Samba Standalone.

  5.   UPepo kusho

    Abangane noDebian nginenkinga elandelayo:

    sudo mount.cifs //192.168.6.2/Archive / ikhaya / pepo / backupA1330 / mntCentro -o user = myuser, password = myipassword

    ukukhweza iphutha (5): Iphutha lokufaka / lokukhipha
    Bheka i-mount.cifs (8) ikhasi lesandla (isb. Man mount.cifs)

    Lokhu sekunesikhathi kwenzeka kimi futhi manje kufanele ngisebenzise indawo yokuqhafaza ngoba ngeDolphin anginankinga yokusebenzisa i-smb: //192.168.6.2/Archive

  6.   UFederico Antonio Valdés Toujague kusho

    Sanibonani Pepo !!!. Angikaze ngiwuthole lowo mlayezo wephutha. Zama ukufunda imilayezo ye-kernel ngokuvula ikhonsoli bese uyisebenzisa njengezimpande umsila -f / var / log / syslog, ngenkathi kokunye ukhipha umyalo we-mount.cifs… ukubona ukuthi uthola imininingwane engakuqondisa. Impumelelo

    1.    UPepo kusho

      HI, nayi i-LOG engiyitholayo (/ var / log / syslog):

      Sep 6 20:34:05 avernum kernel: [74531.103307] FS-Isilondolozi: AmaNetfs 'cifs' abhaliselwe ukulondolozwa kwesikhashana
      Sep 6 20:34:05 avernum kernel: [74531.103411] Uhlobo lokhiye cifs.spnego bhalisiwe
      Sep 6 20:34:05 avernum kernel: [74531.103441] Uhlobo lokhiye cifs.idmap bhalisiwe
      Sep 6 20:34:06 avernum kernel: [74532.602462] CIFS VFS: Thumela iphutha ku-SessSetup = -5
      Sep 6 20:34:06 avernum kernel: [74532.602768] CIFS VFS: cifs_mount failed w / return code = -5

  7.   gabux kusho

    Ngiyabonga ngempela, lolu hlobo lomnikelo ku-desdelinux lusiza kakhulu, sibonga abantu abanjengawe esivula umkhakha obanzi we-linux…. Ngiyabonga nonke…

    1.    frederico kusho

      Ngiyabonga ngokuphawula kwakho @gabux. Siyajabula ukuthi ungena kwiLinux !!!

      1.    gabux kusho

        Angikubongi ngempela uFederico y cia (ovela eLinux), nsuku zonke ngifunda okwengeziwe nawe, iqiniso ukuthi ngizizwa ngiyintethe encane kule nsimu enkulu eyiLinux ... 😀

  8.   USarvelio Navarro kusho

    Sawubona ekuseni, ngifunde okuthunyelwe, kuyathakazelisa kakhulu futhi kuphelele, ngicacisa ukungabaza okuningana, kepha okunye okusaduma emqondweni wami yilokho okufanele ngikwenze, uma kufanele ngithole ifolda eyabelwe yomshini onamathele esizindeni, ipharamitha yokuyengeza okungaba noma kunamathiselwe kupharamitha yomsebenzisi

  9.   USarvelio Navarro kusho

    tks

  10.   Rafael kusho

    Ngemuva kokushisa kakhulu ikhanda lami, futhi ukuze kungafanele ngenze lutho "ngesandla", iseluleko sami ukusebenzisa i- "smb4k" (Advanced Network Neighborhood Browser for KDE) ekuvumela ukuthi ukhweze futhi ufinyelele izinsiza kumaseva asendaweni yewindi Samba. Futhi inokukhetha, uma sisebenzisa i-laptop futhi sixhuma kunethiwekhi enezinsizakusebenza ze-samba, ezizikhuphula ngokuzenzakalela futhi zehlise lapho ilaptop ingena kumodi yokumisa noma yokulala ubusika.

  11.   UJavier Herrera kusho

    Ukubingelela, okuthunyelwe okuhle kakhulu, kungisize kakhulu, kepha ngifuna ukuqhubeka ... Ngingathanda ukufaka insiza eyabiwe ngaphandle kokubhala iphasiwedi. Ngichaza imvelo

    Isabelo siseva yamawindi enenkomba esebenzayo
    I-CENTOS iyilungu lesikhombi esisebenzayo
    Umsebenzisi engangena naye ngemvume kuma-centos umsebenzisi owenziwe kumkhombandlela osebenzayo wewindows
    Ifolda eyabiwe kuseva yemikhombandlela esebenzayo ingumnikazi womsebenzisi engingena naye ngemvume