LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 755|回复: 7

win客户端无法改samba PDC的密码?

[复制链接]
发表于 2006-1-1 00:17:58 | 显示全部楼层 |阅读模式
我的win客户端是用2003,可以登录到samba做的域中,但按Ctrl+Alt+Del后,没有办法更改密码:

smb.conf内容如下:
[global]
   workgroup = test.com
   netbios name = redhat
   server string = Samba PDC running %v

   encrypt passwords = yes
   smb passwd file = /etc/samba/smbpasswd
   ;hosts allow = 127.0.0.1 192.168.1.0/255.255.255.0
   ;interfaces = eth0

   log file = /var/log/samba/log.%m
   max log size = 50

   socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
   ;IPTOS_LOWDELAY
   security = user
   os level = 64
   local master = yes
   domain master = yes
   preferred master = yes
   domain logons = yes

   logon script = logon.bat
   logon home = \\%L\%U\.profile
   logon path = \\%L\profiles\%U
   logon drive = H:

   admin users = root

   encrypt passwords = yes
   bind interfaces only = Yes
   pam password change = Yes
   passwd program = /usr/bin/passwd %u
   passwd chat = *New*Password* %n\n *Re-enter*new*password*%n\n *P assword*changed*
   unix password sync = No

   username map = /etc/samba/smbusers
[homes]
   comment = Home Directories
   browseable = no
   writeable = yes
[profiles]
   path = /home/samba/profiles
   writeable = yes
   browseable = yes
   guest ok = no
[netlogon]
   comment = Network Logon Service
   path = /home/samba/netlogon
   read only = yes
   browseable = no
   write list= root
   guest Ok = no
 楼主| 发表于 2006-1-1 20:10:32 | 显示全部楼层
没有人回答,顶一下。
回复 支持 反对

使用道具 举报

发表于 2006-1-3 16:34:05 | 显示全部楼层
建议你把这几句注释掉
bind interfaces only = Yes
pam password change = Yes
passwd program = /usr/bin/passwd %u
passwd chat = *New*Password* %n\n *Re-enter*new*password*%n\n *P assword*changed*
unix password sync = No
username map = /etc/samba/smbusers
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-1-4 22:07:32 | 显示全部楼层
Post by cnyg
建议你把这几句注释掉
bind interfaces only = Yes
pam password change = Yes
passwd program = /usr/bin/passwd %u
passwd chat = *New*Password* %n\n *Re-enter*new*password*%n\n *P assword*changed*
unix password sync = No
username map = /etc/samba/smbusers

谢谢,我试过了,还是不行呀。不知道问题出在哪里?
回复 支持 反对

使用道具 举报

