0
Найти на сайте: параметры поиска

 

 

Samba & Win7

  
Сообщений: 0
Привет всем.

Решил сделать файловую шару на Минте 12. Структура такая.



Установил самбу с GUI. Настроил рабочую группу. Расшарил папку Users для всех. Все успешно записывают и читают во все папки.

Теперь хочу чтобы "личная" была доступна соответствующему пользователю. Для этого создаю пользователя в минте, пользователя в самбе. Назначаю права для конкретного пользователя. Методы авторизации пробовал 2: Users и Share
Из винды 7 (у всех семерка) пытаюсь зайти в папку. Ожидаю запрос имени и пароля, но получаю "Отказано в доступе".

Дальше пробую разные вариации настройки самбы ничего не выходит. Подскажите пожалуйста что делать , куда копать?


Файл конфига smb.conf
Код PHP:
  1.  
  2. #======================= Global Settings =======================
  3.  
  4. [global]
  5.  
  6. ## Browsing/Identification ###
  7.  
  8. # Change this to the workgroup/NT-domain name your Samba server will part of
  9. workgroup = mygroup
  10.  
  11. # server string is the equivalent of the NT Description field
  12. server string = %h server (Samba, LinuxMint)
  13.  
  14. # Windows Internet Name Serving Support Section:
  15. # WINS Support - Tells the NMBD component of Samba to enable its WINS Server
  16. # wins support = no
  17.  
  18. # WINS Server - Tells the NMBD components of Samba to be a WINS Client
  19. # Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
  20. ; wins server = w.x.y.z
  21.  
  22. # This will prevent nmbd to search for NetBIOS names through DNS.
  23. dns proxy = no
  24.  
  25. # What naming service and in what order should we use to resolve host names
  26. # to IP addresses
  27. ; name resolve order = lmhosts host wins bcast
  28.  
  29. #### Networking ####
  30.  
  31. # The specific set of interfaces / networks to bind to
  32. # This can be either the interface name or an IP address/netmask;
  33. # interface names are normally preferred
  34. ; interfaces = 127.0.0.0/8 eth0
  35.  
  36. # Only bind to the named interfaces and/or networks; you must use the
  37. # 'interfaces' option above to use this.
  38. # It is recommended that you enable this feature if your Samba machine is
  39. # not protected by a firewall or is a firewall itself. However, this
  40. # option cannot handle dynamic or non-broadcast interfaces correctly.
  41. ; bind interfaces only = yes
  42.  
  43.  
  44.  
  45. #### Debugging/Accounting ####
  46.  
  47. # This tells Samba to use a separate log file for each machine
  48. # that connects
  49. log file = /var/log/samba/log.%m
  50.  
  51. # Cap the size of the individual log files (in KiB).
  52. max log size = 1000
  53.  
  54. # If you want Samba to only log through syslog then set the following
  55. # parameter to 'yes'.
  56. # syslog only = no
  57.  
  58. # We want Samba to log a minimum amount of information to syslog. Everything
  59. # should go to /var/log/samba/log.{smbd,nmbd} instead. If you want to log
  60. # through syslog you should set the following parameter to something higher.
  61. syslog = 0
  62.  
  63. # Do something sensible when Samba crashes: mail the admin a backtrace
  64. panic action = /usr/share/samba/panic-action %d
  65.  
  66.  
  67. ####### Authentication #######
  68.  
  69. # "security = user" is always a good idea. This will require a Unix account
  70. # in this server for every user accessing the server. See
  71. # /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/ServerType.html
  72. # in the samba-doc package for details.
  73. # security = user
  74.  
  75. # You may wish to use password encryption. See the section on
  76. # 'encrypt passwords' in the smb.conf(5) manpage before enabling.
  77. ; encrypt passwords = yes
  78.  
  79. # If you are using encrypted passwords, Samba will need to know what
  80. # password database type you are using.
  81. ; passdb backend = tdbsam
  82.  
  83. obey pam restrictions = yes
  84.  
  85. # This boolean parameter controls whether Samba attempts to sync the Unix
  86. # password with the SMB password when the encrypted SMB password in the
  87. # passdb is changed.
  88. unix password sync = yes
  89.  
  90. # For Unix password sync to work on a Debian GNU/Linux system, the following
  91. # parameters must be set (thanks to Ian Kahan <<kahan@informatik.tu-muenchen.de> for
  92. # sending the correct chat script for the passwd program in Debian Sarge).
  93. passwd program = /usr/bin/passwd %u
  94. passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
  95.  
  96. # This boolean controls whether PAM will be used for password changes
  97. # when requested by an SMB client instead of the program listed in
  98. # 'passwd program'. The default is 'no'.
  99. pam password change = yes
  100.  
  101. # This option controls how unsuccessful authentication attempts are mapped
  102. # to anonymous connections
  103. map to guest = bad user
  104.  
  105. ########## Domains ###########
  106.  
  107. # Is this machine able to authenticate users. Both PDC and BDC
  108. # must have this setting enabled. If you are the BDC you must
  109. # change the 'domain master' setting to no
  110. #
  111. ; domain logons = yes
  112. #
  113. # The following setting only takes effect if 'domain logons' is set
  114. # It specifies the location of the user's profile directory
  115. # from the client point of view)
  116. # The following required a [profiles] share to be setup on the
  117. # samba server (see below)
  118. ; logon path = \\%N\profiles\%U
  119. # Another common choice is storing the profile in the user's home directory
  120. # (this is Samba's default)
  121. # logon path = \\%N\%U\profile
  122.  
  123. # The following setting only takes effect if 'domain logons' is set
  124. # It specifies the location of a user's home directory (from the client
  125. # point of view)
  126. ; logon drive = H:
  127. # logon home = \\%N\%U
  128.  
  129. # The following setting only takes effect if 'domain logons' is set
  130. # It specifies the script to run during logon. The script must be stored
  131. # in the [netlogon] share
  132. # NOTE: Must be store in 'DOS' file format convention
  133. ; logon script = logon.cmd
  134.  
  135. # This allows Unix users to be created on the domain controller via the SAMR
  136. # RPC pipe. The example command creates a user account with a disabled Unix
  137. # password; please adapt to your needs
  138. ; add user script = /usr/sbin/adduser --quiet --disabled-password --gecos "" %u
  139.  
  140. # This allows machine accounts to be created on the domain controller via the
  141. # SAMR RPC pipe.
  142. # The following assumes a "machines" group exists on the system
  143. ; add machine script = /usr/sbin/useradd -g machines -c "%u machine account" -d /var/lib/samba -s /bin/false %u
  144.  
  145. # This allows Unix groups to be created on the domain controller via the SAMR
  146. # RPC pipe.
  147. ; add group script = /usr/sbin/addgroup --force-badname %g
  148.  
  149. ########## Printing ##########
  150.  
  151. # If you want to automatically load your printer list rather
  152. # than setting them up individually then you'll need this
  153. # load printers = yes
  154.  
  155. # lpr(ng) printing. You may wish to override the location of the
  156. # printcap file
  157. ; printing = bsd
  158. ; printcap name = /etc/printcap
  159.  
  160. # CUPS printing. See also the cupsaddsmb(8) manpage in the
  161. # cupsys-client package.
  162. ; printing = cups
  163. ; printcap name = cups
  164.  
  165. ############ Misc ############
  166.  
  167. # Using the following line enables you to customise your configuration
  168. # on a per machine basis. The %m gets replaced with the netbios name
  169. # of the machine that is connecting
  170. ; include = /home/samba/etc/smb.conf.%m
  171.  
  172. # Most people will find that this option gives better performance.
  173. # See smb.conf(5) and /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/speed.html
  174. # for details
  175. # You may want to add the following on a Linux system:
  176. # SO_RCVBUF=8192 SO_SNDBUF=8192
  177. # socket options = TCP_NODELAY
  178.  
  179. # The following parameter is useful only if you have the linpopup package
  180. # installed. The samba maintainer and the linpopup maintainer are
  181. # working to ease installation and configuration of linpopup and samba.
  182. ; message command = /bin/sh -c '/usr/bin/linpopup "%f" "%m" %s; rm %s' &
  183.  
  184. # Domain Master specifies Samba to be the Domain Master Browser. If this
  185. # machine will be configured as a BDC (a secondary logon server), you
  186. # must set this to 'no'; otherwise, the default behavior is recommended.
  187. # domain master = auto
  188.  
  189. # Some defaults for winbind (make sure you're not using the ranges
  190. # for something else.)
  191. ; idmap uid = 10000-20000
  192. ; idmap gid = 10000-20000
  193. ; template shell = /bin/bash
  194.  
  195. # The following was the default behaviour in sarge,
  196. # but samba upstream reverted the default because it might induce
  197. # performance issues in large organizations.
  198. # See Debian bug #368251 for some of the consequences of *not*
  199. # having this setting and smb.conf(5) for details.
  200. ; winbind enum groups = yes
  201. ; winbind enum users = yes
  202.  
  203. # Setup usershare options to enable non-root users to share folders
  204. # with the net usershare command.
  205.  
  206. # Maximum number of usershare. 0 (default) means that usershare is disabled.
  207. ; usershare max shares = 100
  208.  
  209. # Allow users who've been granted usershare privileges to create
  210. # public shares, not just authenticated ones
  211. usershare allow guests = yes
  212. security = user
  213. ; guest ok = no
  214. ; guest account = nobody
  215. username map = /etc/samba/smbusers
  216.  
  217. #======================= Share Definitions =======================
  218.  
  219. # Un-comment the following (and tweak the other settings below to suit)
  220. # to enable the default home directory shares. This will share each
  221. # user's home director as \\server\username
  222. ;[homes]
  223. ; comment = Home Directories
  224. ; browseable = no
  225.  
  226. # By default, the home directories are exported read-only. Change the
  227. # next parameter to 'no' if you want to be able to write to them.
  228. ; read only = yes
  229.  
  230. # File creation mask is set to 0700 for security reasons. If you want to
  231. # create files with group=rw permissions, set next parameter to 0775.
  232. ; create mask = 0700
  233.  
  234. # Directory creation mask is set to 0700 for security reasons. If you want to
  235. # create dirs. with group=rw permissions, set next parameter to 0775.
  236. ; directory mask = 0700
  237.  
  238. # By default, \\server\username shares can be connected to by anyone
  239. # with access to the samba server. Un-comment the following parameter
  240. # to make sure that only "username" can connect to \\server\username
  241. # The following parameter makes sure that only "username" can connect
  242. #
  243. # This might need tweaking when using external authentication schemes
  244. ; valid users = %S
  245.  
  246. # Un-comment the following and create the netlogon directory for Domain Logons
  247. # (you need to configure Samba to act as a domain controller too.)
  248. ;[netlogon]
  249. ; comment = Network Logon Service
  250. ; path = /home/samba/netlogon
  251. ; guest ok = yes
  252. ; read only = yes
  253.  
  254. # Un-comment the following and create the profiles directory to store
  255. # users profiles (see the "logon path" option above)
  256. # (you need to configure Samba to act as a domain controller too.)
  257. # The path below should be writable by all users so that their
  258. # profile directory may be created the first time they log on
  259. ;[profiles]
  260. ; comment = Users profiles
  261. ; path = /home/samba/profiles
  262. ; guest ok = no
  263. ; browseable = no
  264. ; create mask = 0600
  265. ; directory mask = 0700
  266.  
  267. [printers]
  268. comment = All Printers
  269. browseable = no
  270. path = /var/spool/samba
  271. printable = yes
  272. ; guest ok = no
  273. ; read only = yes
  274. create mask = 0700
  275.  
  276. # Windows clients look for this share name as a source of downloadable
  277. # printer drivers
  278. [Users]
  279. path = /home/doctor/Общедоступные/Users
  280. writeable = yes
  281. ; browseable = yes
  282. guest ok = yes
  283.  
  284. [Soft]
  285. path = /home/doctor/Общедоступные/Soft
  286. writeable = yes
  287. browseable = no
  288. guest ok = yes
  289.  
  290. [Drivers]
  291. path = /home/doctor/Общедоступные/Drivers
  292. writeable = yes
  293. browseable = no
  294. guest ok = yes
  295.  
