SAMBA telepítési leírás



Hasonló dokumentumok
SAMBA. Forrás: Lajber Zoltán: SAMBA alapok dia, SZIE

Csatlakozás a BME eduroam hálózatához Setting up the BUTE eduroam network

1. sz. melléklet: Az önálló PDC-ként működő Samba szerver konfigurációs állománya

Samba. SMB/CIFS hálózat, heterogén hálózatok. Készítette: Sallai András

4. Gyakorlat: Csoportházirend beállítások

Using the CW-Net in a user defined IP network

1. Gyakorlat: Telepítés: Windows Server 2008 R2 Enterprise, Core, Windows 7

10. Gyakorlat: Alkalmazások publikálása Remote Desktop Szervízen keresztül

Ellenőrző lista. 2. Hálózati útvonal beállítások, kapcsolatok, névfeloldások ellenőrzése: WebEC és BKPR URL-k kliensről történő ellenőrzése.

(NGB_TA024_1) MÉRÉSI JEGYZŐKÖNYV

LINUX LDAP címtár. Mi a címtár?

11. Gyakorlat: Certificate Authority (CA), FTP site-ok

Samba szerver. 2., VMware szerver telepítés

Laborgyakorlat: A Windows XP haladó telepítése

2. gyakorlat: Tartományvezérlő, DNS, tartományba léptetés, ODJ, Core változat konfigurálása, RODC

Windows hálózati adminisztráció segédlet a gyakorlati órákhoz

Alap protokollok. NetBT: NetBIOS over TCP/IP: Name, Datagram és Session szolgáltatás.

USER MANUAL Guest user

Proxer 7 Manager szoftver felhasználói leírás

Hálózati adminisztráció Linux (Ubuntu 8.04) 12. gyakorlat

Széchenyi István Egyetem

1. Ismerkedés a Hyper-V-vel, virtuális gépek telepítése és konfigurálása

ALAP BEÁLLÍTÁSOK. 1. Jogosultság megadás, hogy tudjunk dolgozni sudo s jelszó:xxxxxx. 2.Hálózati kártyák beállítása mcedit /etc/network/interfaces

Az operációs rendszerek fejlődése

9. Gyakorlat: Network Load Balancing (NLB)

Teszt topológia E1/1 E1/0 SW1 E1/0 E1/0 SW3 SW2. Kuris Ferenc - [HUN] Cisco Blog -

BackupPC. Az /etc/hosts fájlba betehetjük a hosztokat, ha nem a tejles (fqdn, DNS név) névvel hivatkozunk rájuk: # /etc/hosts #

2. lépés: openssh szerver telepítés sudo apt-get install openssh-server

EN United in diversity EN A8-0206/419. Amendment

Kézikönyv Nyomtatók kezelése Linuxon

LOK Lajber Zoltán

Szoftvertelepítési útmutató NPD HU

Személyes adatváltoztatási formanyomtatvány- Magyarország / Personal Data Change Form - Hungary

SOPHOS simple + secure. A dobozba rejtett biztonság UTM 9. Kókai Gábor - Sophos Advanced Engineer Balogh Viktor - Sophos Architect SOPHOS

Utasítások. Üzembe helyezés

SSH haladóknak. SSH haladóknak

1.2. NFS kliens telepítése és beállítása

Mérési útmutató a Secure Shell (SSH) controll és audit című méréshez

LDAP azonosítás a gyakorlatban egy esettanulmány A kliensek beállítása (2. rész)

5.4.2 Laborgyakorlat: A Windows XP telepítése

Windows hálózati adminisztráció segédlet a gyakorlati órákhoz

SaMBa alapok Lajber Zoltán

Személyes adatváltoztatási formanyomtatvány - Magyarország / Personal Data Change Form - Hungary

KÜRT Zrt. Logelemzés heti riport Felhasználói fiók, illetve felhasználói csoportkezelési műveletek

PromoCoder_7031/Lx3 rendszer használati utsítás v1.1

Hogyan használja az OROS online pótalkatrész jegyzéket?

Utolsó módosítás:

Windows XP -> 7 - Samba4 a PPKE-n

Angol Középfokú Nyelvvizsgázók Bibliája: Nyelvtani összefoglalás, 30 kidolgozott szóbeli tétel, esszé és minta levelek + rendhagyó igék jelentéssel

Fájlok megosztása. Fájlok megosztása A számítógépek már nagy háttértárolókkal rendelkeznek De még mindig szükség van fájl szerverekre.

Windows hálózati adminisztráció segédlet a gyakorlati órákhoz

Fájl és nyomtatószerver heterogén hálózatokban. Kapcsoljuk be a biztonsági öveket...

T Á J É K O Z T A T Ó. A 1108INT számú nyomtatvány a webcímen a Letöltések Nyomtatványkitöltő programok fülön érhető el.

Verziókezelt konfigurációmanagement++ Pásztor György, SZTE Klebelsberg Könyvtár

Tájékoztató a kollégiumi internet beállításához

S z á m í t ó g é p e s a l a p i s m e r e t e k

Nagios NSCA Indirect Monitoring, Passive Check

Kiegészítők telepítése Installing Addons

Mobil Telefonon Keresztüli Felügyelet Felhasználói Kézikönyv

Mikrotik 6.22 telepítés

2. Tartományvezérlő, DNS, Core konfigurálása, Powershell

A NÉGY BŰVÖS HÁRMAS WWW FTP SQL PHP. BRKK::Békéscsaba Linux rendszergazda képzés 2008

Cloud computing. Cloud computing. Dr. Bakonyi Péter.

Számítógépes Hálózatok GY 8.hét

Új funkciók az RBP-ben október 1-től New functions in RBP from 1 October Tatár Balázs

Netis vezeték nélküli, N típusú, router

Adatbázis-kezelés ODBC driverrel

További lehetőségek. Nighthawk X6 AC3200 Tri-Band WiFi-router. R8000-as modell

