Failiserver Samba labor 2: Difference between revisions
From ICO wiki
Jump to navigationJump to search
Line 36: | Line 36: | ||
Parameetreid saab testida käsuga testparm | Parameetreid saab testida käsuga testparm | ||
testparm -s | testparm -s | ||
<pre> | |||
[global] | |||
display charset = UTF-8 | |||
server string = %h server (Samba, Ubuntu) | |||
interfaces = lo, eth0 | |||
bind interfaces only = Yes | |||
map to guest = Bad User | |||
obey pam restrictions = Yes | |||
passdb backend = ldapsam:ldap://172.16.0.150 | |||
pam password change = Yes | |||
passwd program = /usr/bin/passwd %u | |||
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* . | |||
unix password sync = Yes | |||
log level = 10 | |||
syslog = 9 | |||
log file = /var/log/samba/log.%m | |||
max log size = 1000 | |||
dns proxy = No | |||
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 | |||
</pre> | |||
=Testimine= | =Testimine= |
Revision as of 13:03, 1 December 2009
Versioon
0.4 alpha
Viimati muudetud 15:19, 30 November 2009 (EET)
Autorid
Sven Lepamets
Martin Raudsik
Rainit Vildo
Nõuded
- Punktiga algavaid (hidden) faile ei näidata.
- Kasutajate kodukataloogid jagatakse välja.
- Lab kataloog jagatakse grupipõhiselt (lab grupp) välja.
- Autentimine toimub ITK LDAP abil.
- 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
[global] display charset = UTF-8 server string = %h server (Samba, Ubuntu) interfaces = lo, eth0 bind interfaces only = Yes map to guest = Bad User obey pam restrictions = Yes passdb backend = ldapsam:ldap://172.16.0.150 pam password change = Yes passwd program = /usr/bin/passwd %u passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* . unix password sync = Yes log level = 10 syslog = 9 log file = /var/log/samba/log.%m max log size = 1000 dns proxy = No 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