Редактировалось: 7 раз (Последний: 16 апреля 2012 в 15:18)
Сообщений: 0
раздавать права на группы
Сообщений: 0
Где создаются группы?
Сообщений: 0
demcore:

Где создаются группы?
Работа делится на 2 участка. Сначала настраиваешь Win7 (Сервер). На расшаренных папках есть такое понятие как Безопасность. Именно там даешь разешения на доступ или запрет для груп и конкретным юзверям. Юзверь должен входить в свою винду под свои логином и паролем. На сервере регистрируешь такого же юзера с таким же паролем. Назначаешь нужные группы и в этих группах - нужных юзверей. В управлении компьютера есть Общие папки. Там можно убедиться что твои юзера входят именно под конкретным логином, ну а если что то напутал - то под гостем.
На linuxe необходимо установить samba и samba client. Подключаешь через Наутилус или еще чем то что то типа этого формата: smb://user:password@server/share Потом заносишь в закладки и вручную когда надо - активируешь.
Если хочешь чтобы автоматом монтировалось, то пропиши в etc/fstab # sudo vi /etc/fstab
строчку типа //192.168.1.1/Шара /home/user12/B_disk cifs _netdev,user=user12,password=passwrd12,,rw,user,fmask=777,dmask=777,iocharset=utf8 0 0
где Шара - это шара на Win7, user12 входит под паролем passwrd12. Кириллица обеспечивается iocharset=utf8
# sudo mount -a -рестарт изменений fstab
Вот и все.
Сообщений: 0
На Win7 мне ничего не надо расшаривать. Все машины на Win 7 - клиенты.
Сервер - это отдельная машина, с RAID, под управлением MINT 12. Все клиенты заходят на сервер как гости.
Я так понимаю можно дать права на папку определенной группе в Линуксе, пусть даже с 1 юзером в ней.
Но как получить окно авторизации в Винде при подключении к серверу. Пока только отказывает в доступе.
В начало страницы 
|
Перейти на форум:
Быстрый ответ
Чтобы писать на форуме, зарегистрируйтесь или авторизуйтесь.