Webtárhely létrehozása a helyen. Lépések Teendő 1. Böngészőbe beírni: 2. Jobb oldalon regisztrálni (tárhelyigénylés).

Windows hálózati adminisztráció

Windows hálózati adminisztráció segédlet a gyakorlati órákhoz

Gyors telepítési kézikönyv

1. Kapcsolók konfigurálása

Cloud computing Dr. Bakonyi Péter.

Gyors üzembe helyezési kézikönyv

Oralce kliens installálása Windows Server 2003-ra

Operációs rendszerek gyak.

2 Helyezze be a CD-ROM-ot a CD-ROM meghajtóba.

SQL/PSM kurzorok rész

A JAVA FUTTATÁSAKOR ELŐFORDULÓ HIBA-

EN United in diversity EN A8-0206/473. Amendment

Linux hálózati adminisztráció

Lexington Public Schools 146 Maple Street Lexington, Massachusetts 02420

Netis vezeték nélküli, N típusú Router Gyors Telepítési Útmutató

1. Üres merevlemez gépbe helyezése, Boot a CD1 telepíto lemezrol (Hiba esetén video állítása VGA módra F4 billentyüvel, )

A First Businesspost Sender Cockpit használata

Create & validate a signature

Szalai Ferenc

CSOMAGSZŰRÉS CISCO ROUTEREKEN ACL-EK SEGÍTSÉGÉVEL PACKET FILTERING ON CISCO ROUTERS USING ACLS

Internetkonfigurációs követelmények. A számítógép konfigurálása. Beállítások Windows XP alatt

Felhasználóbarát eszközök és élmények. Üzleti szintű megoldások

ANGOL NYELVI SZINTFELMÉRŐ 2013 A CSOPORT. on of for from in by with up to at

Felhasználói Útmutató. Center V2

A B C D E F. F: 4. LAN port LED G: Táp csatlakozó H: 4. LAN port I: 3. LAN port J: 2. LAN port

Előnyei. Helyi hálózatok tervezése és üzemeltetése 2

Operációs Rendszerek I.

ÁLTALÁNOSAN LEÍRVA: KONKRÉTAN AZ INSOMNIA ESETÉBEN:

Construction of a cube given with its centre and a sideline

Hálózati betekint ő program telepítése mobil telefonra. Symbian. alarm shop. Windows mobile Android IPhone Blackberry

Mapping Sequencing Reads to a Reference Genome

Átírás:

SAMBA telepítési leírás Hozzávalók: 1 linuxos szerver 1 winfos xp A Linux alaprendszert feltelepíted és belövöd (graf. felület, vmware, ftp, ssh, stb), majd lehúzod ftp-n az előtelepített xp-t. Ezt a megszokott módon bekonfigurálod. (fix ip, light kinézett, gép név, stb...) Ha minden működik akkor jöhet a SAMBA! Telepítés: Telepítsd fel a samba nevű csomagot! A telepítés során az első kérdése, hogy milyen tartományba vagy munkacsoportba tegye a gépet. Ide a grp2xx -et kell beírni. A telepítésnek a következő kérdésének a válasza: nem. Ha szépen feltelepült akkor ftp-n keresztül töltsed le smb.conf állományt és írd felül a /etc/samba könyvtárban lévő eredeti fájlal. A következő lépés, hogy root jogot kell adni a bemásolt fájlnak a következő paranccsal: chown root /etc/samba/smb.conf A SAMBA konfigurálása: A konfigurálást a config fájlal mutatom be! A módosított sorokat piros színnel fogom átírni! Az eredeti smb.conf állománytól eltér a sorok a számozása, mivel ez már a kész kibővített állomány!!! A sorok száma ne legyen mérvadó a munkád során, csak mérvadó. Most beállítjuk a fájlszerver nevét. A 20. sorban workgroup = után ki kell törölni ami ott van és át kell írni a grp2xx-re. Most létrehozunk egy publikus megosztást. A 485-489 sor elöl kitöröljük a ;-ket. Így létrejön a publik megosztás. A 485-ik sor a megosztás neve, a 486-ik sor a megosztás kommentje, 487-ik sor a megosztás elérési útvonalát jelöli meg. Állítsuk be most a karakterkódolást. A 350 és 351-ik sor elől vegyük ki a #. A 350-ik sorban a 850-et 852-re, a 351-ik sorban az ISO8859-1-t, ISO8859-2-re kell átírni. Ezek után hozzuk létre a /home/samba/public nevű könyvtár szerkezetet. És egyelőre kapjon 777-es jogot. A 352-ik sorba írjuk be, hogy logon drive = H: Így a home meghatónak a betűjele H lesz. Utána samba restart. Tartomány vezérlő beállítása: Így ezzel a módszerrel tudjuk a windfonsos gépet beléptetni a SAMBA-ba. Az smb.confban ehhez öt dolgot kell megpiszkálni: 180. sorban: # törlés és no-ról yes-re kell átírni. 184. sorban: # törlés a 33 helyett 99-et kell beírni. - Ez azt mutatja meg, hogy a SAMBA hol helyezkedjen el a hierarchiában. 189, 193, 198-ik sorok elöl töröld ki a #. Most hozzáadjuk az XP-t a tartományhoz. Ehhez szerkesztésre nyisd meg a /etc/passwd állományt. Az utolsó sorba a következőt kell beírni: xp2xx$:*:1009:421:xp2xxgep:/dev/null:/dev/null Nem biztos, hogy 1009-nek kell beírni. Ez attól függ, hogy mi jön következőnek, és így a következő számot kell beírni ami a listában van.

