Kafa sabar directory server tare da Debian da Samba. Kashi na farko

Sannun ku. A cikin wannan jerin kwasa-kwasan zan koya muku yadda ake kafa sabar Active Directory don cibiyoyin sadarwa tare da kwakwalwa Windows karkashin Debian (Idan za mu kafa sabar, za mu yi ta yadda ya kamata, itacen girki). A wannan kashi na farko zanyi bayanin shigarwa da daidaitawar sabar kuma a karo na biyu zan koyar da yadda ake amfani da kayan aikin nesa de Windows 7 da kuma yadda ake hada komfutoci zuwa yankin (Windows 7 kanta da a Windows XP). Daga baya zan sake sanya kashi na uku baya ga yadda zan shiga ƙungiyoyi tare da GNU / Linux tunda wani abu ne wanda har yanzu ban gwada shi ba.

Wannan ra'ayin ya zo mani ne a lokacin da nake (ko kuwa, ya dogara da lokacin da kuka karanta wannan sakon) shan kwas a kan yajin aiki azaman mai gyara kayan aikin Microcomputer wanda muke kafa sabar network da Windows 2008 (ba RC2 ba) kuma na fara neman idan zan iya aiwatar da wannan a ƙarƙashin GNU / Linux kuma sakamakon yana da kyau kwarai, hatta malama na yi mamakin saurin sabar.

Kafin ci gaba, kuma tabbas yawancinku suna tambayar kanku, Menene Littafin Aiki? Da kyau, ita ce kalmar da Microsoft ke amfani da ita don komawa zuwa saitin kayan aikinta don gudanar da cibiyar sadarwa kamar sabar DNS, gudanar da masu amfani da hanyoyin sadarwa, da sauransu.

Za mu buƙaci masu zuwa:

  • Debian a cikin reshensa mai karko (a wurina Wheezy 7.5 tare da XFCE azaman yanayin shimfidar komputa)
  • Samba 4
  • Abokin ciniki tare da Windows 7 / 8 / 8.1 tare da kunshin don shigar da ayyukan sarrafa uwar garken nesa (wanda ake buƙata don sarrafa sabar, kamar su raba babban fayil tare da masu amfani). Wannan za a bayyana a cikin koyawa na gaba.

Kafa sabar

Kafin ci gaba, dole ne mu shirya wasu fayiloli don komai yayi aiki, musamman don kwamfutocin da ke kan hanyar sadarwar su sami sabar yankin.

Abu na farko shine bawa uwar garken mu adireshi Kafaffen IP. Game da gwajin Debian na a VirtualBox amfani sadarwar, wanda shine abin da ya fito daga tushe, amma a cikin ainihin sabar na saita shi daga Manajan cibiyar sadarwa, don haka zanyi bayanin yadda ake yinsa a duka biyun.

Networking

Fayil na farko da zamu gyara shine / Sauransu / cibiyar sadarwa / musaya.
# This file describes the network interfaces available on your system

da kuma yadda za'a kunna su. Don ƙarin bayani, duba musaya (5).

Hanyar hanyar sadarwa ta loopback

mota shi
iface loetet loopback

Hanyar hanyar sadarwa ta farko

auto0 ta atomatik
Iface eth0 inet static
adireshin 192.168.0.67
255.255.255.0 shafin yanar gizo
Ƙofar 172.26.0.1
dns-nameservers 192.168.0.67
dns-bincika class.org
dns-domain class.org
Kasancewa:

  • adireshin: IP na ƙungiyarmu.
  • netmask: abin rufe fuska A cikin ƙaramin hanyar sadarwa ko gida yawanci wannan.
  • ƙofar: ƙofar. A yadda aka saba shine IP na na'ura mai ba da hanya tsakanin hanyoyin sadarwa wanda ke ba mu mafita zuwa Intanet.
  • dns-sunayen: Adireshin ip DNS. A wannan yanayin sabar, amma zaka iya ƙara na biyu, misali jama'a na Google.
  • 2 na ƙarshe sun nuna sunan binciken yanki da sunan yankin kanta.

