Probleme utilisateur Samba sous Debian

Probleme utilisateur Samba sous Debian - réseaux et sécurité - Linux et OS Alternatifs

Marsh Posté le 07-05-2016 à 11:50:53    

Bonjour ! :)
J'ai un serveur sous debian 8 et samba 4.2.10, j'ai crée un repertoire de partage (/share) dans le quelle j'ai mis d'autres répertoires (ketterer, adrien, raphael, fanny) j'ai tout mis en chmod 755 (le repertoir share ainsi que tout les sous-repertoirs), j'ai ensuite crée un utilisateur debian pour adrien, raphael et fanny.
une fois cela fait je suis allé sur webmin (je gere Samba depuis la), j'ai créer les 4 fichiers partagés (ketterer, adrien, raphael, fanny) et j'ai convertit mes 3 utilisateur linux en utilisateurs Samba (je precise qu'ils n'ont pas de mot de passe), j'ai donc attribué a chaque fichier partagé un utilisateur (sauf ketterer qui est en guest only), et (a part "ketterer" donc) ils sont tous en écriture et "guest=no".
 
Étant sous windows 10 je vais dans l'onglet "reseau", vais sur mon serveur (Adriserveur) et je vois biens mes quatres dossiers,  
 
http://static.commentcamarche.net/www.commentcamarche.net/pictures/sbusQJjvmSHpg4llNV9x6j52bvkVqil4XTFHZnlCAlUcTZjcVxL9zTeFA4zAdJpx-capture.png
 
jusque la rien d'anormal mais quand je veut aller dans "raphael" il me demande un nom d'utilisateur et un mot de passe, je met "raphael" et pas de mot de passe mais il me met cet erreur  
 
http://static.commentcamarche.net/www.commentcamarche.net/pictures/kSZ6ABPrj41iuwvi5RqzQjbgQrjo54zCXb7wDtaYtm8j2agUqpiMlQEm3LGd2rnS-capture.png
 