Most hozzuk létre a machines csoportot /etc/group fájlban. Az utolsó sorban vegyünk fel a következő sort: machines:x:421: Ezek után adjuk hozzá a gépet a SAMBA-hoz a következő paranccsal: smbpasswd -a -m xp2xx A root felhasználót is hozzá kell adni a SAMBA-hoz mert winfos alól csak rootként lehet beléptetni a tartományba. Ehhez ezt a parancsot kell kiadni: smbpasswd -a root Ha minden ok akkor már az XP-t be is tudjuk léptetni a megfelelő tartományba. Win alól rendszergazdaként sajátgép jobb klik -> tulj. -> Számítógépnév -> módosítás -> tartományba a bogyó és be kell írni azt, hogy GRP2XX. Felhasználói nevet és jelszót fog kérni, felhasználói névnek root és a hozzátartozó SAMBAS-s jelszót kell megadni. Majd XP restart. Felhasználók létrehozása: Mindenek előtt létre kell hozni felhasználói csoportokat. A /home könyvtárban létre kell hozni egy tanarok és egy diakok nevű mappát. Utána ki kell adni a groupadd tanarok és groupadd diakok parancsot. Így létrejönnek a felhasználói csoportok. Felhasználókat hozhatunk létre az addhalgatok scriptel is, de én most a hagyományos módot mutatom meg: adduser -g csopot_neve -d /home/csoport_neve/user_neve -m user_neve Például ha a diak1-t létreszeretném hozni és ha a diakok nevű csoportba szeretném tenni akkor a következő parancsot kell kiadnom: adduser -g diakok -d /home/diakok/diak1 -m diak1 Ezek utána adjunk nekik jelszavat a passwd user_neve paranccsal. Miután minden felhasználó kész és van jelszava akkor. Akkor ezeknek a felhasználóknak SAMBA jelszót is kell adni a következő paranccsal: smbpasswd -a user_neve A felhasználók quotázása: Ezzel tudjuk azt szabályozni, hogy a felhasználók egy adott partíción mekkora tárterületet foglalhatnak el. Telepítsd fel a quota csomagot. Utána szerkesztésre nyisd meg a /etc/fstab állományt. Itt kell megadni, hogy melyik partícióra legyen érvényes a felhasználók quotája. A mi esetünkben a /home -ra lesz szükségünk. A /home sorban lévő defaults után vesszővel elválasztva ezt kell beírni: usrquota. Ez után gép restart. Majd pl quotázzuk be a diak1 nevű felhasználót;

edquota diak1 Soft értéknek egy figyelmeztető határt kell megadni. Hard-nak a tényleges értéket kell megadni, amitől nagyon tárhelye nem lehet a felhasználónak. Most másoljuk a quotákat a többi diaknak is. edquota -p diak1 diak2 A diak1 quotája másolódik a diak2 felhasználónak. Ezt a qoutázási folyamatott meg kell csinálni a tanarok felhasználókkal is, de ott nagyobb quotát kell beállítani! Windows profilok: Sima felhasználói profil: Ilyenkor a gépen van tárolva a felhasználó és az adatai is roaming profil: Vándorló profil, a felhasználót követik a beállításai mandatory profil: Beégett beállítássokkal rendelkező profil Profil másolás: Ezzel a módszerrel létrehozunk egy minta nevű felhasználót és ennek a felhasználónak a beállításait fogja megkapni a SAMBA-s felhasználó amikor legelőször bejelentkezik. Win alól rendszergazdaként sajátgép, jobb klik -> kezelés -> Helyi felhasználók és csoportok -> Felhasználók -> jobb klik a fehérségbe -> új felhasználó Legyen például minta a felhasználónak a neve és a jelszava is. minta felhasználóként szépítsük ki a windows-t a suliban tanult módszer szerint! Mind ezek beállítások mellett még egy-két fontos ikont pakoljunk ki a minta felhasználónak. Például a Total commander és firefox ikonjait. Csak egy alkalomra csatoljuk fel a public nevű megosztást H: betűjelű meghajtóként; Sajátgép -> hálózati meghajtó csatlakoztatása. Meghajtónak H:, mappának a public megosztást kell kitallózni, alatta a pipát feltétlenül ki kell venni! Utána megcsináljuk azt, hogy alapértelmezett mentési hely a H meghajtó legyen. Jobb klik a dokumentumokon és tulajdonságok. A célhoz írjuk be H: Még a firefoxot kell még belőni. A bőngésző cash-t 0-ra kell állítani és alapértelmezett mentési helynek a H meghajtót kell megadni. Ha minden szép és jó a minta felhasználónak a profiljában akkor vissza kell jelentkezni rendszergazdaként. Most alapértelmezett profil beállítássá tesszük a minta felhasználót. Jobb klik sajátgép -> tulj -> speciális -> Felhasználói profilok -> katt minta -> másolás. Itt tallózd ki a Default User könyvtárat, Használhatja -> mindenki. Roaming profil beállításai: A 210-ik sorban lévő # töröljük ki. Ez engedélyezi a vándorló profilt. Ehhez viszont szükség lesz a szerveren egy profiles megosztáshoz. Ebben a profiles megosztásban fognak tárolódni a windows-os profilok. Ezért a 386-390-ik sorig ki kell törölni a #. Utána létrekell hozni a /var/lib/samba/profiles könyvtárszerkezetet. Erre 777-es jogot kell adni a chmod 777 /var/lib/samba/profiles paranccsal. Ezzel a módszerrel a profilok letöltődnek a szerverről a win-re, kijelentkezéskor pedig vissza vándorolnak. Mandatory profil beállítása: Ezzel a módszerrel egyénre szabhatjuk a beállításokat, majd a beállításokat befagyaszthatjuk. Így ha bármi változtatást végez a user a profilján az automatikusan visszaáll az eredeti beállításokkal amikor megint bejelentkezik a felhasználó. Ennek a

