Samba
Z Wiki UnArt Slavičín
Skočit na navigaciSkočit na vyhledávání
Instalace
V Debianu klacicky
apt-get install samba
Samba jako workgroup
Samba jako Domain Member
[global] encrypt passwords = yes security = domain workgroup = lowaspol password server = * add user script = useradd -s /bin/false %u -G users hosts allow = 10.1.1.0/24 127.0.0.1 display charset = UTF-8 unix charset = UTF-8 dos charset = CP852 [homes] path = /srv/samba/home/%u browseable = no valid users = %S hide dot files = yes read only = no guest ok = no inherit permissions = yes [Akce] comment = Aktuální akce path = /srv/samba/akce valid users = @users force group = users read only = No force create mode = 2775 force directory mode = 2775 browseable = Yes
Samba jako Domain Controler
Základní konfigurák pro nastavení Samby jako doménový řadič.
[global] workgroup = domena netbios name = file-server server string = %h server (Samba, Debian) passdb backend = tdbsam security = user username map = /etc/samba/smbusers time server = Yes domain logons = Yes preferred master = Yes domain master = Yes wins support = yes os level = 35 # Set CUPS for printing printcap name = CUPS printing = CUPS # Default logon logon drive = X: logon home = \\%L\%U logon path = \\%L\Profiles\%U ## skripty po prihlaseni (spousteny s pravy uzivatele!) # batch podle stroje ; logon script = %m.bat # batch podle uzivatele ;logon script = %U.bat # batch pro vsechny ;logon script = all.bat # Useradd scripts add user script = /usr/sbin/useradd -m %u delete user script = /usr/sbin/userdel -r %u add group script = /usr/sbin/groupadd %g delete group script = /usr/sbin/groupdel %g add user to group script = /usr/sbin/groupmod -A %u %g delete user from group script = /usr/sbin/groupmod -R %u %g add machine script = /usr/sbin/useradd -g nogroup -c "NT Machine Account" -s /bin/false %u idmap uid = 15000-20000 idmap gid = 15000-20000 # sync smb passwords with linux passwords passwd program = /usr/bin/passwd %u passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n . passwd chat debug = yes unix password sync = no # omezeni pristupu podle IP ;hosts allow = 192.168.2.0/24 127.0.0.1 ;hosts deny = 0.0.0.0/0 # set the loglevel log level = 3 # display charset = LOCALE # unix charset = LOCALE display charset = UTF-8 unix charset = UTF-8 hide dot files = yes # toto zajisti spravny vypis ceskych hodnot v browse listu # napr. v smbclient -L pocitac dos charset = CP852 nt acl support = yes inherit acl = yes vfs object = vscan-clamav vscan-clamav: config-file = /etc/samba/vscan-oav.conf [homes] comment = Home directory valid users = %S read only = No browseable = No inherit permissions = yes [netlogon] # Needed to support domain logons comment = Network Logon Service path = /var/samba/netlogon/ guest ok = yes admin users = administrator valid users = %U browseable = No [Profiles] # For profiles to work, create a user directory under the path comment = Roaming Profile Share path = /var/samba/profiles/ read only = No create mask = 0600 directory mask = 0700 browseable = No hide files = /desktop.ini/ntuser.ini/NTUSER.*/ default case = lower preserve case = no short preserve case = no case sensitive = no [printers] comment = All Printers path = /var/spool/samba printable = yes guest ok = yes browsable = no [data] browseable = Yes writeable = yes path = /srv/samba/data/ ;force directory mode = 2775 ;force create mode = 2775 comment = Data valid users = @users nt acl support = yes inherit acl = yes [Install] comment = Install path = /srv/samba/ins valid users = vkoranek read only = No force create mode = 2770 force directory mode = 2770 browseable = Yes [temp] comment = Temporary files path = /srv/samba/temp valid users = @users read only = No force create mode = 2777 force directory mode = 2777 browseable = yes
Koš
Můžete dát k jednotlivým sdílením, kde jsou důležitá data a když někdo něco smázne tak se to nesmaže uplně ale přesune se to do složky .recycle v root složce toho sdílení. Užitečné když někdo omylem smaže důležitý data, ale zase se občas ty "odpadkový koše" musej promazávat.
vfs options = recycle