我设置了一台 Ubuntu 14.04 Server 作为域控制器。Windows 7 客户端可以加入域,显示网络中的 Samba 共享目录,但无法打开除用户主目录之外的任何目录。消息说我没有权限访问该目录。我搜索了“AskUbuntu”并通过 Google 搜索了网络,但找不到解决方案。
我的 Smb.conf 文件是:
# Global parameters
[global]
netbios name = FRANK-N-STEIN
workgroup = TUX-NET
## passdb backend = tbdsam
# os level = 33
wins support = yes
preferred master = yes
# local master = yes
# domain master = yes
security = domain
domain logons = yes
# logon path = \\%N\profiles\%u
# *************************************************
passwd chat = *New*Password* %n\n *Re-enter*new*password* %n\n *Password*changed*
username map = /etc/samba/smbusers
syslog = 0
name resolve order = wins bcast hosts
printcap name = CUPS
show add printer wizard = No
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/usermod -G %g %u
add machine script = /usr/sbin/useradd -s /bin/false -d /dev/null %u
logon script = scripts\logon.bat
# logon path =
logon drive = H:
printing = cups
# *******************************************************
[homes]
comment = Home Directories
valid users = %S
read only = No
browseable = No
[netlogon]
comment = Network Logon Service
path = /var/lib/samba/netlogon
guest ok = Yes
[accounts]
comment = Accounting Files
path = /media/ken/Linux-Data/data/accounts
writable = yes
read only = No
guest ok = yes
valid users = @ntadmin
browseable = yes
create mode = 0660
directory mode = 0770
public = yes
[finsvcs]
comment = Financial Services Files
path = /media/ken/Linux-Data/data/finsvcs
writeable = yes
read only = No
guest ok = yes
valid users = @ntadmin
browseable = yes
create mode = 0660
directory mode = 0770
public = yes
[printers]
comment = SMB Print Spool
path = /var/spool/samba
guest ok = Yes
printable = Yes
use client driver = Yes
default devmode = Yes
browseable = No
我正在尝试复制《Samba 3 by Example》一书中第 3 章中针对小型办公室的配置。
对于共享部分中的“有效用户”行,我尝试了所有组名组合(@{group name} 和个人用户)。我还尝试了“chown”和“chmod”的多种变体来更改共享目录的权限。
以下是共享文件的父目录的权限:
drwsrwsr-x 6 ken ntadmin 4096 May 16 11:45 data
以下是两个共享目录的权限:
drwxrwsr-x 2 ken accounts 4096 May 16 11:38 accounts
drwxrwsr-x 2 ken finsrvcs 4096 May 16 11:39 finsvcs
我刚刚注意到第二行中组和目录的拼写不同。我会查找并更正该错误。
我希望有人能回答。我花了几个小时尝试从 Win 7 访问文件夹。
提前致谢。