kivételezése úgy zajlik, hogy bejelentkezünk a beégetni kívánt felhasználóval és elvégezzük a megfelelő beállításokat a munkájához. Program ikonok, stb... Miután kijelentkezik az adott user beégetjük a profilját a következő módon; Át kell nevezni a /var/lib/samba/profiles/user/ntuser.dat fájlt ntuser.man-ra. Ezt lehet kivételezni pl a krusaderrel is akár. Log in script alkalmazása: Ezt arra lehet használni, hogy időszinkronizációt, hálózati meghajtó automatikus felcsatolását és üzenet kiíratását meglessen valósítani. Ehhez fel kell telepíteni az ntlogon-t. Ezt ftp-n keresztül kell letölteni. Majd telepítés előtt telepítsd fel a python-t. Az smb confban engedélyezni kell a scriptek futtatását. Ezt a 205-ik sorban lévő # törlésével lehet elvégezni. Most létre kell hozni a netlogon megosztást; A 369-ik sortól a 373-ik sorig ki kell törölni a #. Létekell hozni a /var/lib/samba/netlogon nevű könyvtárat erre chmod 777 /var/lib/samba/netlogon paranccsal 777 jogot adunk. Még annyit kell csinálni, hogy a 381 és 382-ik sor elől ki kell törölni a #. Ezzel így létrehozza a.bat fájt majd törli is azt miután az lefutott. Most szerkesztésre nyisd meg /etc/ntlogon.conf állományt. A 7. sorban a SERVERNAME = c2xx-et kell beírni. Ez a szervernek a neve. A 12-ik sorban lévő globalshare helyett írd be azt, hogy public. Az 5-ik sorban a G:-t írd át P:-ra, így a publikus meghajtónak a betűjele P lesz minden felhasználónak. 16-ik sor elé # kell betenni. Mentés után ha minden jól ment akkor fel kell csatolódnia automatikusan a P meghajtónak. Időszinkronizáció: Az smb.conf-ban a globális részben, pl a 353-ik sorban vegyük fel a következő sort: time server = yes. Az ntlogon.conf-ban a 11-ik sorban ennek kell lennie: NET TIME \\%SERVERNAME /SET /YES Win alól rendszergazdaként vezérlőpult -> Felügyeleti eszkzök -> Helyi biztonsági házirend -> Helyi házirend -> felhasználói jogok kiosztása -> rendszeridő megváltoztatása -> hozzáadás -> mindenki. Majd mappa beállítások -> kapcsolat nélküli fájlok -> a legfelső pipát ki kell venni. Majd winfo$ restart. Ha minden oké akkor nem kell minden gépen külön beállítani az órát, hanem automatikusan a szervertől kéri le az időt. Üzenet kiíratása bejelentkezéskor: Hozz létre egy fontos.txt nevű fájlt a /home/samba/public könyvtárban. Írj bele valami roppant fontosat amire fel kell hívnod a felhasználók figyelmét. Az ntlogon.conf-ban pl a 13-ik sorba írjuk be a következőt: call P:\fontos.txt. Így belejelentkezéskor automatikusan megnyitja a fontos.txt fájlt. Egyéb megosztás létrehozása: Csináljuk meg először azt, hogy csak a tanarok nevű csoport tudjon írni a publikus területre, a diakok csoport csak olvasni tudja. Ezt az smb.conf 490-ik sorának a módosításával lehet megtenni. A ; ki kell törölni és az = után @tanarok -kat kell beírni. A publikus terület szerkeszthetőségért a chgrp -R tanarok /home/samba/pubic parancsot kell kiadni. A /home/samba/public nevű mappára 775-ös jogot kell kiosztani. Most kell csinálni egy olyan megosztást ami diakok könyvtárait jeleníti meg és ez csak a tanarok nevű csoport tagjainak jelenjen meg és automatikusan csatolódjon fel nekik ez a megosztás. A smb.conf-ba pl. 367-ik sortól kezdeve vegyük fel a következő sorokat: [diakok] path = /home/diakok valid users = @tanarok browseable = no Az ntlogon.conf fájlt a 26 és 28-ik sorokat írjuk át a következőre: 26.: [Group-tanarok]

28.: NET USE T: \\%SERVERNAME\diakok /YES Így a tanarok nevű csoportnak automatikusan fel fog csatolódni a T meghajtó és a dikok nevű csoport tagjainak a mappáit fogja megjeleníteni. Még egy-két megosztáson meg kell csinálni azt, hogy hogy a hálózati tallózásban ne legyenek elérhetőek. Ezt az összes megosztásban meg kell csinálni. Így minden megosztást ami még nem tartalmazza ezt a paramétert akkor ezzel a sorral kell kiegészíteni: browseable = no Csináljuk meg azt, hogy a ponttal kezdődő fájlokat ne jelenítse meg a bejelentkezett felhasználóknak! Ehhez a home megosztásba a következő új sort kell felvenni: veto files = /.*/ Még tegyük meg azt, hogy ha rootként jelentkezne be valaki win alól akkor a home könyvtára ne csatolódjon fel neki. Ehhez a home megosztáshoz a következő sort kell felvenni: invalid users = root Nyomtató megosztás: Ehhez telepítsd fel a cupsys nevű csomagot! A nyomtatást egy webes felületen tudjuk vezérelni. Így a böngésződbe írd, hogy 127.0.0.1:631. Itt add printer, a nyomtatónak legyen mondjuk a neve printer2xx, majd következő oldalon az LPT #1-t kell kiválasztani, a következő oldalon tetszőlegesen válasz egy nyomtatót. A végén a root/uborka párossal lehet hozzáadni a nyomatót a felugró ablakon. Windows alól rendszergazdaként csatlakoztassuk a megosztott nyomtatót. Állítsuk be azt, hogy csak a tanarok nevű csoport tagjai tudjanak nyomtatni. Ehhez az smb.conf fájlban a 416-ik sorban a guest ok = no 417-ik sorba a valid users = @tanarok -t kell felvenni. Felhasználói szintű logolás: A 60-ik sorban az %m.log-t %U.log-ra kell átírni 1. 2. # This is the main Samba configuration file. You should read the 3. # smb.conf(5) manual page in order to understand the options listed 4. # here. Samba has a huge number of configurable options (perhaps too 5. # many!) most of which are not shown in this example 6. # 7. # Any line which starts with a ; (semi-colon) or a # (hash) 8. # is a comment and is ignored. In this example we will use a # 9. # for commentry and a ; for parts of the config file that you 10. # may wish to enable 11. # 12. # NOTE: Whenever you modify this file you should run the command "testparm" 13. # to check that you have not made any basic syntactic errors. 14. # 15. #======================= Global Settings ===================================== 16. [global] 17. 18. # 1. Server Naming Options: 19. # workgroup = NT-Domain-Name or Workgroup-Name 20. workgroup = grp212 21.

