Samba服務器配置和訪問Samba共享_第1頁
Samba服務器配置和訪問Samba共享_第2頁
Samba服務器配置和訪問Samba共享_第3頁
Samba服務器配置和訪問Samba共享_第4頁
Samba服務器配置和訪問Samba共享_第5頁
已閱讀5頁,還剩18頁未讀, 繼續(xù)免費閱讀

下載本文檔

版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領

文檔簡介

實訓指導書三:Samba服務器配置及訪問Samba共享一.實訓目的:.駕馭rpm吩咐安裝軟件包的方法.了解samba服務器的配置文件的編輯和運用方法;.駕馭Samba服務器的安裝和配置方法;.運用samba共享用戶認證和文件系統(tǒng);.駕馭Linux與Windows的資源共享和互訪方法。.實訓內容:.利用rpm吩咐安裝軟件包的方法;.安裝、配置Samba服務器并啟動;.從Linux訪問Windows資源;.從Windows訪問Linux的資源;.Samba項目練習。.實訓練習:SMB協(xié)議和Samba簡介SMB協(xié)議為了使Windows主機間的資源能夠共享,微軟于1980年開發(fā)了SMB(ServerMessageBlock服務信息塊)通信協(xié)議,并通過SMB通信協(xié)議,使網(wǎng)絡上各臺主機之間能夠共享文件、打印機等資源;目前類似這種資源共享的通信協(xié)議還有NFS、Appletalk、Netware等。Samba簡介在局域網(wǎng)中,Windows主機彼此間可利用“網(wǎng)上鄰居”來訪問共享的資源,NFS也能使Linux主機之間實現(xiàn)資源共享。但如何能使Windows主機和Linux主機之間實現(xiàn)資源共享呢?設置當Samba客戶端將帳號及密碼傳送到服務器端時,是否實行密碼加密的方式。客戶的操作系統(tǒng)假如是Windows95OSR2及NTSP3以后的版本,應當將此選項的值設為yes,默認值為noosmbpasswdfile=/etc/samba/smbpasswd設置在Samba服務器上存放加密的密碼文件的位置(留意:Samba服務器與Linux采納不同的密碼文件)。2)設置共享資源參數(shù)comment針對共享資源所作的說明、注釋部分browseable設置用戶是否可以看到此共享資源。默認值為yes,若將此參數(shù)設置為no,用戶雖然看不到此資源,但是擁有權限的用戶仍可干脆輸入該資源的網(wǎng)址來訪問該資源。writable設置共享的資源是否可以寫入。若共享資源是打印機,則不需設置此參數(shù)設置可訪問的用戶。系統(tǒng)會自動將%s轉換成登錄帳號。createmode設置文件的訪問權限,默認值為0744。directorymode設置書目的訪問權限,默認值為0755。path若共享資源是書目,則指定書目的位置;若為打印機,則指定打印機隊列的位置。readonly設置共享資源是否只讀或可以寫入,默認值為yes。若共享資源為打印機時,此參數(shù)無任何意義。這一項與writable相反。Public等同于guestok選項,表示是否允許用戶不運用帳號和密碼便能訪問此資源。假如起用此功能,當用戶沒有帳號和密碼時,則會利用"guestaccount"”所設置的帳號名登錄。該選項默認值為no,即不允許沒有帳號即密碼的用戶運用此資源。avalible設置是否啟用此共享資源。默認值為yes。若將此參數(shù)設置為no,則不管其他參數(shù)設置為什么,全部人均不得運用此資源。validusers3)配置Samba文件共享舉例以下通過配置3個不同的共享書目為例,可以知道配置Samba文件共享的一般方法。[global]采納前面的[global]配置[homes]#用來配置用戶訪問自己的書目comment=HomeDirectories注釋browseable=no用戶私人書目,不給別人閱讀(并不是不允許別人訪問)writable=yes允許用戶寫入自己的書目validusers=%S可訪問的用戶局限于用戶自己。%s會被自動轉換為登錄帳號。createmode=0664文件的訪問權限directorymode=0775書目的訪問權限Thisoneisusefulforpeopletosharefiles[tmp]這個部分為全部用戶供應臨時共享的方式comment=Temporaryfilespace注釋文字path=/tmp指定位置readonly=no可以讀寫public=yes允許用戶不用帳號和密碼訪問[public]這個部分為全部用戶供應可以共同訪問的書目。允許staff組用戶寫入,但其他用戶只可訪問,不能寫入。comment=PublicStuffpath=/home/sambapublic=yeswritable=yesprintable=nowritelist=@staffwritelist參數(shù)是用來設置具有寫權限的用戶列表。這里只允許staff組的成員有寫的權限[fredsdir]這個部分用來設置某一用戶fred的訪問權限。comment=Fred'sServicepath=/usr/fred/privatevalidusers=fred#只有fred可以訪問(留意:即使security=share,也不代表用戶登錄Linux主機后可以訪問隨意資源。)該共享書目public=nowritable=yesprintable=no任務四Linux資源共享與運用項目1:四個用戶joe、karKmary和smith除了有他們自己的在服務器上的共享,這四位用戶同時在同一個部門工作并且須要一個地方來存儲部門的文件。我們將須要一個Linux用戶組,建立二個書目給這些用戶來存儲它們的內容,/smb_test/public允許組中的用戶都可以寫,而/smb」est/legal只允許joe寫,且配置samba服務器來共享書目。?增加用戶組:#groupadd-g6000legal?增加用戶:#useradd-m-u5001-g6000#useradd-m-u5002-g6000karl#useradd-m-u5002-g6000karl#useradd-m-#useradd-m-u5003-g6000marysmith#useradd-m-u5004-g6000smith?修改用戶密碼:passwdjoepasswdkarlpasswdmarypasswdsmith建立書目:mkdir-p/smb_test/legalmkdir-p/smb_test/publie修改書目的組擁有者:chgrplegal./smb_test/legalchgrplegal/smb_test/public修改書目的擁有者:chownjoe/smb_test/legalchownkarl/smb_test/public修改書目的FAP:chmod770/smb_test/legalchmod770/smb_test/publie建立samba用戶密碼文件:cat/etc/passwd|mksmbpasswd.sh>/etc/samba/smbpasswd修改用戶samba密碼:smbpasswdjoesmbpasswdkarlsmbpasswdmarysmbpasswdsmith修改samba配置文件:ftgedit/etc/samba/smb.confThisisthemainSambaconfigurationfile.Youshouldreadthesmb.conf(5)manualpageinordertounderstandtheoptionslistedhere.Sambahasahugenumberofconfigurableoptions(perhapstoomany!)mostofwhicharenotshowninthisexampleAnylinewhichstartswitha;(semi-colon)ora#(hash)isacommentandisignored.Inthisexamplewewillusea#forcommentryanda;forpartsoftheconfigfilethatyoumaywishtoenableNOTE:Wheneveryoumodifythisfileyoushouldrunthecommand〃testparm〃tocheckthatyouhavenotmadeanybasicsyntacticerrors.=======================GlobalSettings=====================================[global]workgroup=NT-Domain-NameorWorkgroup-Nameworkgroup=MSHOMEserverstringistheequivalentoftheNTDescriptionfieldserverstring=SambaServerThisoptionisimportantforsecurity.Itallowsyoutorestrictconnectionstomachineswhichareonyourlocalnetwork.ThefollowingexamplerestrictsaccesstotwoCclassnetworksandthe"loopback"interface.Formoreexamplesofthesyntaxseethesmb.confmanpagehostsallow=192.168.1.192.168.2.127.ifyouwanttoautomaticallyloadyourprinterlistratherthansettingthemupindividuallythenyou'11needthisprintcapname=/etc/printcaploadprinters=yesItshouldnotbenecessarytospellouttheprintsystemtypeunlessyoursisnon-standard.Currentlysupportedprintsystemsinclude:bsd,sysv,pip,Iprng,aix,hpux,qnx,cupsprinting=cupsUncommentthisifyouwantaguestaccount,youmustaddthisto/etc/passwd#otherwisetheuser"nobody"isused;guestaccount=pcguestthistellsSambatouseaseparatelogfileforeachmachinethatconnectslogfile=/var/log/samba/%m.logPutacappingonthesizeofthelogfiles(inKb),maxlogsize=80Securitymode.Mostpeoplewillwantuserlevelsecurity.Seesecurity_level.txtfordetails,security=userUsepasswordserveroptiononlywithsecurity=serverTheargumentlistmayinclude:passwordserver二My_PDC_Name[MyBDCName][My_Next_BDC_Name]ortoauto-locatethedomaincontroller/spasswordserver=*; passwordserver=<NT-Server-Name>PasswordLevelallowsmatchingof_n_charactersofthepasswordfor#allcombinationsofupperandlowercase.;passwordlevel=8;usernamelevel=8Youmaywishtousepasswordencryption.PleasereadENCRYPTION,txt,Win95.txtandWinNT,txtintheSambadocumentation.Donotenablethisoptionunlessyouhavereadthosedocumentsencryptpasswords=yessmbpasswdfile=/etc/samba/smbpasswdThefollowingisneededtokeepsmbclientfromspoutingspuriouserrors#whenSambaisbuiltwithsupportforSSL.;sslCAcertFile二/usr/share/ss1/certs/ca-bundle.crtThefollowingareneededtoallowpasswordchangingfromWindowstoupdatetheLinuxsystempasswordalso.NOTE:UsethesewithJencryptpasswords'andJsmbpasswdfile'above.N0TE2:YoudoNOTneedthesetoallowworkstationstochangeonlytheencryptedSMBpasswords.TheyallowtheUnixpasswordtobekeptinsyncwiththeSMBpassword.unixpasswordsync=Yespasswdprogram=/usr/bin/passwd%upasswdchat=*New*password*%n\n*Retype*new*password*%n\npasswd:*all*authentication*tokens*updated*successfully*YoucanusePAM'spasswordchangecontrolflagforSamba.Ifenabled,thenPAMwillbeusedforpasswordchangeswhenrequestedbyanSMBclientinsteadoftheprogramlistedinpasswdprogram.Itshouldbepossibletoenablethiswithoutchangingyourpasswdchatparameterformostsetups.pampasswordchange=yesUnixuserscanmaptodifferentSMBUsernames;usernamemap=/etc/samba/smbusers#Usingthefollowinglineenablesyoutocustomiseyourconfiguration#onapermachinebasis.The%mgetsreplacedwiththenetbiosname#ofthemachinethatisconnecting;include=/etc/samba/smb.conf.%mThisparameterwillcontrolwhetherornotSambashouldobeyPAM'saccountandsessionmanagementdirectives.ThedefaultbehavioristousePAMforcleartextauthenticationonlyandtoignoreanyaccountorsessionmanagement.NotethatSambaalwaysignoresPAMforauthenticationinthecaseofencryptpasswords=yesobeypamrestrictions二yesMostpeoplewillfindthatthisoptiongivesbetterperformance.Seespeed,txtandthemanualpagesfordetailssocketoptions=TCP^NODELAYSO_RCVBUF=8192SO_SNDBUF=8192ConfigureSambatousemultipleinterfacesIfyouhavemultiplenetworkinterfacesthenyoumustlistthemhere.Seethemanpagefordetails.Configureremotebrowselistsynchronisationhererequestannouncementto,orbrowselistsyncfrom:aspecifichostorfrom/toawholesubnet(seebelow)CausethishosttoannounceitselftolocalsubnetshereBrowserControlOptions:setlocalmastertonoifyoudon,twantSambatobecomeamasterbrowseronyournetwork.Otherwisethenormalelectionrulesapply;localmaster=no#OSLeveldeterminestheprecedenceofthisserverinmasterbrowser#elections.Thedefaultvalueshouldbereasonableoslevel=33DomainMasterspecifiesSambatobetheDomainMasterBrowser.ThisallowsSambatocollatebrowselistsbetweensubnets.Don,tusethisifyoualreadyhaveaWindowsNTdomaincontrollerdoingthisjob;domainmaster=yesPreferredMastercausesSambatoforcealocalbrowserelectiononstartupandgivesitaslightlyhigherchanceofwinningtheelection;preferredmaster=yesEnablethisifyouwantSambatobeadomainlogonserverforWindows95workstations.;domainlogons二yesifyouenabledomainlogonsthenyoumaywantaper-machineorperuserlogonscriptrunaspecificlogonbatchfileperworkstation(machine);logonscript=%m.batrunaspecificlogonbatchfileperusername;logonscript=%U.batWheretostorerovingprofiles(onlyforWin95andWinNT)%Lsubstitutesforthisserversnetbiosname,%UisusernameYoumustuncommentthe[Profiles]sharebelow;logonpath=\\%L\Profiles\%UWindowsInternetNameServingSupportSection:WINSSupport-TellstheNMBDcomponentofSambatoenableit'sWINSServer;winssupport=yesWINSServer-TellstheNMBDcomponentsofSambatobeaWINSClientNote:SambacanbeeitheraWINSServer,oraWINSClient,butNOTbothWINSProxy-TellsSambatoanswernameresolutionqueriesonbehalfofanonWINScapableclient,forthistoworktheremustbeatleastoneWINSServeronthenetwork.ThedefaultisNO.;winsproxy=yesDNSProxy-tellsSambawhetherornottotrytoresolveNetBIOSnamesviaDNSnslookups.Thebuilt-indefaultforversions1.9.17isyes,thishasbeenchangedinversion1.9.18tono.dnsproxy=no微軟的“網(wǎng)上鄰居”就是Windows上利用SMB通信協(xié)議實現(xiàn)資源共享的程序。通過運用“網(wǎng)上鄰居”,用戶在網(wǎng)上共享資源的操作簡潔便利。有鑒于此,Linux愛好者起先在Linux主機上實現(xiàn)SMB通信協(xié)議。Samba是用來實現(xiàn)SMB的一種軟件,由澳大利亞的AndewTridgell開發(fā),是一種在Linux環(huán)境里運行的自由軟件。Samba的工作原理是讓NetBIOS和SMB運行在TCP/IP之上,且運用NetBIOS的nameserver讓Linux機器可以在Windows網(wǎng)絡鄰居里被閱讀。它使得Windows主機和Linux主機之間實現(xiàn)了資源共享。1.3Samba軟件的功能SMB通信協(xié)議采納的是Client/Server架構,因此Samba軟件可以分為客戶端和服務器端兩部分。通過執(zhí)行Samba客戶端程序,Linux主機便可以運用網(wǎng)絡上Windows主機所共享的資源;而在Linux主機上安裝Samba服務器,則可以使Windows主機訪問LinuxSamba服務器共享的資源Samba供應了以下功能:(1)共享Linux的文件系統(tǒng)(2)共享安裝在Samba服務器上的打印機(3)運用Windows系統(tǒng)共享的文件和打印機(4)支持Windows域限制器和Windows成員服務器對運用Samba資源的用戶進行認證(5)支持WINS名字服務器解析及閱讀(6)支持SSL平安套接層協(xié)議2.Samba實訓在本次試驗起先之前,請確保把Linux的防火墻規(guī)劃清掉,讓相應的端口通過。任務一Samba安裝和啟動檢測系統(tǒng)是否安裝了samba服務,假如沒有安裝掛載Linux第一張安裝光盤,利用rpm—ivh吩咐安裝samba,samba-common和samba-clientRPM軟件包并且啟動smb服務。任務一步驟:1)假如用戶在安裝Linux時已經(jīng)安裝了Samba,就無需再安裝了,可以通過下列吩咐確定是否已經(jīng)安裝了Samba。查詢系統(tǒng)是否安裝Samba:CasePreservationcanbehandy-systemdefaultis_no_NOTE:Thesecanbesetonapersharebasis;preservecase=no;shortpreservecase=no#DefaultcaseisnormallyuppercaseforallDOSfiles;defaultcase=lowerBeverycarefulwithcasesensitivity-itcanbreakthings!;casesensitive=no============================ShareDefinitions================[homes]comment=HomeDirectoriesbrowseable=nowritable=yesvalidusers=%Screatemode=0664directorymode=0775Ifyouwantuserssambadoesn,trecognizetobemappedtoaguestuser;maptoguest二baduserUn-commentthefollowingandcreatethenetlogondirectoryforDomainLogons;[netlogon];comment二NetworkLogonService;path=/usr/local/samba/1ib/netlogon; guestok=yes; writable二no;sharemodes=noUn-commentthefollowingtoprovideaspecificrovingprofilesharethedefaultistousetheuser'shomedirectory;[Profiles]; path二/usr/local/samba/profiles; browseable=no; guestok=yesNOTE:IfyouhaveaBSD-styleprintsystemthereisnoneedtospecificallydefineeachindividualprinter[printers]comment=AllPrinterspath=/var/spool/sambabrowseable=noSetpublic=yestoallowuserJguestaccount,toprintguestok=nowritable=noprintable=yesThisoneisusefulforpeopletosharefiles;Ltmp];comment=Temporaryfilespace; path=/tmp; readonly=no;public=yesApubliclyaccessibledirectory,butreadonly,exceptforpeopleinthe"staff"group[public]comment=PublicStuffpath=/smb_test/publicpublic=nocreatemask=0660printable=nowritelist=@legalOtherexamples.Aprivateprinter,usableonlybyfred.Spooldatawillbeplacedinfeed'shomedirectory.Notethatfredmusthavewriteaccesstothespooldirectory,#whereveritis.;[fredsprn]; comment=Fred,sPrinter; validusers=fred;path=/home/fred;printer=freds_printer; public=no; writable=no;printable=yesAprivatedirectory,usableonlybyfred.Notethatfredrequireswrite#accesstothedirectory.;[fredsdir];comment=Fred,sService;path=/usr/somewhere/private; validusers二fred; public=nowritable=yesprintablenoprintablenoaservicewhichhasadifferentdirectoryforeachmachinethatconnects#thisallowsyoutotailorconfigurationstoincomingmachines.Youcould#alsousethe%Uoptiontotailoritbyusername.The%mgetsreplacedwiththemachinenamethatisconnecting.;[pchome];comment二PCDirectories;path=/usr/local/pc/%m;public二no;writable=yesApubliclyaccessibledirectory,read/writetoallusers.Notethatallfiles#createdinthedirectorybyuserswillbeownedbythedefaultuser,so#anyuserwithaccesscandeleteanyotheruser'sfiles.Obviouslythis#directorymustbewritablebythedefaultuser.Anotherusercouldofcourse#bespecified,inwhichcaseallfileswouldbeownedbythatuserinstead.;[public]; path二/usr/somewhere/else/public; public=yes; onlyguest=yes; writable=yes; printable=noThefollowingtwoentriesdemonstratehowtoshareadirectorysothattwouserscanplacefilestherethatwillbeownedbythespecificusers.Inthis#setup,thedirectoryshouldbewritablebybothusersandshouldhavethe#stickybitsetonittopreventabuse.Obviouslythiscouldbeextendedto#asmanyusersasrequired.[legal]comment=Legal'sfilespath=/smb_test/legalvalidusers=?legalpublic=nocreatemask=0660writelist=joe?存儲samba配.?重啟samba服務:/etc/init.d/smbrestart或servicesmbrestart?確認Linux虛擬機和Windows?確認Linux虛擬機和Windows主機配:I,?上itfi;在一個網(wǎng)段上,網(wǎng)絡連接正常?在Windows系統(tǒng)中運行:項目2:Geecy軟件開發(fā)公司即將起先在Linux系統(tǒng)上進行兩個項目的開發(fā)。開發(fā)人員David和Peter組成一個小組,負責A項目的開發(fā);開發(fā)人員Jack和Mike組成另一個小組,負責B項目的開發(fā)。系統(tǒng)管理員Ray須要為這四名開發(fā)人員分別建立用戶帳號,配置samba服務器并滿意以下要求:(1)建立書目“/project_a",該書目里面的文件只能由David和Peter兩人讀取、增加、刪除、修改以及執(zhí)行,其他用戶不能對該書目進行任何的訪問操作;(2)建立書目“/project)“,該書目里面的文件只能由Jack和Mike兩人讀取、增加、刪除、修改以及執(zhí)行,其他用戶不能對該書目進行任何的訪問操作;(3)建立書目“/project”,該書目里面的文件只能由David、Peter、Jack和Mike四人讀取、增加、刪除、修改以及執(zhí)行,其他用戶只可以對該書目進行只讀的訪問操作。rpm-qa|grepsamba若出現(xiàn)這5個軟件包,則表示已經(jīng)安裝了Samba,否則必需安裝Samba。2)單擊菜單欄“虛擬機”,選擇“可移動設備一>CD?ROM”,載入第一張ISO映像文件,例如:D:\RedHatLinux_ISOFiIes\RedHatLinux9J386_discl.iso,將光盤掛載到/mnt/cdrom書目;mount/dev/cdrom/mnt/cdrom3)切換到放置rpm文件的書目;cd/mnt/cdrom/RedHat/RPMS4)Samba必備的程序,必需安裝;5)安裝Samba服務器程序,可以使Windows主機訪問Samba服務器共享的資源;6)安裝Samba客戶端程序,可以使Linux主機訪問Windows主機上的共享資源;或者4),5)和6)合為如下操作:rpm-ivh/mnt/cdrom/RedHat/RPMS/samba-c^rpm-ivh/mnt/cdrom/RedHat/RPMS/samba-2*7)啟動smb服務;#servicesmbstart當能看到下面的顯示,就表示啟動勝利。StartingSMBservice [確定]StartingNMBservice[確定]StartingNMBservice[確定]啟動smb服務也可以運用吩咐:#/etc/init.d/smbstart8)停止smb服務;#servicesmbstop或者:/etc/init.d/smbstop8)重啟smb服務/etc/init.d/smbrestart或^■:#servicesmbrestart任務二Windows資源共享與運用1.Windows資源共享:1)運用TCP/IP協(xié)議作為Windows系統(tǒng)網(wǎng)絡默認通訊協(xié)議;2)在主機Windows操作系統(tǒng)中的DOS吩咐模式下運行ipconfig/all指令得到本地連接的IP地址和子網(wǎng)掩碼,例如:;3)在虛擬機中以root用戶登錄,確保把Linux的防火墻規(guī)劃清掉。啟動終端,運用ifconfig指令對虛擬機的網(wǎng)絡地址進行配置,將虛擬機和主機配置在一個網(wǎng)段:(詳細地址視實際狀況而定);#manifconfig(查看ifconfig吩咐的用法)#ifconfig(查看當前虛擬網(wǎng)卡配置)#ifconfigethO6netmask(配置當前虛擬網(wǎng)卡)#ifconfigethOup(啟動網(wǎng)絡連接)假如能ping通,表明連接正常。假如不能ping通,檢查Windows主機防火墻配置(是否防止Ping入);4)設置好Windows系統(tǒng)計算機名(例如:WINSERVER)和所屬工作組(例如:WORKGROUP);6)在Windows系統(tǒng)建立文件夾smb_win_test,運用寫字板建立文件windows_test.txt,,內容為:“ThisisafilefortheLinuxsmbtest!”,共享文件夾smb_win_test;7)在Windows系統(tǒng)建立用戶test,密碼為:“123456”Windows共享資源的運用:1)確認Linux虛擬機和Windows主機配置在一個網(wǎng)段上,網(wǎng)絡連接正常;2)在Linux虛擬機上啟動smb服務;servicesmbstart當能看到下面的顯示,就表示啟動勝利;StartingSMB service [確定]StartingNMB service [確定]3)在Linux計算機上,執(zhí)行以下吩咐;將在Linux計算機上列表顯示出Windows系統(tǒng)計算機WINSERVER所供應的全部共享信息;4)在Linux計算機上,執(zhí)行以下吩咐;smbclient//1其中test是Windows計算機上的用戶,系統(tǒng)提示輸入test的密碼,輸入“123456”,密碼驗證正確后,系統(tǒng)提示:smb:>此時表明已正確登錄到Samba服務器上,可以用smbclient的指令,象用FTP指令一樣上傳和下載文件。smbclient吩咐說明吩咐?或helpEcommand]!吩咐?或helpEcommand]![shellcommand]cd[書目]led[書目]dir或Isexit或quit供應關于幫助或某個吩咐的幫助;執(zhí)行所用的SHELL吩咐,或讓用戶進入SHELL提示符;切換到服務器端的指定書目,如未指定,則返回當前本地書目;切換到客戶端指定的書目;列出服務器端當前書目下的文件;退出smbclient;getfilelfile2mgetfilelfile2file3filenmd或mkdir書目rd或rmdir書目從服務器上下載filel,并以文件名file2從服務器上下載filel,并以文件名file2存在本地機上;假如不想改名,可以把file2省略;從服務器上下載多個文件;在服務器上創(chuàng)建書目;刪除服務器上的書目向服務器上傳一個文件filel,傳到服務器上改名為file2;mputfilelfile2filen向服務器上傳多個文件5)運用md吩咐在Windows服務器上建立“passwd_bak”書目,將Linux系統(tǒng)中/etc/passwd,/etc/group和/etc/shadow等3個文件上傳到Windows服務器的upasswd_bakv書目中,在Windows系統(tǒng)中運用寫字板查看這3個文件。寫出操作吩咐和過窗并加以驗證。6)在Linux系統(tǒng)中/root書目下建立書目/smb_linux_test,將Widows系統(tǒng)中在“smb_win_test”書目下的文件windows_test.txt卜載到本機/root/smb_linux_test書目下,更命為windows_test_to_linux.txt,在Linux系統(tǒng)中運用gedit查看這個文件。寫出操作吩咐和過程,笄加以驗證。7)運用smbmount吩咐知道某臺主機所共享的資源后,執(zhí)行smbmonut吩咐將遠程共享掛載到本地。先創(chuàng)建掛載點書目:mkdir-p/mnt/smb/win_share_dir將遠程共享〃掛載到本地書目/mnt/smb/win_share_dirsmbmount///smb_win_test/mnt/smb/win_share_dircd/mnt/smb/win_share_dir這樣就可以象訪問本機書目一樣操作此掛載的書目了。若要卸載已掛載的書目,則執(zhí)行umount吩咐即可。umount/mnt/smb/win_share_dir任務三samba服務器的配置文件的編輯和運用方法Samba最主要的配置文件是

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
  • 4. 未經(jīng)權益所有人同意不得將文件中的內容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
  • 6. 下載文件中如有侵權或不適當內容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論