Yanzu dole ne mu ƙara layuka masu zuwa zuwa / sauransu / runduna:
127.0.0.1 Matrix.clase.org Matrix
192.168.0.67 Matrix.clase.org Matrix

Wannan zai warware sunan yankin don haka za'a iya samun sa akan hanyar sadarwa. matrix shine sunan da na baiwa sabar.

A karshe zamu gyara /etc/resolv.conf:

nameserver 192.168.0.13

A wasu kwasa-kwasan da na samo, sun kara wani layin suna da wasu masu canji, amma a nawa layi daya ne kawai ya isa.
Yanzu mun sake farawa sabis na hanyar sadarwa kuma wannan ke nan:

/etc/init.d/networking restart

Manajan cibiyar sadarwa

Danna-dama a gunkin cibiyoyin sadarwa ka zaɓa Shirya haɗi. Za mu sami hanyoyin sadarwar da muka saita, amma muna sha'awar kiran ne kawai Hanyar sadarwar waya 1 ko me kuka sa masa suna. Muna latsa shi sau biyu sannan sabon taga zai bayyana kuma za mu je Saitunan IPv4. a hanya mu zaɓi manual. Yanzu danna kan .Ara kuma cika dukkan filayen:
AC DC Debian - Manajan hanyar sadarwa
Yanzu zamu tafi shafin Janar kuma muna tabbatar da cewa anyi alama Duk masu amfani dole ne su haɗi zuwa wannan hanyar sadarwar. Danna kan Ajiye sai muka tafi.

Shigar da Samba 4

A halin da muke ciki za mu zazzage kuma mu tattara Samba 4 daga shafin ta saboda a cikin Debian ana samun sa ne kawai ta wurin adanawa Bayani kuma ya ba ni matsalolin dogara.

Zamu je http://samba.org don zazzage sabon yanayin barga kuma kwancewa kunshin a cikin babban fayil.

Sabon yanayin kwanciyar hankali a lokacin rubuta wannan labarin shine 4.1.8 don haka zai zama wanda muke aiki dashi.

Don tattara shi muna buƙatar shigar da waɗannan fakitin masu zuwa:

apt-get install build-essential libacl1-dev libattr1-dev \
libblkid-dev libgnutls-dev libreadline-dev python-dev libpam0g-dev \
python-dnspython gdb pkg-config libpopt-dev libldap2-dev \
dnsutils libbsd-dev attr krb5-user docbook-xsl libcups2-dev acl

Da zarar an zazzage mu kuma mun buɗe, sai mu buɗe tashar mota mu matsa zuwa babban fayil ɗin kuma mu aiwatar da waɗannan dokokin:
./configure --enable-debug
make
make install

Tsohuwar shigarwa tana ciki  / usr / na gari / samba. Duk da yake tana goyan bayan –prefix = / usr siga NO shigar da shi a cikin kundin adireshi masu dacewa (alal misali binaries ba sa su a ciki / usr / bin)

Yanzu mun ƙara sababbin hanyoyi a cikin PATH. A halin da nake ciki a /etc/bash.bashrc don amfani ga duk masu amfani, gami da tushe.

export PATH=$PATH:/usr/local/samba/bin:/usr/local/samba/sbin

Kuma muna ƙirƙirar hanyar haɗi a ciki / sauransu don Samba don nemo fayil ɗin daidaitawa:

ln -s /usr/local/samba/etc/ /etc/samba

Za mu saita sabar Samba. Saboda wannan muke aiwatarwa:

samba-tool domain provision --realm=clase.org --domain=CLASE --adminpass=Contraseña --use-rfc2307