22. # netbios name is the name you will see in "Network Neighbourhood", 23. # but defaults to your hostname 24. # netbios name = <name_of_this_server> 25. 26. # server string is the equivalent of the NT Description field 27. server string = Samba Server %v 28. 29. # Message command is run by samba when a "popup" message is sent to it. 30. # The example below is for use with LinPopUp: 31. ; message command = /usr/bin/linpopup "%f" "%m" %s; rm %s 32. 33. # 2. Printing Options: 34. # CHANGES TO ENABLE PRINTING ON ALL CUPS PRINTERS IN THE NETWORK 35. # (as cups is now used in linux-mandrake 7.2 by default) 36. # if you want to automatically load your printer list rather 37. # than setting them up individually then you'll need this 38. printcap name = cups 39. load printers = yes 40. 41. # printcap cache time, so samba will automatically load new cups printers 42. printcap cache time = 60 43. 44. # It should not be necessary to spell out the print system type unless 45. # yours is non-standard. Currently supported print systems include: 46. # bsd, sysv, plp, lprng, aix, hpux, qnx, cups 47. printing = cups 48. 49. # Samba 2.2 supports the Windows NT-style point-and-print feature. To 50. # use this, you need to be able to upload print drivers to the samba 51. # server. The printer admins (or root) may install drivers onto samba. 52. # Note that this feature uses the print$ share, so you will need to 53. # enable it below. 54. # Printer admins are now defined by granting the SePrintOperatorPrivilege, ie: 55. # run: net rpc rights grant 'DOMAIN\Printer Operators' SePrintOperatorPrivilege 56. 57. # 3. Logging Options: 58. # this tells Samba to use a separate log file for each machine 59. # that connects 60. log file = /var/log/samba/%u.log 61. 62. # Put a capping on the size of the log files (in Kb). 63. max log size = 50 64. 65. # Set the log (verbosity) level (0 <= log level <= 10) 66. # log level = 3 67. 68. # 4. Security and Domain Membership Options: 69. # This option is important for security. It allows you to restrict 70. # connections to machines which are on your local network. The 71. # following example restricts access to two C class networks and 72. # the "loopback" interface. For more examples of the syntax see 73. # the smb.conf man page. Do not enable this if (tcp/ip) name resolution does 74. # not work for all the hosts in your network. 75. # hosts allow = 192.168.1. 192.168.2. 127. 76. 77. # Uncomment this if you want a guest account, you must add this to /etc/passwd 78. # otherwise the user "nobody" is used 79. # guest account = pcguest 80. # Allow users to map to guest: 81. map to guest = bad user 82.

83. # Security mode. Most people will want user level security. See 84. # security_level.txt for details. 85. security = user 86. # Use password server option only with security = server or security = domain 87. # When using security = domain, you should use password server = * 88. # password server = <NT-Server-Name> 89. # password server = * 90. 91. # Password Level allows matching of _n_ characters of the password for 92. # all combinations of upper and lower case. 93. # password level = 8 94. # username level = 8 95. 96. # You may wish to use password encryption. Please read 97. # ENCRYPTION.txt, Win95.txt and WinNT.txt in the Samba documentation. 98. # Do not enable this option unless you have read those documents 99. # Encrypted passwords are required for any use of samba in a Windows NT domain 100.# The smbpasswd file is only required by a server doing authentication, thus 101.# members of a domain do not need one. 102. encrypt passwords = yes 103. smb passwd file = /etc/samba/smbpasswd 104. 105.# The following are needed to allow password changing from Windows to 106.# also update the Linux system password. 107.# NOTE: Use these with 'encrypt passwords' and 'smb passwd file' above. 108.# NOTE2: You do NOT need these to allow workstations to change only 109.# the encrypted SMB passwords. They allow the Unix password 110.# to be kept in sync with the SMB password. 111.; unix password sync = Yes 112.# You either need to setup a passwd program and passwd chat, or 113.# enable pam password change 114.; pam password change = yes 115.# passwd program = /usr/bin/passwd '%u' 116.; passwd chat = *New*UNIX*password* %n\n *Re*ype*new*UNIX*password* %n\n \ 117.;*passwd:*all*authentication*tokens*updated*successfully* 118. 119.# Unix users can map to different SMB User names 120.; username map = /etc/samba/smbusers 121. 122.# Using the following line enables you to customise your configuration 123.# on a per machine basis. The %m gets replaced with the netbios name 124.# of the machine that is connecting 125.# include = /etc/samba/smb.conf.%m 126. 127.# Options for using winbind. Winbind allows you to do all account and 128.# authentication from a Windows or samba domain controller, creating 129.# accounts on the fly, and maintaining a mapping of Windows RIDs to unix uid's 130.# and gid's. winbind uid and winbind gid are the only required parameters. 131.# 132.# winbind uid is the range of uid's winbind can use when mapping RIDs to uid's 133.# idmap uid = 10000-20000 134.# 135.# winbind gid is the range of uid's winbind can use when mapping RIDs to gid's 136.# idmap gid = 10000-20000 137.# 138.# winbind separator is the character a user must use between their domain 139.# name and username, defaults to "\" 140.# winbind separator = + 141.# 142.# winbind use default domain allows you to have winbind return usernames 143.# in the form user instead of DOMAIN+user for the domain listed in the 144.# workgroup parameter.

