Guest User

Samba

a guest
Jun 23rd, 2020
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 3.61 KB | None | 0 0
  1.     #
  2. # Sample configuration file for the Samba suite for Debian GNU/Linux.
  3. #
  4. #
  5. # This is the main Samba configuration file. You should read the
  6. # smb.conf(5) manual page in order to understand the options listed
  7. # here. Samba has a huge number of configurable options most of which
  8. # are not shown in this example
  9. #
  10. # Some options that are often worth tuning have been included as
  11. # commented-out examples in this file.
  12. #  - When such options are commented with ";", the proposed setting
  13. #    differs from the default Samba behaviour
  14. #  - When commented with "#", the proposed setting is the default
  15. #    behaviour of Samba but the option is considered important
  16. #    enough to be mentioned here
  17. #
  18. # NOTE: Whenever you modify this file you should run the command
  19. # "testparm" to check that you have not made any basic syntactic
  20. # errors.
  21.  
  22. #======================= Global Settings =======================
  23.  
  24.  
  25. #Configuration générale
  26.  
  27. [global]
  28.  
  29. ## Browsing/Identification ###
  30.  
  31. # Change this to the workgroup/NT-domain name your Samba server will part of
  32.    workgroup = MSHOME
  33.    server string = %h server
  34.  
  35. #### Networking ####
  36.  
  37. #nom du N.A.S.
  38. netbios name = NAS3
  39. dns proxy = no
  40. idmap config*:backend = tdb
  41.  
  42. #### Debugging/Accounting ####
  43.  
  44. # This tells Samba to use a separate log file for each machine
  45. # that connects
  46.    log file = /var/log/samba/log.%m
  47.  
  48. # Cap the size of the individual log files (in KiB).
  49.    max log size = 1000
  50.  
  51. syslog = 0
  52.  
  53. # Do something sensible when Samba crashes: mail the admin a backtrace
  54.    panic action = /usr/share/samba/panic-action %d
  55.  
  56.  
  57. ####### Authentication #######
  58.  
  59. security = user
  60. #security = share
  61.  
  62. encrypt passwords = true
  63. passdb backend = tdbsam
  64. obey pam restrictions = yes
  65. # This boolean parameter controls whether Samba attempts to sync the Unix
  66. # password with the SMB password when the encrypted SMB password in the
  67. # passdb is changed.
  68.    unix password sync = yes
  69.  
  70. # For Unix password sync to work on a Debian GNU/Linux system, the following
  71. # parameters must be set (thanks to Ian Kahan <<kahan@informatik.tu-muenchen.de> for
  72. # sending the correct chat script for the passwd program in Debian Sarge).
  73.    passwd program = /usr/bin/passwd %u
  74.    passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
  75.  
  76. # This boolean controls whether PAM will be used for password changes
  77. # when requested by an SMB client instead of the program listed in
  78. # 'passwd program'. The default is 'no'.
  79.    pam password change = yes
  80.  
  81. # This option controls how unsuccessful authentication attempts are mapped
  82. # to anonymous connections
  83.    map to guest = bad user
  84.  
  85. usershare allow guests = yes
  86.  
  87. #Et ici les différents partages
  88. [Public]
  89.     comment = partage publique
  90.     path = /media/DD1/NAS3/Public
  91.     force security mode = 0777
  92.     force directory mode = 0777
  93.     force create mode = 0777
  94.     force directory security mode = 0777
  95.     valid users = @Chris
  96.     create mode = 0777
  97.     directory mode = 0777
  98.     available = yes
  99.     browsable = yes
  100.     public = yes
  101.     guest = yes
  102.     share modes = yes
  103. #   read only = no
  104. #   locking = no
  105. #   guest ok = pi
  106.     browseable = yes
  107. #   valid users = @users
  108. #   force group = users
  109. #   create mask = 0660
  110. #   directory mask = 0771
  111.  
  112. [Films]
  113.     comment = dossier de test avec leurs droits à la con qui marchent jamais !!!
  114.     path =/media/DD1/NAS3/Films
  115.     read only = yes
  116.     locking = no
  117.     guest ok = yes
  118.     # force user = pi
  119.  
  120. [Perso]
  121.      comment = zone personnelle
  122.      browseable = yes
  123.      path = /media/DD1/NAS3/Perso
  124.      writable = yes
  125.      username = Chris
  126.      only user = yes
  127.      create mode = 0777
  128.      directory mask = 0777
Add Comment
Please, Sign In to add comment