Failiserver Samba labor 2: Difference between revisions

From ICO wiki
Jump to navigationJump to search
Rvildo (talk | contribs)
Slepamet (talk | contribs)
Line 43: Line 43:
         unix charset = UTF-8
         unix charset = UTF-8


        #Määrab kuvatava serveri nime
server string = %h server (Samba, Ubuntu)
server string = %h server (Samba, Ubuntu)
        #Määravad võrguliidesed, mille kaudu saab Sambasse ühenduda
interfaces = lo, eth0
interfaces = lo, eth0
bind interfaces only = Yes
bind interfaces only = Yes
        #Näitab, millist paroolihoidlat kasutada
passdb backend = ldapsam:ldap://172.16.0.150
       
        #Osutab paroolihaldusprogrammile
passwd program = /usr/bin/passwd %u
passwd program = /usr/bin/passwd %u
        #Defineerib paroolidialoogi
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
        #Seab logimise taseme
log level = 3
log level = 3
syslog = 3
syslog = 3
        #Näitab, kus asuvad logifailid
log file = /var/log/samba/log.%m
log file = /var/log/samba/log.%m
        #Maksimaalne logifaili suurus
max log size = 1000
max log size = 1000


        #Kas nimeserveri proxy on kasutuses
dns proxy = No
dns proxy = No


         #Ldap administraatori definitsioon
         #Ldap seaded
passdb backend = ldapsam:ldap://172.16.0.150
ldap admin dn = "uid=slepamet,ou=People,dc=itcollege,dc=ee"
ldap admin dn = "uid=slepamet,ou=People,dc=itcollege,dc=ee"
        #Ldap grupi sufiks
ldap group suffix = ou=Groups
ldap group suffix = ou=Groups
        #Ldap idmap sufiks
ldap idmap suffix = ou=Idmap
ldap idmap suffix = ou=Idmap
       
ldap machine suffix = ou=Computers
ldap machine suffix = ou=Computers
ldap replication sleep = 2000
ldap replication sleep = 2000

Revision as of 14:03, 7 December 2009

Versioon

0.5.4.5 alpha
Viimati muudetud 13:31, 1 December 2009 (EET)

Autorid

Sven Lepamets
Martin Raudsik
Rainit Vildo

Nõuded

  1. Punktiga algavaid (hidden) faile ei näidata.
  2. Kasutajate kodukataloogid jagatakse välja.
  3. Lab kataloog jagatakse grupipõhiselt (lab grupp) välja.
  4. Autentimine toimub ITK LDAP abil.
  5. Kooditabel UTF-8

Eeldused

Ubuntu server 9.04 või uuem.
Baasteadmised unixi käsureal töötamisest.
Kasutaja on sudo õigustes.

sudo -i

Installeerimine

Samba installeerimine

apt-get install samba smbfs

Vajadusel käivitamine, stop ja reload

/etc/init.d/samba {start | stop | reload }

või

service samba {start | stop | reload }

Konfigureerimine

Samba konfigureerimseks on vaja muuta faili smb.conf

nano /etc/samba/smb.conf

Parameetreid saab testida käsuga testparm

testparm -s

Konfiguratsioonifail peab olema selline:

[global]
        #Määrab Samba kasutatava kodeeringu
	display charset = UTF-8
        unix charset = UTF-8

	server string = %h server (Samba, Ubuntu)
	interfaces = lo, eth0
	bind interfaces only = Yes
	passwd program = /usr/bin/passwd %u
	passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
	log level = 3
	syslog = 3
	log file = /var/log/samba/log.%m
	max log size = 1000

	dns proxy = No

        #Ldap seaded
	passdb backend = ldapsam:ldap://172.16.0.150
	ldap admin dn = "uid=slepamet,ou=People,dc=itcollege,dc=ee"
	ldap group suffix = ou=Groups
	ldap idmap suffix = ou=Idmap
	ldap machine suffix = ou=Computers
	ldap replication sleep = 2000
	ldap suffix = dc=itcollege,dc=ee
	ldap ssl = no
	ldap timeout = 10
	ldap user suffix = ou=People
	usershare allow guests = Yes
	panic action = /usr/share/samba/panic-action %d
	veto files = /.*/

[homes]
	comment = Home Directories
	valid users = %S
	create mask = 0700
	directory mask = 0700
	browseable = No
	browsable = No

[lab]
	comment = Labori kaust
	path = /var/data/lab
	valid users = @libuuid
	read list = @libuuid
	write list = @libuuid
	force group = libuuid
	read only = No
	create mask = 0664
	directory mask = 0770

Testimine

Testimiseks tuleks installeerida smbclient.

apt-get install smbclient

POOLELI!

Varundamine

Varundada oleks oluline Samba konfiguratsioonifail /etc/samba/smb.conf

cp /etc/samba/smb.conf <varundamiskausta täistee>

Taastamine

Taastamiseks tuleks kopeerida eelnevalt varundatud konfiguratsioonifail kausta /etc/samba nimega smb.conf

cp <varundatud faili täistee> /etc/samba/smb.conf