145.# winbind use default domain = yes 146.# 147.# template homedir determines the home directory for winbind users, with 148.# %D expanding to their domain name and %U expanding to their username: 149.# template homedir = /home/%d/%u 150. 151.# When using winbind, you may want to have samba create home directories 152.# on the fly for authenticated users. Ensure that /etc/pam.d/samba is 153.# using 'service=system-auth-winbind' in pam_stack modules, and then 154.# enable obedience of pam restrictions below: 155.# obey pam restrictions = yes 156. 157.# 158.# template shell determines the shell users authenticated by winbind get 159.# template shell = /bin/bash 160. 161.# 5. Browser Control and Networking Options: 162.# Most people will find that this option gives better performance. 163.# See speed.txt and the manual pages for details 164. socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192 165. 166.# Configure Samba to use multiple interfaces 167.# If you have multiple network interfaces then you must list them 168.# here. See the man page for details. 169.# interfaces = 192.168.12.2/24 192.168.13.2/24 170. 171.# Configure remote browse list synchronisation here 172.# request announcement to, or browse list sync from: 173.# a specific host or from / to a whole subnet (see below) 174.# remote browse sync = 192.168.3.25 192.168.5.255 175.# Cause this host to announce itself to local subnets here 176.# remote announce = 192.168.1.255 192.168.2.44 177. 178.# set local master to no if you don't want Samba to become a master 179.# browser on your network. Otherwise the normal election rules apply 180. local master = yes 181. 182.# OS Level determines the precedence of this server in master browser 183.# elections. The default value should be reasonable 184. os level = 99 185. 186.# Domain Master specifies Samba to be the Domain Master Browser. This 187.# allows Samba to collate browse lists between subnets. Don't use this 188.# if you already have a Windows NT domain controller doing this job 189. domain master = yes 190. 191.# Preferred Master causes Samba to force a local browser election on startup 192.# and gives it a slightly higher chance of winning the election 193. preferred master = yes 194. 195.# 6. Domain Control Options: 196.# Enable this if you want Samba to be a domain logon server for 197.# Windows95 workstations or Primary Domain Controller for WinNT and Win2k 198. domain logons = yes 199. 200.# if you enable domain logons then you may want a per-machine or 201.# per user logon script 202.# run a specific logon batch file per workstation (machine) 203.# logon script = %m.bat 204.# run a specific logon batch file per username 205. logon script = %u.bat

206. 207.# Where to store roaming profiles for WinNT and Win2k 208.# %L substitutes for this servers netbios name, %u is username 209.# You must uncomment the [Profiles] share below 210. logon path = \\%L\Profiles\%u 211. 212.# Where to store roaming profiles for Win9x. Be careful with this as it also 213.# impacts where Win2k finds it's /HOME share 214.# logon home = \\%L\%u\.profile 215. 216. 217.# The add user script is used by a domain member to add local user accounts 218.# that have been authenticated by the domain controller, or when adding 219.# users via the Windows NT Tools (ie User Manager for Domains). 220. 221.# Scripts for file (passwd, smbpasswd) backend: 222.# add user script = /usr/sbin/useradd -s /bin/false '%u' 223.# delete user script = /usr/sbin/userdel '%s' 224.# add user to group script = /usr/bin/gpasswd -a '%u' '%g' 225.# delete user from group script = /usr/bin/gpasswd -d '%u' '%g' 226.# set primary group script = /usr/sbin/usermod -g '%g' '%u' 227.# add group script = /usr/sbin/groupadd %g && getent group '%g' awk -F: '{print $3}' 228.# delete group script = /usr/sbin/groupdel '%g' 229. 230.# Scripts for LDAP backend (assumes nss_ldap is in use on the domain controller, 231.# and needs configuration in smbldap_conf.pm 232.# add user script = /usr/sbin/smbldap-useradd -m '%u' 233.# delete user script = /usr/sbin/smbldap-userdel '%u' 234.# add user to group script = /usr/sbin/smbldap-groupmod -m '%u' '%g' 235.# delete user from group script = /usr/sbin/smbldap-groupmod -x '%u' '%g' 236.# set primary group script = /usr/sbin/smbldap-usermod -g '%g' '%u' 237.# add group script = /usr/sbin/smbldap-groupadd '%g' && /usr/sbin/smbldap-groupshow %g awk '/^gidnumber:/ {print $2}' 238.# delete group script = /usr/sbin/smbldap-groupdel '%g' 239. 240. 241.# The add machine script is use by a samba server configured as a domain 242.# controller to add local machine accounts when adding machines to the domain. 243.# The script must work from the command line when replacing the macros, 244.# or the operation will fail. Check that groups exist if forcing a group. 245.# Script for domain controller for adding machines: 246.# add machine script = /usr/sbin/useradd -d /dev/null -g machines -c 'Machine Account' -s /bin/false - M '%u' 247.# Script for domain controller with LDAP backend for adding machines (please 248.# configure in /etc/samba/smbldap_conf.pm first): 249.# add machine script = /usr/sbin/smbldap-useradd -w -d /dev/null -c 'Machine Account' -s /bin/false '%u' 250. 251.# Domain groups: 252.# Domain groups are now configured by using the 'net groupmap' tool 253. 254.# Enable priveleges, ie allowing members of Domain Admins to join machines 255.# to the domain 256.# enable privileges = yes 257. 258.# Samba Password Database configuration: 259.# Samba now has runtime-configurable password database backends. Multiple 260.# passdb backends may be used, but users will only be added to the first one 261.# Default: 262.# passdb backend = smbpasswd guest 263.# TDB backen with fallback to smbpasswd and guest 264.# passdb backend = tdbsam smbpasswd guest 265.# LDAP with fallback to smbpasswd guest

