求救:samba伺服器能看到,但是訪問不了
我做了一個samba伺服器,想要每個windows用戶只能訪問操作自己的文件夾,別人看不到,只能通過自己的賬號和密碼來訪問。按照書上的說法配置完成後在網上鄰居能看到samba伺服器,但是雙擊后提示沒有許可權,我在/etc/samba/smbpasswd中建了幾個帳戶,帳戶中的用戶名和密碼和linux系統的用戶名和密碼一致。下面是/etc/samba/smb.conf的配置文件:
#======================= Global Settings =====================================
# workgroup = NT-Domain-Name or Workgroup-Name
workgroup = workgroup
# server string is the equivalent of the NT Description field
server string = RLSAMBA
hosts allow = 192.168.0. 127.
# if you want to automatically load your printer list rather
# than setting them up individually then you'll need this
printcap name = /etc/printcap
load printers = yes
# It should not be necessary to spell out the print system type unless
# yours is non-standard. Currently supported print systems include:
# bsd, sysv, plp, lprng, aix, hpux, qnx
; printing = cups
# This option tells cups that the data has already been rasterized
cups options = raw
log file = /var/log/samba/%m.log
# all log information in one file
# log file = /var/log/samba/smbd.log
# Put a capping on the size of the log files (in Kb).
max log size = 50
# Security mode. Most people will want user level security. See
# security_level.txt for details.
security = user
# Use password server option only with security = server
; password server = <NT-Server-Name>
# Password Level allows matching of _n_ characters of the password for
# all combinations of upper and lower case.
; password level = 8
; username level = 8
encrypt passwords = yes
smb passwd file = /etc/samba/smbpasswd
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
name resolve order = lmhost bcast host
dns proxy = no
#============================ Share Definitions ==============================
idmap uid = 16777216-33554431
idmap gid = 16777216-33554431
template shell = /bin/false
winbind use default domain = no
comment = Home Directories
browseable = no
#readonly = no
writable=yes
valid users = %S
create mode = 0664
directory mode = 0775
comment = All Printers
path = /var/spool/samba
browseable = no
# Set public = yes to allow user 'guest account' to print
guest ok = no
writable = no
printable = yes
# This one is useful for people to share files
;
; comment = Temporary file space
; path = /tmp
; read only = no
; public = yes
# A publicly accessible directory, but read only, except for people in
# the "staff" group
comment = Public Stuff
path = /home/public
public = yes
writable = yes
valid users = @users
# read only = yes
# write list = @staff
我的問題出在哪呢?先謝謝大家了
《解決方案》
通過testparm命令顯示
# testparm
Load smb config files from /etc/samba/smb.conf
Processing section ""
Processing section ""
Processing section ""
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions
# Global parameters
server string = RLSAMBA
log file = /var/log/samba/%m.log
max log size = 50
name resolve order = lmhost bcast host
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
printcap name = /etc/printcap
dns proxy = No
idmap uid = 16777216-33554431
idmap gid = 16777216-33554431
hosts allow = 192.168.0., 127.
cups options = raw
comment = Home Directories
valid users = %S
read only = No
create mask = 0664
directory mask = 0775
browseable = No
comment = All Printers
path = /var/spool/samba
printable = Yes
browseable = No
comment = Public Stuff
path = /home/public
valid users = @users
read only = No
guest ok = Yes
《解決方案》
問題解決了,原來是IPTABLES的問題