ina:

  • –Daular: shine cikakken sunan yankin.
  • –Domain: shine yanki. Dole ne ya kasance a ciki manyan haruffa
  • -Adminspass: kalmar sirri ce ta mai kula da cibiyar sadarwa.
  • –Ya-rfc2307: don kunna AC.

Idan komai ya tafi daidai bayan wani lokaci kadan Samba zata gama daidaita kanta. Idan kana son sanin duk wasu zaɓuɓɓuka masu yuwuwa, kawai gudu:

samba-tool domain provision -h

Yanzu zamu shirya fayil ɗin /etc/samba/smb.conf. A yanzu abin da ke jan hankalin mu shine layi mai zuwa:
dns forwarder = 192.168.0.1

Dole ne wannan layin ya nuna uwar garken DNS wanda ke ba mu damar shiga Intanet (a wannan yanayin, mai ba da hanya tsakanin hanyoyin sadarwa). Samba yana ɗaukar daidaitaccen tsari na cibiyar sadarwar amma ana bada shawara don tabbatar dashi.

Yanzu mun fara sabis:

samba

kuma muna bincika haɗin ta hanyar aiwatarwa:

smbclient -L localhost -U%

Kuma idan komai daidai ne zamu ga wani abu makamancin wannan:
dubawa samba tayi
Idan har ya bamu kuskuren haɗi, zamu tabbatar da matakan matakin da ya gabata. Rubutun Samba yana cikin /usr/local/samba/var/log.samba

Yanzu zamu kwafa fayil din /usr/local/samba/private/krb5.conf a / sauransu. Yanzu zamu bincika cewa zamu iya haɗawa:

kinit administrator@CLASE.ORG

Ojo, Dole ne yankin ya zama babba.

Sannan zai tambaye mu kalmar sirrin mai amfani (a wannan yanayin mai gudanarwar) kuma idan muka sami saƙo iri ɗaya «Gargaɗi: Kalmarka ta sirri za ta ƙare cikin kwanaki 40 a ranar Litinin 14 Jul 13:57:10 2014» shine ya fito dai-dai.

Kuma har zuwa yanzu sashin farko na karatun. Mun karanta a cikin masu zuwa.

Na riga na yi sharhi a kansa sau da yawa a cikin maganganun, amma na sanya shi nan. Dangane da cewa a halin yanzu bani da kayan aikin da ake buƙata (Ina da PC a gida kuma wannan an ɗora shi yayin wani kwas) kuma cewa yin shi a cikin injuna masu mahimmanci ba shi da sauƙi, ba shi yiwuwa na ci gaba. Idan wani mai ilimi da ƙungiyar suna son ci gaba da wannan, suna da 'yancin yin haka)

Abubuwan da ke cikin labarin suna bin ka'idodinmu na ka'idojin edita. Don yin rahoton kuskure danna a nan.

44 comments, bar naka

Bar tsokaci

Your email address ba za a buga.

*