266.# Enable SSL by using an ldaps url, or enable tls with 'ldap ssl' below. 267.# passdb backend = ldapsam:ldaps://ldap.mydomain.com smbpasswd guest 268.# Use the samba2 LDAP schema: 269.# passdb backend = ldapsam_compat:ldaps://ldap.mydomain.com smbpasswd guest 270. 271.# Idmap settings (set idmap uid and idmap gid above): 272.# Idmap backend to use: 273.# idmap backend = ldap:ldap://ldap.mydomain.com 274. 275.# LDAP configuration for Domain Controlling: 276.# The account (dn) that samba uses to access the LDAP server 277.# This account needs to have write access to the LDAP tree 278.# You will need to give samba the password for this dn, by 279.# running 'smbpasswd -w mypassword' 280.# ldap admin dn = cn=root,dc=mydomain,dc=com 281.# ldap ssl = start_tls 282.# start_tls should run on 389, but samba defaults incorrectly to 636 283.# ldap port = 389 284.# ldap suffix = dc=mydomain,dc=com 285.# Seperate suffixes are available for machines, users, groups, and idmap, if 286.# ldap suffix appears first, it is appended to the specific suffix. 287.# Example for a unix-ish directory layout: 288.# ldap machine suffix = ou=hosts 289.# ldap user suffix = ou=people 290.# ldap group suffix = ou=group 291.# ldap idmap suffix = ou=idmap 292.# Example for AD-ish layout: 293.# ldap machine suffix = cn=computers 294.# ldap user suffix = cn=users 295.# ldap group suffix = cn=groups 296.# ldap idmap suffix = cn=idmap 297. 298. 299.# 7. Name Resolution Options: 300.# All NetBIOS names must be resolved to IP Addresses 301.# 'Name Resolve Order' allows the named resolution mechanism to be specified 302.# the default order is "host lmhosts wins bcast". "host" means use the unix 303.# system gethostbyname() function call that will use either /etc/hosts OR 304.# DNS or NIS depending on the settings of /etc/host.config, /etc/nsswitch.conf 305.# and the /etc/resolv.conf file. "host" therefore is system configuration 306.# dependant. This parameter is most often of use to prevent DNS lookups 307.# in order to resolve NetBIOS names to IP Addresses. Use with care! 308.# The example below excludes use of name resolution for machines that are NOT 309.# on the local network segment 310.# - OR - are not deliberately to be known via lmhosts or via WINS. 311.# name resolve order = wins lmhosts bcast 312. 313.# Windows Internet Name Serving Support Section: 314.# WINS Support - Tells the NMBD component of Samba to enable it's WINS Server 315.# wins support = yes 316. 317.# WINS Server - Tells the NMBD components of Samba to be a WINS Client 318.# Note: Samba can be either a WINS Server, or a WINS Client, but NOT both 319.# wins server = w.x.y.z 320. 321.# WINS Proxy - Tells Samba to answer name resolution queries on 322.# behalf of a non WINS capable client, for this to work there must be 323.# at least one WINS Server on the network. The default is NO. 324.# wins proxy = yes 325. 326.# DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names 327.# via DNS nslookups. The built-in default for versions 1.9.17 is yes, 328.# this has been changed in version 1.9.18 to no.

329. dns proxy = no 330. 331.# 8. File Naming Options: 332.# Case Preservation can be handy - system default is _no_ 333.# NOTE: These can be set on a per share basis 334.# preserve case = no 335.# short preserve case = no 336.# Default case is normally upper case for all DOS files 337.# default case = lower 338.# Be very careful with case sensitivity - it can break things! 339.# case sensitive = no 340. 341.# Enabling internationalization: 342.# you can match a Windows code page with a UNIX character set. 343.# Windows: 437 (US), 737 (GREEK), 850 (Latin1 - Western European), 344.# 852 (Eastern Eu.), 861 (Icelandic), 932 (Cyrillic - Russian), 345.# 936 (Japanese - Shift-JIS), 936 (Simpl. Chinese), 949 (Korean Hangul), 346.# 950 (Trad. Chin.). 347.# UNIX: ISO8859-1 (Western European), ISO8859-2 (Eastern Eu.), 348.# ISO8859-5 (Russian Cyrillic), KOI8-R (Alt-Russ. Cyril.) 349.# This is an example for french users: 350. dos charset = 852 351. unix charset = ISO8859-2 352. logon drive = H: 353. time server = yes 354.#============================ Share Definitions ============================== 355.[homes] 356. comment = Home Directories 357. browseable = no 358. writable = yes 359. veto files = /.*/ 360. invalid users = root 361.# You can enable VFS recycle bin and on-access virus-scanning on a per 362.# share basis: 363.# Uncomment the next 2 lines (make sure you create a.recycle folder in 364.# the base of the share and ensure all users will have write access to it. 365.# For virus scanning, install samba-vscan-clamav and ensure the clamd service 366.# is running 367.# vfs objects = vscan-clamav recycle 368.# vscan-clamav: config-file = /etc/samba/vscan-clamav.conf 369. [diakok] 370. comment = diakok cuccai 371. valid users = @tanarok 372. browseabli = no 373.# Un-comment the following and create the netlogon directory for Domain Logons 374. [netlogon] 375. comment = Network Logon Service 376. path = /var/lib/samba/netlogon 377. guest ok = yes 378. writable = no 379. browseable = no 380.#Uncomment the following 2 lines if you would like your login scripts to 381.#be created dynamically by ntlogon (check that you have it in the correct 382.#location (the default of the ntlogon rpm available in contribs) 383.root preexec = /usr/bin/ntlogon -u '%u' -g '%g' -o %a -d /var/lib/samba/netlogon/ 384.root postexec = rm -f '/var/lib/samba/netlogon/%u.bat' 385. 386.# Un-comment the following to provide a specific roving profile share 387.# the default is to use the user's home directory