发表于 2006-1-5 09:53:36 | 显示全部楼层
你试试我的配置文件,因为我没有使用 2003 ,不过在 XP 下修改没有问题。


  1. # This is the main Samba configuration file. You should read the
  2. # smb.conf(5) manual page in order to understand the options listed
  3. # here. Samba has a huge number of configurable options (perhaps too
  4. # many!) most of which are not shown in this example
  5. #
  6. # Any line which starts with a ; (semi-colon) or a # (hash)
  7. # is a comment and is ignored. In this example we will use a #
  8. # for commentry and a ; for parts of the config file that you
  9. # may wish to enable
  10. #
  11. # NOTE: Whenever you modify this file you should run the command "testparm"
  12. # to check that you have not made any basic syntactic errors.
  13. #
  14. #======================= Global Settings =====================================
  15. [global]

  16. # 1. Server Naming Options:
  17. # workgroup = NT-Domain-Name or Workgroup-Name
  18.    workgroup = PDC
  19. ;   workgroup = WORKGROUP

  20. # netbios name is the name you will see in "Network Neighbourhood",
  21. # but defaults to your hostname
  22.   netbios name = SMBServer
  23. ;  netbios name = <name_of_this_server>

  24. # server string is the equivalent of the NT Description field
  25.    server string = Samba Server de este lugar (%v)
  26. ;   server string = Samba Server %v

  27. # Message command is run by samba when a "popup" message is sent to it.
  28. # The example below is for use with LinPopUp:
  29. ; message command = /usr/bin/linpopup "%f" "%m" %s; rm %s

  30. # 2. Printing Options:
  31. # CHANGES TO ENABLE PRINTING ON ALL CUPS PRINTERS IN THE NETWORK
  32. # if you want to automatically load your printer list rather
  33. # than setting them up individually then you'll need this
  34.    printcap name = cups
  35.    load printers = yes

  36. # It should not be necessary to spell out the print system type unless
  37. # yours is non-standard. Currently supported print systems include:
  38. # bsd, sysv, plp, lprng, aix, hpux, qnx, cups
  39.    printing = cups

  40. # Samba 3.x supports the Windows NT-style point-and-print feature. To
  41. # use this, you need to be able to upload print drivers to the samba
  42. # server. The printer admins (or root) may install drivers onto samba.
  43. # Note that this feature uses the print$ share, so you will need to
  44. # enable it below.
  45. # printer admin = @<group> <user>
  46.    printer admin = @adm
  47. # This should work well for winbind:
  48. ;   printer admin = @"Domain Admins"

  49. # 3. Logging Options:
  50. # this tells Samba to use a separate log file for each machine
  51. # that connects
  52.    log file = /var/log/samba3/log.%m

  53. # Put a capping on the size of the log files (in Kb).
  54.    max log size = 50

  55. # Set the log (verbosity) level (0 <= log level <= 10)
  56. log level = 2
  57. ; log level = 3

  58. # 4. Security and Domain Membership Options:
  59. # This option is important for security. It allows you to restrict
  60. # connections to machines which are on your local network. The
  61. # following example restricts access to two C class networks and
  62. # the "loopback" interface. For more examples of the syntax see
  63. # the smb.conf man page. Do not enable this if (tcp/ip) name resolution does
  64. # not work for all the hosts in your network.
  65.    hosts allow = 192.168.1. 192.168.0. 127.0.0.1
  66. ;   hosts allow = 192.168.1. 192.168.0. 127.0.0.1
  67. ;   hosts allow = 192.168.1. 192.168.2. 127.

  68. # Uncomment this if you want a guest account, you must add this to /etc/passwd
  69. # otherwise the user "nobody" is used
  70. ;  guest account = nobody
  71. # Allow users to map to guest:
  72.   map to guest = bad user

  73. # Security mode. Most people will want user level security. See
  74. # security_level.txt for details.
  75.    security = user
  76. # Use password server option only with security = server or security = domain
  77. # When using security = domain, you should use password server = *
  78. ;   password server = <NT-Server-Name>
  79. ;   password server = *

  80. # Password Level allows matching of _n_ characters of the password for
  81. # all combinations of upper and lower case.
  82. ;  password level = 8
  83. ;  username level = 8

  84. # You may wish to use password encryption. Please read
  85. # ENCRYPTION.txt, Win95.txt and WinNT.txt in the Samba documentation.
  86. # Do not enable this option unless you have read those documents
  87. # Encrypted passwords are required for any use of samba in a Windows NT domain
  88. # The smbpasswd file is only required by a server doing authentication, thus
  89. # members of a domain do not need one.
  90.   encrypt passwords = yes
  91.   smb passwd file = /etc/samba/private/smbpasswd
  92. ;  null passwords = yes

  93. # The following are needed to allow password changing from Windows to
  94. # also update the Linux system password.
  95. # NOTE: Use these with 'encrypt passwords' and 'smb passwd file' above.
  96. # NOTE2: You do NOT need these to allow workstations to change only
  97. #        the encrypted SMB passwords. They allow the Unix password
  98. #        to be kept in sync with the SMB password.
  99. ;  unix password sync = Yes
  100. # You either need to setup a passwd program and passwd chat, or
  101. # enable pam password change
  102. ;  pam password change = yes
  103. ;  passwd program = /usr/bin/passwd %u
  104. ;  passwd chat = *New*UNIX*password* %n\n *Re*ype*new*UNIX*password* %n\n \
  105. ;*passwd:*all*authentication*tokens*updated*successfully*

  106. # Unix users can map to different SMB User names
  107.   username map = /etc/samba/smbusers

  108. # Using the following line enables you to customise your configuration
  109. # on a per machine basis. The %m gets replaced with the netbios name
  110. # of the machine that is connecting
  111. ;   include = /etc/samba/smb.conf.%m

  112. # Options for using winbind. Winbind allows you to do all account and
  113. # authentication from a Windows or samba domain controller, creating
  114. # accounts on the fly, and maintaining a mapping of Windows RIDs to unix uid's
  115. # and gid's. winbind uid and winbind gid are the only required parameters.
  116. #
  117. # winbind uid is the range of uid's winbind can use when mapping RIDs to uid's
  118. ;  winbind uid = 10000-20000
  119. #
  120. # winbind gid is the range of uid's winbind can use when mapping RIDs to gid's
  121. ;  winbind gid = 10000-20000
  122. #
  123. # winbind separator is the character a user must use between their domain
  124. # name and username, defaults to ""
  125. ;  winbind separator = +
  126. #
  127. # winbind use default domain allows you to have winbind return usernames
  128. # in the form user instead of DOMAIN+user for the domain listed in the
  129. # workgroup parameter.
  130. ;  winbind use default domain = yes
  131. #
  132. # template homedir determines the home directory for winbind users, with
  133. # %D expanding to their domain name and %U expanding to their username:
  134. ;  template homedir = /home/%D/%U

  135. # When using winbind, you may want to have samba create home directories
  136. # on the fly for authenticated users. Ensure that /etc/pam.d/samba is
  137. # using 'service=system-auth-winbind' in pam_stack modules, and then
  138. # enable obedience of pam restrictions below:
  139. ;  obey pam restrictions = yes

  140. #
  141. # template shell determines the shell users authenticated by winbind get
  142. ;  template shell = /bin/bash

  143. # 5. Browser Control and Networking Options:
  144. # Most people will find that this option gives better performance.
  145. # See speed.txt and the manual pages for details
  146.    socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=8192 SO_SNDBUF=8192
  147. ;   socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192

  148. # Configure Samba to use multiple interfaces
  149. # If you have multiple network interfaces then you must list them
  150. # here. See the man page for details.
  151. ;   interfaces = 192.168.12.2/24 192.168.13.2/24

  152. # Configure remote browse list synchronisation here
  153. #  request announcement to, or browse list sync from:
  154. #       a specific host or from / to a whole subnet (see below)
  155. ;   remote browse sync = 192.168.3.25 192.168.5.255
  156. # Cause this host to announce itself to local subnets here
  157. ;   remote announce = 192.168.1.255 192.168.2.44

  158. # set local master to no if you don't want Samba to become a master
  159. # browser on your network. Otherwise the normal election rules apply
  160.    local master = yes
  161. ;   local master = no

  162. # OS Level determines the precedence of this server in master browser
  163. # elections. The default value should be reasonable
  164.    os level = 64
  165. ;   os level = 33

  166. # Domain Master specifies Samba to be the Domain Master Browser. This
  167. # allows Samba to collate browse lists between subnets. Don't use this
  168. # if you already have a Windows NT domain controller doing this job
  169.    domain master = yes
  170. ;   domain master = yes

  171. # Preferred Master causes Samba to force a local browser election on startup
  172. # and gives it a slightly higher chance of winning the election
  173.    preferred master = yes
  174. ;   preferred master = yes

  175. # 6. Domain Control Options:
  176. # Enable this if you want Samba to be a domain logon server for
  177. # Windows95 workstations or Primary Domain Controller for WinNT and Win2k
  178.    domain logons = yes
  179. ;   domain logons = yes


  180. # if you enable domain logons then you may want a per-machine or
  181. # per user logon script
  182. # run a specific logon batch file per workstation (machine)
  183. ;   logon script = %m.bat
  184. # run a specific logon batch file per username
  185.    logon script = %U.bat
  186. ;   logon script = netlogon.bat

  187. # Where to store roaming profiles for WinNT and Win2k
  188. #        %L substitutes for this servers netbios name, %U is username
  189. #        You must uncomment the [Profiles] share below
  190.    logon path = \\%L\%U
  191. ;   logon path = \\%L\Profiles\%U

  192. # Where to store roaming profiles for Win9x. Be careful with this as it also
  193. # impacts where Win2k finds it's /HOME share
  194. logon home = \\%L\%U
  195. ; logon home = \\%L\%U\.profile

  196. # 登录驱动器
  197. logon drive = M:

  198. # The add user script is used by a domain member to add local user accounts
  199. # that have been authenticated by the domain controller, or when adding
  200. # users via the Windows NT Tools (ie User Manager for Domains).

  201. # Scripts for file (passwd, smbpasswd) backend:
  202. ; add user script = /usr/sbin/useradd -d /var/samba/home/'%u' -s /bin/false '%u'
  203. ; delete user script = /usr/sbin/userdel '%s'
  204. ; add user to group script = /usr/bin/gpasswd -a '%u' '%g'
  205. ; delete user from group script = /usr/bin/gpasswd -d '%u' '%g'
  206. ; set primary group script = /usr/sbin/usermod -g '%g' '%u'
  207. ; add group script = /usr/sbin/groupadd %g && getent group '%g'|awk -F: '{print $3}'
  208. ; delete group script = /usr/sbin/groupdel '%g'

  209. # Scripts for LDAP backend (assumes nss_ldap is in use on the domain controller.
  210. # Needs IDEALX scripts, and configuration in smbldap_conf.pm.
  211. # This assumes you've installed the IDEALX scripts into /usr/share/samba/scripts...
  212. ; add user script = /usr/share/samba/scripts/smbldap-useradd.pl '%u'
  213. ; delete user script = /usr/share/samba/scripts/smbldap-userdel.pl '%u'
  214. ; add user to group script = /usr/share/samba/scripts/smbldap-groupmod.pl -m '%u' '%g'
  215. ; delete user from group script = /usr/share/samba/scripts/smbldap-groupmod.pl -x '%u' '%g'
  216. ; set primary group script = /usr/share/samba/scripts/smbldap-usermod.pl -g '%g' '%u'
  217. ; add group script = /usr/share/samba/scripts/smbldap-groupadd.pl '%g' && /usr/share/samba/scripts/smbldap-groupshow.pl %g|awk '/^gidNumber:/ {print $2}'
  218. ; delete group script = /usr/share/samba/scripts/smbldap-userdel.pl '%g'


  219. # The add machine script is use by a samba server configured as a domain
  220. # controller to add local machine accounts when adding machines to the domain.
  221. # The script must work from the command line when replacing the macros,
  222. # or the operation will fail. Check that groups exist if forcing a group.
  223. # Script for domain controller for adding machines:
  224. ; add machine script = /usr/sbin/useradd -d /dev/null -g machines -c 'Machine Account' -s /bin/false -M %u
  225. add machine script = /usr/sbin/useradd -d /dev/null -g machines -c 'Machine Account' -s /bin/false -M %u
  226. # Script for domain controller with LDAP backend for adding machines (You need
  227. # the IDEALX scripts, and to configure the smbldap_conf.pm first):
  228. ; add machine script = /usr/share/samba/scripts/smbldap-useradd.pl -w -d /dev/null -g machines -c 'Machine Account' -s /bin/false %u

  229. # Domain groups:
  230. # Domain groups are now configured by using the 'net groupmap' tool

  231. # Samba Password Database configuration:
  232. # Samba now has runtime-configurable password database backends. Multiple
  233. # passdb backends may be used, but users will only be added to the first one
  234. # Default:
  235. ; passdb backend = smbpasswd guest
  236. # TDB backen with fallback to smbpasswd and guest
  237. ; passdb backend = tdbsam smbpasswd guest
  238. # LDAP with fallback to smbpasswd guest
  239. # Enable SSL by using an ldaps url, or enable tls with 'ldap ssl' below.
  240. ; passdb backend = ldapsam:ldaps://ldap.mydomain.com smbpasswd guest
  241. # Use the samba2 LDAP schema:
  242. ; passdb backend = ldapsam_compat:ldaps://ldap.mydomain.com smbpasswd guest

  243. # idmap uid account range:
  244. # This is a range of unix user-id's that samba will map non-unix RIDs to,
  245. # such as when using Winbind
  246. ; idmap uid = 10000-20000
  247. ; idmap gid = 10000-20000
  248.   
  249. # LDAP configuration for Domain Controlling:
  250. # The account (dn) that samba uses to access the LDAP server
  251. # This account needs to have write access to the LDAP tree
  252. # You will need to give samba the password for this dn, by
  253. # running 'smbpasswd -w mypassword'
  254. ; ldap admin dn = cn=root,dc=mydomain,dc=com
  255. ; ldap ssl = start_tls
  256. # start_tls should run on 389, but samba defaults incorrectly to 636
  257. ; ldap port = 389
  258. ; ldap suffix = dc=mydomain,dc=com
  259. ; ldap server = ldap.mydomain.com
  260. # Seperate suffixes are available for machines, users, groups, and idmap, if
  261. # ldap suffix appears first, it is appended to the specific suffix.
  262. # Example for a unix-ish directory layout:
  263. ; ldap machine suffix = ou=Hosts
  264. ; ldap user suffix = ou=People
  265. ; ldap group suffix = ou=Group
  266. ; ldap idmap suffix = ou=Idmap
  267. # Example for AD-ish layout:
  268. ; ldap machine suffix = cn=Computers
  269. ; ldap user suffix = cn=Users
  270. ; ldap group suffix = cn=Groups
  271. ; ldap idmap suffix = cn=Idmap


  272. # 7. Name Resolution Options:
  273. # All NetBIOS names must be resolved to IP Addresses
  274. # 'Name Resolve Order' allows the named resolution mechanism to be specified
  275. # the default order is "host lmhosts wins bcast". "host" means use the unix
  276. # system gethostbyname() function call that will use either /etc/hosts OR
  277. # DNS or NIS depending on the settings of /etc/host.config, /etc/nsswitch.conf
  278. # and the /etc/resolv.conf file. "host" therefore is system configuration
  279. # dependant. This parameter is most often of use to prevent DNS lookups
  280. # in order to resolve NetBIOS names to IP Addresses. Use with care!
  281. # The example below excludes use of name resolution for machines that are NOT
  282. # on the local network segment
  283. # - OR - are not deliberately to be known via lmhosts or via WINS.
  284. ; name resolve order = wins lmhosts bcast

  285. # Windows Internet Name Serving Support Section:
  286. # WINS Support - Tells the NMBD component of Samba to enable it's WINS Server
  287.    wins support = yes
  288. ;   wins support = yes

  289. # WINS Server - Tells the NMBD components of Samba to be a WINS Client
  290. #       Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
  291. ;   wins server = w.x.y.z

  292. # WINS Proxy - Tells Samba to answer name resolution queries on
  293. # behalf of a non WINS capable client, for this to work there must be
  294. # at least one  WINS Server on the network. The default is NO.
  295. ;   wins proxy = yes

  296. # DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names
  297. # via DNS nslookups. The built-in default for versions 1.9.17 is yes,
  298. # this has been changed in version 1.9.18 to no.
  299.    dns proxy = no

  300. # 8. File Naming Options:
  301. # Case Preservation can be handy - system default is _no_
  302. # NOTE: These can be set on a per share basis
  303. ;  preserve case = no
  304. ;  short preserve case = no
  305. # Default case is normally upper case for all DOS files
  306. ;  default case = lower
  307. # Be very careful with case sensitivity - it can break things!
  308. ;  case sensitive = no

  309. # Enabling internationalization:
  310. # you can match a Windows code page with a UNIX character set.
  311. # Windows: 437 (US), 737 (GREEK), 850 (Latin1 - Western European),
  312. # 852 (Czech), 861 (???), 932 (Japanese),
  313. # 936 (Simplified Chin.), 949 (Korean Hangul),
  314. # 950 (Trad. Chin.).
  315. # More detail about code page is in
  316. # "http://www.microsoft.com/globaldev/reference/oslocversion.mspx"
  317. # UNIX: ISO8859-1 (Western European), ISO8859-2 (Eastern Eu.),
  318. # ISO8859-5 (Russian Cyrillic), KOI8-R (Alt-Russ. Cyril.)
  319. # This is an example for french users:
  320. ;   dos charset = 850
  321. ;   unix charset = ISO8859-1
  322.    dos charset = cp936
  323.    unix charset = cp936
  324.    display charset = cp936

  325. # 作为时间服务器
  326. time server = yes

  327. # 设置连接被视为无效而断开前,未激活姿态的时间(Min),防止资源被无效连接耗费.
  328. deadtime = 5

  329. # 超级用户
  330. admin users = root

  331. # Windows 工作方式,只要文件被修改,其时间戳将随时更新.
  332. dos filetimes = yes

  333. # Samba 对文件生成时间作取整处理,计为下 1 秒,这也是 Windows 工作方式.
  334. dos filetime resolution = yes

  335. #============================ Share Definitions ==============================
  336. [homes]
  337. ;   comment = Home Directories
  338.    comment = 存放这里的文件可以在任一台计算机用这个帐号登录访问。(读写属性:0700)
  339.    path = /var/samba/home/%U
  340. ;   root preexec = /var/samba/netlogon/mkdirscript.pl home %U %G
  341.    root preexec = /var/samba/netlogon/mkdirscript.pl home %U %U %G 0700
  342.    browseable = no
  343.    writable = yes
  344. # You can enable VFS recycle bin on a per share basis:
  345. # Uncomment the next 2 lines (make sure you create a
  346. # .recycle folder in the base of the share and ensure
  347. # all users will have write access to it. See
  348. # examples/VFS/recycle/REAME in the samba docs for details
  349. ;   vfs object = /usr/lib/samba/vfs/recycle.so

  350. # Un-comment the following and create the netlogon directory for Domain Logons
  351. [netlogon]
  352.    comment = Network Logon Service
  353.    path = /var/samba/netlogon
  354.    root preexec = /var/samba/netlogon/logonscript.pl %L %U %M %m %a
  355.    root postexec = /var/samba/netlogon/logoutscript.pl %U
  356.    read only =yes
  357.    guest ok = yes
  358.    browseable = no
  359.    write list = root @adm @admin
  360. ;   writable = no

  361. # Un-comment the following to provide a specific roving profile share
  362. # the default is to use the user's home directory
  363. ;[Profiles]
  364. ;;    path = /var/lib/samba/profiles
  365. ;    path = /var/samba/profiles
  366. ;    browseable = no
  367. ;    writeable = yes
  368. ;;    guest ok = yes
  369. ;    create mask = 0600
  370. ;    directory mask = 0700
  371. # This script can be enabled to create profile directories on the fly
  372. # You may want to turn off guest acces if you enable this, as it
  373. # hasn't been thoroughly tested.
  374. ;;root preexec = PROFILE=/var/lib/samba/profiles/%u; if [ ! -e $PROFILE ]; \
  375. ;;                then mkdir -pm700 $PROFILE; chown %u:%g $PROFILE;fi

  376. # NOTE: If you have a CUPS print system there is no need to
  377. # specifically define each individual printer.
  378. # You must configure the samba printers with the appropriate Windows
  379. # drivers on your Windows clients. On the Samba server no filtering is
  380. # done. If you wish that the server provides the driver and the clients
  381. # send PostScript ("Generic PostScript Printer" under Windows), you have
  382. # to swap the 'print command' line below with the commented one.
  383. [printers]
  384.    comment = All Printers
  385.    path = /var/spool/samba
  386.    browseable = no
  387. # to allow user 'guest account' to print.
  388.    guest ok = yes
  389.    writable = no
  390.    printable = yes
  391.    create mode = 0700
  392. # =====================================
  393. # print command: see above for details.
  394. # =====================================
  395.    print command = lpr-cups -P %p -o raw %s -r   # using client side printer drivers.
  396. ;   print command = lpr-cups -P %p %s # using cups own drivers (use generic PostScript on clients).
  397. # The following two commands are the samba defaults for printing=cups
  398. # change them only if you need different options:
  399. ;   lpq command = lpq -P %p
  400. ;   lprm command = cancel %p-%j

  401. # This share is used for Windows NT-style point-and-print support.
  402. # To be able to install drivers, you need to be either root, or listed
  403. # in the printer admin parameter above. Note that you also need write access
  404. # to the directory and share definition to be able to upload the drivers.
  405. # For more information on this, please see the Printing Support Section of
  406. # /usr/share/doc/samba-<version>/Samba-HOWTO-Collection.pdf
  407. [print$]
  408.    path = /var/lib/samba/printers
  409.    browseable = yes
  410.    read only = yes
  411.    write list = root @adm @admin
  412.    guest ok = yes

  413. # This one is useful for people to share files
  414. ;[tmp]
  415. ;   comment = Temporary file space
  416. ;   path = /tmp
  417. ;   read only = no
  418. ;   public = yes

  419. # A publicly accessible directory, but read only, except for people in
  420. # the "staff" group
  421. ;[public]
  422. ;   comment = Public Stuff
  423. ;   path = /home/samba/public
  424. ;   public = yes
  425. ;   writable = no
  426. ;   write list = @staff
  427. # Audited directory through experimental VFS audit.so module:
  428. # Uncomment next line.
  429. ;   vfs object = /usr/lib/samba/vfs/audit.so

  430. # Other examples.
  431. #
  432. # A private printer, usable only by Fred. Spool data will be placed in Fred's
  433. # home directory. Note that fred must have write access to the spool directory,
  434. # wherever it is.
  435. ;[fredsprn]
  436. ;   comment = Fred's Printer
  437. ;   valid users = fred
  438. ;   path = /homes/fred
  439. ;   printer = freds_printer
  440. ;   public = no
  441. ;   writable = no
  442. ;   printable = yes

  443. # A private directory, usable only by Fred. Note that Fred requires write
  444. # access to the directory.
  445. ;[fredsdir]
  446. ;   comment = Fred's Service
  447. ;   path = /usr/somewhere/private
  448. ;   valid users = fred
  449. ;   public = no
  450. ;   writable = yes
  451. ;   printable = no

  452. # a service which has a different directory for each machine that connects
  453. # this allows you to tailor configurations to incoming machines. You could
  454. # also use the %u option to tailor it by user name.
  455. # The %m gets replaced with the machine name that is connecting.
  456. ;[pchome]
  457. ;  comment = PC Directories
  458. ;  path = /usr/pc/%m
  459. ;  public = no
  460. ;  writable = yes

  461. # A publicly accessible directory, read/write to all users. Note that all files
  462. # created in the directory by users will be owned by the default user, so
  463. # any user with access can delete any other user's files. Obviously this
  464. # directory must be writable by the default user. Another user could of course
  465. # be specified, in which case all files would be owned by that user instead.
  466. ;[public]
  467. ;   path = /usr/somewhere/else/public
  468. ;   public = yes
  469. ;   only guest = yes
  470. ;   writable = yes
  471. ;   printable = no

  472. # The following two entries demonstrate how to share a directory so that two
  473. # users can place files there that will be owned by the specific users. In this
  474. # setup, the directory should be writable by both users and should have the
  475. # sticky bit set on it to prevent abuse. Obviously this could be extended to
  476. # as many users as required.
  477. ;[myshare]
  478. ;   comment = Mary's and Fred's stuff
  479. ;   path = /usr/somewhere/shared
  480. ;   valid users = mary fred
  481. ;   public = no
  482. ;   writable = yes
  483. ;   printable = no
  484. ;   create mask = 0765

  485. [public]
  486. ;[公共文档]
  487.    comment = 如果你想把文件共享给大家,可以把它放在这里。(读写属性:0777)
  488.    path = /var/samba/public
  489.    public = yes
  490.    writable = yes
  491.    create mask = 0666
  492.    directory mask = 0777
  493.    printable = no

  494. [software]
  495. ;[软件仓库]
  496.    comment = 在这里你可以找到大部分常用软件。(读写属性:0400)
  497.    path = /var/samba/software
  498.    public = yes
  499.    write list = root @adm @admin
  500.    create mask = 0660
  501.    directory mask = 0770
  502.    printable = no

  503. [multimedia]
  504. ;[多媒体]
  505.    comment = MP3、Flash、电影、图片……(读写属性:0400)
  506.    path = /var/samba/multimedia
  507.    public = yes
  508.    write list = root @adm @admin
  509.    create mask = 0660
  510.    directory mask = 0770
  511.    printable = no

  512. [group]
  513. ;[我的工作组]
  514.    comment = 如果你想把文件只提供给本工作组的人共享,请把文件放在这里。(读写属性:0770)
  515.    path = /var/samba/group/%G
  516. ;   root preexec = /var/samba/netlogon/mkdirscript.pl group %G
  517.    root preexec = /var/samba/netlogon/mkdirscript.pl group %G root %G 0770
  518.    browseable = yes
  519.    public = no
  520.    writable = yes
  521.    create mode = 0660
  522.    directory mode = 0770

  523. [secret]
  524.   comment = 本共享只有 "secret" 组才能访问。(读写属性:0770)
  525.   path = /var/samba/secret
  526.   valid users = @secret
  527.   force group = secret
  528.   browseable = yes
  529.   writable = yes
  530.   create mask = 0660
  531.   directory mask = 0770

  532. [pchome]
  533. ;[电脑主目录]
  534.   comment = 注意:只有你这台计算机才能访问这里的文件。(读写属性:0777)
  535.   path = /var/samba/pchome/%m
  536. ;  root preexec = /var/samba/netlogon/mkdirscript.pl pchome %m
  537.   root preexec = /var/samba/netlogon/mkdirscript.pl pchome %m root root 0777
  538.   browseable = yes
  539.   public = no
  540.   writable = yes
  541.   create mode = 0666
  542.   directory mode = 0777

复制代码
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-1-7 15:37:33 | 显示全部楼层
我把配置文件改成你的,客户端还是不能改密码呀!!
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-1-12 20:49:21 | 显示全部楼层
一直不成功,顶一下。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-1-14 20:06:04 | 显示全部楼层
再顶,再顶。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表