*

  1. Mai alhakin bayanan: Miguel Ángel Gatón
  2. Dalilin bayanan: Gudanar da SPAM, gudanar da sharhi.
  3. Halacci: Yarda da yarda
  4. Sadarwar bayanan: Ba za a sanar da wasu bayanan ga wasu kamfanoni ba sai ta hanyar wajibcin doka.
  5. Ajiye bayanai: Bayanin yanar gizo wanda Occentus Networks (EU) suka dauki nauyi
  6. Hakkoki: A kowane lokaci zaka iyakance, dawo da share bayanan ka.

  1.   Lolo m

    Mai matukar ban sha'awa, A koyaushe ina son sanin yadda akayi hakan.

    Shin zai yuwu ayi shi ta amfani da SSH maimakon Samba?

    Na fahimci cewa yafi sauri da aminci.

    1.    Claudio Concepcion mai sanya hoto m

      Ya ƙaunataccen Lolo, wannan ba zai yiwu ba, tunda SSH yana ba da damar zama (da sauran abubuwa, kamar canja wurin fayiloli da aikace-aikace) ta hanyar tashar tsakanin kwamfutoci tare da GNU Linux. Yayin da Samba abin da ke haifar da madadin GNU Linux na Microsoft na Aiki Littafin Adireshin Microsoft.

      Son Link abin da ya yi shine mai sarrafa yanki a cikin GNU Linux.

  2.   Antonio m

    Kyakkyawan tuto. Yana da kyau ga mutane irina waɗanda ke da ɗan kore a kai. Godiya mai yawa

  3.   Claudio Concepcion mai sanya hoto m

    Na gode! Madalla da jagora. Amince…

  4.   Rariya m

    Na gode aboki, kwarai da gaske jagorar ka. Ina fata sashi na biyu, a hanyar ka sanya shi aiki da ldap?

    Na gode.

  5.   Sebastian m

    Abin sha'awa sosai, Ina jiran ci gaba. Na gode. ^ _ ^

    PS: Ina tsammanin akwai ƙaramin kuskuren rubutu a cikin tsarin / etc / cibiyar sadarwa / musaya, yana faɗin dns-domian lokacin da nake ganin yakamata ya tafi yankin-dns.

  6.   Wilson ruiz m

    Na ga wannan labarin yana da ban sha'awa sosai. Tunda ni kawai ina cikin tsarin ilmantarwa kuma ba ni da masaniya da yawa a cikin wannan lamarin kuma ina son ƙarin koyo game da gudanarwa da gudanar da tsarin aiki.

  7.   lokacin3000 m

    Shin hakan yana da amfani don samarda aljihunan folda a cikin Debian ko kuwa kawai yana zuwa wani darasin ne?

  8.   Gonzalo m

    Akwai rarraba Linux da ake kira Resara Server dangane da Ubuntu wanda ake amfani da shi kawai don gina mai kula da yanki, na gwada shi kuma yana da sauƙin amfani, Na sami damar shiga kwamfutoci zuwa yankin tare da wannan sabar, Na bar a nan yadda za a yi , watakila wani zai yi amfani da shi - http://ostechnix.wordpress.com/2012/12/31/resara-server-an-alternative-opensource-linux-domain-controller-for-windows-active-directory-controller/

    1.    kari m

      Haba !!! Mai girma, gudummawar ranar .. Na gode 😉

      1.    Gonzalo m

        Maraba! 😀

    2.    Rariya m

      Godiya ga rabawa !!!
      gaisuwa

  9.   Oscar m

    Kyakkyawan koyawa, Zan jira sauran. Na tuna lokacin da na girka PDF a Debian 6 tare da samba 3 da ldap. Yayi aiki amma dole ne inyi amfani da samfuran .pol don shirya umarnin. A wannan yanayin, ta yaya ake gudanar da waɗannan manufofin?

  10.   Mario Guillermo Zavala Silva m

    Kyakkyawan bayani ... Na gode da wannan ...

    MAKIRCIN !!!

  11.   Cesar m

    Madalla…. Ina matukar sha'awar wannan ……. don yaushe kashi na biyu ??? ko kuma idan kuna da littafi don wannan ku aiko mani ta imel ... don Allah !!!! godiya

  12.   Rariya m

    Kyakkyawan koyawa….
    Ina fata wata rana zan sanya shi a aikace ..
    Gaisuwa da jira kashi na biyu !!!!

  13.   Leandro m

    Gaskiyar ita ce, na yi wannan sau ɗaya, amma ban shiga kusan komai ba ... Ina so in ba ku shawarar ku kayan aiki, ban sani ba ko kun san shi ko ba ku sani ba, ban san iyakokinta ba, amma don haɗi zuwa sabar Active Directory ban sami matsala ba, na gwada ta a kwaleji kuma tayi aiki sosai. Ana kiran wannan shirin Haka nan, yana yin daidai da duk abin da kuka yi tare da Samba, babu wani abu da ya wuce wanda ba za ku iya daidaitawa sosai ba, wani abu ne da aka taƙaita shi, tabbas kuna iya gyara abin da kuke buƙata ta yadda kuke so 🙂

    Fata wannan zai iya taimaka muku! Murna

  14.   Kaisar m

    Labari mai ban sha'awa sosai, Zan sa ido zuwa kashi na biyu. Abin mamaki ne matuka gano cewa yana yiwuwa a iya amfani da kundin adireshi na "zamani" tare da Gnu / Linux, Na tuna yin shi tuntuni tare da kundin adireshin NT 4 mai aiki kuma babban abin takaici ne rashin iya kwaikwaya shi lokacin da Microsoft ya canza "tsarin" na LDAP ɗinka a kan Windows 2000 Server.

    Gaisuwa daga Ecuador =]

  15.   Mmm m

    Barka dai. Godiya mai yawa!
    Ina da shakku biyu… menene ainihin kundin adireshin aiki?
    Kuma a gefe guda, za ku iya koyar, idan za ku iya, yadda za ku yi don bincika abin da masu amfani suke yi?
    Gaisuwa da godiya.

    Ni don audior aiwatar da wannan: http://chicheblog.wordpress.com/2011/01/21/como-auditar-la-actividad-de-los-usuarios-en-samba/
    Amma idan kuna iya fadada shi, ko ƙara wani abu wanda kuka sani, ana yabawa!
    gaisuwa

  16.   raulbaca m

    Barka da dare, Gaisuwa daga Peru.
    Ina da tambaya kadan daga duk abin da aka buga, duba don bayyana kadan, duba ina da wannan fayil ɗin da aka saita a cikin fayil /etc/samba/smb.conf

    [Na sirri]
    sharhi = Jaka mai zaman kansa
    hanya = / gida / Masu zaman kansu
    karanta kawai = eh
    browseable = eh
    bako ok = a'a
    jama'a = a'a
    rubuta jerin = @comercial, @gestion
    masu amfani masu amfani = @comercial, @gestion
    ƙirƙirar mask = 0777
    mask din shugabanci = 0777

    Yanzu tambayata tana tafiya, komai yana aiki daidai amma idan daga kwamfuta na shiga tare da mai amfani «pepe» na ƙungiyar «comercial» kuma daga wata kwamfutar ina shiga tare da mai amfani «coco» na ƙungiyar «gestion», mai zuwa yana faruwa idan na kirkiro fayil ko babban fayil daga mai amfani "pepe" kuma ina so in share wannan kundin adireshin ko fayil ɗin da aka ƙirƙira daga ɗayan PC ɗin tare da mai amfani "coco" yana gaya mani cewa ba zan iya ba saboda bani da gata, amma wannan marubucin na iya share wannan fayil ɗin ko kundin adireshi, kun isa.

    An ƙirƙiri babban fayil ɗin mai zaman kansa daga hanya mai zuwa:
    chmod -R 777 / gida / Masu zaman kansu
    Suna aiki a ƙarƙashin hanyar sadarwa iri ɗaya.
    Ina amfani da Distro Ubuntu Server 14.xx
    Ya kamata a lura cewa abin da nake so shine don wannan babban fayil ɗin na sirri da 2 ko sama da masu amfani zasu iya sarrafa shi tare da ra'ayin yin aiki tare da sungiyoyi amma da alama akwai wani abu da na ɓace ko na bari, Ina fatan hankalin ku kuma ina mai da hankali ga ra'ayoyinku.

    1.    Mai Tsarkaka m

      Aboki wanda zaku iya cimmawa ta hanyar cire waƙafi
      ta wannan hanyar.

      rubuta jerin = @comercial @gestion
      masu amfani masu amfani = @comercial @gestion

  17.   Raul Baca Centeno m

    Sannu masoyi,

    Ina so in sani ko kashi na biyu na kwas din har yanzu yana jiran, Ina mai da hankali ga ra'ayoyinku kuma na gode.

  18.   Miguel m

    Barka da rana, yau kawai na karanta duk bayanan kuma ina da na'ura mai inji, saboda wannan dalili na gano cewa baza ku buga sashi na biyu ba kuma ina so in sani ko kuna iya aiwatarwa a cikin babban fayil da dbf da yawa tebur, don samun dama daga kwamfutoci da yawa.
    Da fatan za a ba da amsa da wuri-wuri.

  19.   Raul Ba m

    Masoyi,
    Ina so in sani ko kashi na biyu na wannan darasin mai ban sha'awa har yanzu yana jiran, Ina godiya a gaba don kulawar ku.
    gracias.

  20.   biki m

    Kyakkyawan koyarwa, Ina fatan kun ƙarfafa sashi na biyu, shin zaku iya gaya mani waɗanne ne kayan aikin sarrafa uwar garken nesa don saukarwa da gwada su.

    Na gode.

  21.   BETO m

    Ina taya ku murna, kuma kashi na biyu?

  22.   Daniel Bernal m

    Labari mai ban sha'awa, shin kun sake fasalin na gaba?

  23.   Levy m

    Kyakkyawan koyawa, tambaya ɗaya kawai kashi na biyu, yaya zai kasance ko tare da wannan darasin ya ƙare?

  24.   SARA m

    INA SON RA'AYIN KOYON SABON ABU, NA GODE DA DAUDA DON RABA ILIMINKA,
    GREETINGS

    BAYANIN: AKAN MAGANAR KOYI ZAN YI KOKARIN YINSA AKAN NA'URA MAI ZAGI DEBIAN A MATSAYIN SERVER TARE DA KUNGIYOYI NA KYAUTA KWALIYAN, DAYA DA WIN7 KUMA WANI DA WIN8.

  25.   edgar m

    Wannan jagorar bai cika ba, ba ku sanya takamaiman kundin adireshi ba, kuna barin abubuwa bazuwar, idan da ni ne zan sake maimaita shi

    1.    kari m

      Ko za ku iya kammala shi ku rubuta da kanku, da farin ciki za mu buga muku shi.

  26.   ada bango m

    yadda ake saita sabar a cikin debian 5 domin iya hadawa nesa da xp

  27.   Francisco m

    hi yaya game da lokacin da nake yi:
    root @ pdc: ~ # apt-samun shigar gina-mahimmanci libacl1-dev libattr1-dev libblkid-dev \ libgnutls-dev libreadline-dev python-dev libpam0g-dev \ python-dnspyth gdb pkg-config libpopt-dev libldap2-dev \ dnsutils libbsd-dev attr krb5-mai amfani docbook-xsl libcups2 ac1
    ya gaya mani:
    Lissafin kunshin karantawa ... Anyi
    Ginin dogara
    Bayanin karatun bayanai ... Anyi
    Babu wadatar kunshin-mai mahimmanci, amma wani kunshin ne yake maganarsa.
    Wannan na iya nufin cewa fakitin ya ɓace, an daina amfani da shi, ko
    yana samuwa ne kawai daga wani tushe
    E: Ginin kunshin-mahimmanci ba shi da ɗan takarar shigarwa

    wani taimako? godiya

    1.    m m

      ba a daidaita wuraren ajiya ba

  28.   Carlos m

    Na san ba za ku buga ra'ayina ba. Labarin yana da kyau matuka, ya tafi ba tare da faɗin yadda aka tsara kerberos ba, tunda kuna amfani da shi cikin buƙatun. Me yasa ake tara Samba? Sayi na 4 yanzu yana nan. Ta hanyar tsarin daidaitawa da ka saita, Kinit zai baka wani tsayayyen kuskure NT_STATUS_DENIED!. Ga duk masu sha'awar farawa: https://help.ubuntu.com/lts/serverguide/samba-dc.html