388.[Profiles] 389. path = /var/lib/samba/profiles 390. browseable = no 391. guest ok = yes 392. writable = yes 393.# This script can be enabled to create profile directories on the fly 394.# You may want to turn off guest acces if you enable this, as it 395.# hasn't been thoroughly tested. 396.#root preexec = PROFILE='/var/lib/samba/profiles/%u'; if [! -e $PROFILE ]; \ 397.# then mkdir -pm700 $PROFILE; chown '%u':'%g' $PROFILE;fi 398.# If you want read-only profiles, fake permissions so windows clients think 399.# they have written to the files 400.# vfs objects = fake_perms 401. 402.# NOTE: If you have a CUPS print system there is no need to 403.# specifically define each individual printer. 404.# You must configure the samba printers with the appropriate Windows 405.# drivers on your Windows clients or upload the printer driver to the 406.# server from Windows (NT/2000/XP). On the Samba server no filtering is 407.# done. If you wish that the server provides the driver and the clients 408.# send PostScript ("Generic PostScript Printer" under Windows), you have 409.# to use 'printcap name = cups' or swap the 'print command' line below 410.# with the commented one. Note that print commands only work if not using 411.# 'printing=cups' 412.[printers] 413. comment = All Printers 414. path = /var/spool/samba 415. browseable = no 416. guest ok = no 417. valid users = @tanarok 418.# to allow user 'guest account' to print. 419. guest ok = yes 420. writable = no 421. printable = yes 422. create mode = 0700 423.# ===================================== 424.# print command: see above for details. 425.# ===================================== 426. print command = lpr-cups -P %p -o raw %s -r # using client side printer drivers. 427.# print command = lpr-cups -P %p %s # using cups own drivers (use generic PostScript on clients). 428.# If you install drivers on the server, you will want to uncomment this so 429.# clients request the driver 430. use client driver = yes 431. 432.# This share is used for Windows NT-style point-and-print support. 433.# To be able to install drivers, you need to be either root, or listed 434.# in the printer admin parameter above. Note that you also need write access 435.# to the directory and share definition to be able to upload the drivers. 436.# For more information on this, please see the Printing Support Section of 437.# /usr/share/doc/samba-<version>/docs/samba-howto-collection.pdf 438.# 439.# A special case is using the CUPS Windows Postscript driver, which allows 440.# all features available via CUPS on the client, by publishing the ppd file 441.# and the cups driver by using the 'cupsaddsmb' tool. This requires the 442.# installation of the CUPS driver (http://www.cups.org/windows.php) 443.# on the server, but doesn't require you to use Windows at all :-). 444.[print$] 445. path = /var/lib/samba/printers 446. browseable = yes

447. write list = @adm root 448. guest ok = yes 449. inherit permissions = yes 450. # Settings suitable for Winbind: 451. # write list = @"Domain Admins" root 452. # force group = +@"Domain Admins" 453. 454.# A useful application of samba is to make a PDF-generation service 455.# To streamline this, install windows postscript drivers (preferably colour) 456.# on the samba server, so that clients can automatically install them. 457.# Note that this only works if 'printing' is *not* set to 'cups' 458. 459.[pdf-gen] 460. path = /var/tmp 461. guest ok = No 462. printable = Yes 463. comment = PDF Generator (only valid users) 464. printing = bsd 465. #print command = /usr/share/samba/scripts/print-pdf file path win_path recipient IP & 466. print command = /usr/share/samba/scripts/print-pdf "%s" "%H" "//%L/%u" "%m" "%I" "%J" & 467. lpq command = /bin/true 468. 469.# A share allowing administrators to set ACLs on, or access for backup purposes 470.# all files (as root). 471.#[admin] 472.# path = / 473.# admin users = @"Domain Admins" 474.# valid users = @"Domain Admins" 475.# browseable = no 476.# writeable = yes 477. 478.# This one is useful for people to share files 479.;[tmp] 480.; comment = Temporary file space 481.; path = /tmp 482.; read only = no 483.; public = yes 484. 485.# A publicly accessible directory, but read only, except for people in 486.# the "staff" group 487.[public] 488. comment = Public Stuff 489. path = /home/samba/public 490. public = yes 491. writable = no 492. write list = @tanarok 493. browseable = no 494.# Audited directory through experimental VFS audit.so module: 495.# Uncomment next line. 496.# vfs object = /usr/lib/samba/vfs/audit.so 497. 498.# Other examples. 499.# 500.# A private printer, usable only by Fred. Spool data will be placed in Fred's 501.# home directory. Note that fred must have write access to the spool directory, 502.# wherever it is. 503.;[fredsprn] 504.; comment = Fred's Printer 505.; valid users = fred

506.; path = /homes/fred 507.; printer = freds_printer 508.; public = no 509.; writable = no 510.; printable = yes 511. 512.# A private directory, usable only by Fred. Note that Fred requires write 513.# access to the directory. 514.;[fredsdir] 515.; comment = Fred's Service 516.; path = /usr/somewhere/private 517.; valid users = fred 518.; public = no 519.; writable = yes 520.; printable = no 521. 522.# a service which has a different directory for each machine that connects 523.# this allows you to tailor configurations to incoming machines. You could 524.# also use the %u option to tailor it by user name. 525.# The %m gets replaced with the machine name that is connecting. 526.;[pchome] 527.; comment = PC Directories 528.; path = /usr/pc/%m 529.; public = no 530.; writable = yes 531. 532.# The following two entries demonstrate how to share a directory so that two 533.# users can place files there that will be owned by the specific users. In this 534.# setup, the directory should be writable by both users and should have the 535.# sticky bit set on it to prevent abuse. Obviously this could be extended to 536.# as many users as required. 537.;[myshare] 538.; comment = Mary's and Fred's stuff 539.; path = /usr/somewhere/shared 540.; valid users = mary fred 541.; public = no 542.; writable = yes 543.; printable = no 544.; create mask = 0765 545.