Pareil, pour fanny mais adrien non (j'avais déjà fait des test avant en utilisant seulement adrien dans les même configurations et ça fonctionnant, mais en fait même si je metait que le dossier ketterer en partage le dossier adrien y était et c'était qui plus est le dossier de l'utilisateur adrien ! (/home/adrien) et pas celui dans share) et ketterer en guest only et en writable=yes fonctionne sans probleme...
 
Voila, j'ai du mal a comprendre ce qui ce passe, merci de m'éclairer ! :D
 
PS:mon fichier de configuration samba:  
 

Code :
  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. #======================= Global Settings =======================
  22. [global]
  23.         max log size = 1000
  24.         panic action = /usr/share/samba/panic-action %d
  25.         server role = standalone server
  26.         workgroup = WORKGROUP
  27.         os level = 20
  28.         passdb backend = tdbsam
  29.         obey pam restrictions = yes
  30.         log file = /var/log/samba/log.%m
  31.         usershare allow guests = yes
  32.         map to guest = bad user
  33.         passwd program = /usr/bin/passwd %u
  34.         passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
  35.         unix password sync = yes
  36.         pam password change = yes
  37.         socket options = TCP_NODELAY
  38.         dns proxy = no
  39.         syslog = 0
  40. ## Browsing/Identification ###
  41. # Change this to the workgroup/NT-domain name your Samba server will part of
  42. # Windows Internet Name Serving Support Section:
  43. # WINS Support - Tells the NMBD component of Samba to enable its WINS Server
  44. #   wins support = no
  45. # WINS Server - Tells the NMBD components of Samba to be a WINS Client
  46. # Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
  47. ;   wins server = w.x.y.z
  48. # This will prevent nmbd to search for NetBIOS names through DNS.
  49. #### Networking ####
  50. # The specific set of interfaces / networks to bind to
  51. # This can be either the interface name or an IP address/netmask;
  52. # interface names are normally preferred
  53. ;   interfaces = 127.0.0.0/8 eth0
  54. # Only bind to the named interfaces and/or networks; you must use the
  55. # 'interfaces' option above to use this.
  56. # It is recommended that you enable this feature if your Samba machine is
  57. # not protected by a firewall or is a firewall itself.  However, this
  58. # option cannot handle dynamic or non-broadcast interfaces correctly.
  59. ;   bind interfaces only = yes
  60. #### Debugging/Accounting ####
  61. # This tells Samba to use a separate log file for each machine
  62. # that connects
  63. # Cap the size of the individual log files (in KiB).
  64. # If you want Samba to only log through syslog then set the following
  65. # parameter to 'yes'.
  66. #   syslog only = no
  67. # We want Samba to log a minimum amount of information to syslog. Everything
  68. # should go to /var/log/samba/log.{smbd,nmbd} instead. If you want to log
  69. # through syslog you should set the following parameter to something higher.
  70. # Do something sensible when Samba crashes: mail the admin a backtrace
  71. ####### Authentication #######
  72. # Server role. Defines in which mode Samba will operate. Possible
  73. # values are "standalone server", "member server", "classic primary
  74. # domain controller", "classic backup domain controller", "active
  75. # directory domain controller".
  76. #
  77. # Most people will want "standalone sever" or "member server".
  78. # Running as "active directory domain controller" will require first
  79. # running "samba-tool domain provision" to wipe databases and create a
  80. # new domain.
  81. # If you are using encrypted passwords, Samba will need to know what
  82. # password database type you are using.
  83. # This boolean parameter controls whether Samba attempts to sync the Unix
  84. # password with the SMB password when the encrypted SMB password in the
  85. # passdb is changed.
  86. # For Unix password sync to work on a Debian GNU/Linux system, the following
  87. # parameters must be set (thanks to Ian Kahan <<kahan@informatik.tu-muenchen.de> for
  88. # sending the correct chat script for the passwd program in Debian Sarge).
  89. # This boolean controls whether PAM will be used for password changes
  90. # when requested by an SMB client instead of the program listed in
  91. # 'passwd program'. The default is 'no'.
  92. # This option controls how unsuccessful authentication attempts are mapped
  93. # to anonymous connections
  94. ########## Domains ###########
  95. #
  96. # The following settings only takes effect if 'server role = primary
  97. # classic domain controller', 'server role = backup domain controller'
  98. # or 'domain logons' is set
  99. #
  100. # It specifies the location of the user's
  101. # profile directory from the client point of view) The following
  102. # required a [profiles] share to be setup on the samba server (see
  103. # below)
  104. ;   logon path = \\%N\profiles\%U
  105. # Another common choice is storing the profile in the user's home directory
  106. # (this is Samba's default)
  107. #   logon path = \\%N\%U\profile
  108. # The following setting only takes effect if 'domain logons' is set
  109. # It specifies the location of a user's home directory (from the client
  110. # point of view)
  111. ;   logon drive = H:
  112. #   logon home = \\%N\%U
  113. # The following setting only takes effect if 'domain logons' is set
  114. # It specifies the script to run during logon. The script must be stored
  115. # in the [netlogon] share
  116. # NOTE: Must be store in 'DOS' file format convention
  117. ;   logon script = logon.cmd
  118. # This allows Unix users to be created on the domain controller via the SAMR
  119. # RPC pipe.  The example command creates a user account with a disabled Unix
  120. # password; please adapt to your needs
  121. ; add user script = /usr/sbin/adduser --quiet --disabled-password --gecos "" %u
  122. # This allows machine accounts to be created on the domain controller via the
  123. # SAMR RPC pipe.
  124. # The following assumes a "machines" group exists on the system
  125. ; add machine script  = /usr/sbin/useradd -g machines -c "%u machine account" -d /var/lib/samba -s /bin/false %u
  126. # This allows Unix groups to be created on the domain controller via the SAMR
  127. # RPC pipe.
  128. ; add group script = /usr/sbin/addgroup --force-badname %g
  129. ############ Misc ############
  130. # Using the following line enables you to customise your configuration
  131. # on a per machine basis. The %m gets replaced with the netbios name
  132. # of the machine that is connecting
  133. ;   include = /home/samba/etc/smb.conf.%m
  134. # Some defaults for winbind (make sure you're not using the ranges
  135. # for something else.)
  136. ;   idmap uid = 10000-20000
  137. ;   idmap gid = 10000-20000
  138. ;   template shell = /bin/bash
  139. # Setup usershare options to enable non-root users to share folders
  140. # with the net usershare command.
  141. # Maximum number of usershare. 0 (default) means that usershare is disabled.
  142. ;   usershare max shares = 100
  143. # Allow users who've been granted usershare privileges to create
  144. # public shares, not just authenticated ones
  145. #======================= Share Definitions =======================
  146. [homes]
  147.    comment = Home Directories
  148.    browseable = no
  149. # By default, the home directories are exported read-only. Change the
  150. # next parameter to 'no' if you want to be able to write to them.
  151.    read only = yes
  152. # File creation mask is set to 0700 for security reasons. If you want to
  153. # create files with group=rw permissions, set next parameter to 0775.
  154.    create mask = 0700
  155. # Directory creation mask is set to 0700 for security reasons. If you want to
  156. # create dirs. with group=rw permissions, set next parameter to 0775.
  157.    directory mask = 0700
  158. # By default, \\server\username shares can be connected to by anyone
  159. # with access to the samba server.
  160. # The following parameter makes sure that only "username" can connect
  161. # to \\server\username
  162. # This might need tweaking when using external authentication schemes
  163.    valid users = %S
  164. # Un-comment the following and create the netlogon directory for Domain Logons
  165. # (you need to configure Samba to act as a domain controller too.)
  166. ;[netlogon]
  167. ;   comment = Network Logon Service
  168. ;   path = /home/samba/netlogon
  169. ;   guest ok = yes
  170. ;   read only = yes
  171. # Un-comment the following and create the profiles directory to store
  172. # users profiles (see the "logon path" option above)
  173. # (you need to configure Samba to act as a domain controller too.)
  174. # The path below should be writable by all users so that their
  175. # profile directory may be created the first time they log on
  176. ;[profiles]
  177. ;   comment = Users profiles
  178. ;   path = /home/samba/profiles
  179. ;   guest ok = no
  180. ;   read only = yes
  181. # Un-comment the following and create the profiles directory to store
  182. # users profiles (see the "logon path" option above)
  183. # (you need to configure Samba to act as a domain controller too.)
  184. # The path below should be writable by all users so that their
  185. # profile directory may be created the first time they log on
  186. ;[profiles]
  187. ;   comment = Users profiles
  188. ;   path = /home/samba/profiles
  189. ;   guest ok = no
  190. ;   browseable = no
  191. ;   create mask = 0600
  192. ;   directory mask = 0700
  193. [printers]
  194.    comment = All Printers
  195.    browseable = no
  196.    path = /var/spool/samba
  197.    printable = yes
  198.    guest ok = no
  199.    read only = yes
  200.    create mask = 0700
  201. # Windows clients look for this share name as a source of downloadable
  202. # printer drivers
  203. [print$]
  204.    comment = Printer Drivers
  205.    path = /var/lib/samba/printers
  206.    browseable = yes
  207.    read only = yes
  208.    guest ok = no
  209. # Uncomment to allow remote administration of Windows print drivers.
  210. # You may need to replace 'lpadmin' with the name of the group your
  211. # admin users are members of.
  212. # Please note that you also need to set appropriate Unix permissions
  213. # to the drivers directory for these users to have write rights in it
  214. ;   write list = root, @lpadmin
  215. [ketterer]
  216.         public = yes
  217.         writeable = yes
  218.         guest only = yes
  219.         path = /share/ketterer
  220. [adrien]
  221.         writeable = yes
  222.         path = /share/adrien
  223.         valid users = adrien
  224. [raphael]
  225.         path = /share/raphael
  226.         valid users = raphael
  227.         writeable = yes
  228. [fanny]
  229.         valid users = fanny
  230.         path = /share/fanny
  231.         writeable = yes


 
PPS: Je n'arrive pas a me mettre en security level=Share mais seulement en default ou user (j'ai pas essayé les autres)
 
Merciiii :)


Message édité par onirix753 le 07-05-2016 à 11:53:31
Reply

Marsh Posté le 07-05-2016 à 11:50:53   

Reply

Marsh Posté le 13-05-2016 à 12:12:38    

M'est avis que par défaut Samba n'autorise pas les utilisateurs sans mot de passe (ou alors il faut bidouiller un peu plus) : définis-en un pour tes utilisateurs.


---------------
Topic des restos / Topic des boutiques gastronomiques
Reply

Marsh Posté le 13-05-2016 à 13:33:43    

J'ai essayé de mettre des mots de passes sur le fichier adrien, raphael et fanny, sur celui de adrien (avec comme mot de passe adrien) ça a fonctionné mais pour raphael et fanny la même erreur que plus haut :/
J'ai vu dans une vidéo que quand j'étais connecté au compte adrien et que j'allais dans les fichiers partagés il y avait forcement le /home/adrien de partagé, ça me le faisait jusque la mais maintenant c'est biens le fichier qui est dans /share qui est partagé
Merci :)

Reply

Marsh Posté le 13-05-2016 à 13:56:09    

Un "mot de passe sur le fichier" ? Euh, non, je parlais de mot de passe système, donc tu en positionnes un pour l'utilisateur adrien, via passwd (en ligne de commande) ou webmin, et tu essaies d'accéder au partage avec, pour voir si ça fonctionne mieux. Pareil pour les 2 autres utilisateurs, chacun son mot de passe.


Message édité par fdaniel le 13-05-2016 à 13:56:57

---------------
Topic des restos / Topic des boutiques gastronomiques
Reply

Marsh Posté le 13-05-2016 à 14:11:37    

Ah ok ! :)
J'ai mis les mdp sur debian (le nom de compte) j'ai supprimé les utilisateurs samba et les ai reconvertit mais dans le choix de mot de passe, sois je mettait pas de mot de passe soit "account locked" sois je choisis un nouveau mot de passe, mais maintenant quand je vais sur Adriserveur il me demande un mot de passe...
et si je met le mot de passe d'un compte il me met le même message d'erreur que d'habitude :/

Reply

Sujets relatifs:

Leave a Replay

Make sure you enter the(*)required information where indicate.HTML code is not allowed