当前位置: 技术问答>linux和unix
虚拟机中安装samba,vista下网上邻居看不到,这是怎么回事?
来源: 互联网 发布时间:2016-09-05
本文导语: 这个是smb.conf文件的相关配置: #======================= Global Settings ===================================== [global] workgroup = WORKGROUP server string = Samba Server Version %v security = share username map = /etc/samba/smbusers ; netbios name =...
这个是smb.conf文件的相关配置:
#======================= Global Settings =====================================
[global]
workgroup = WORKGROUP
server string = Samba Server Version %v
security = share
username map = /etc/samba/smbusers
; netbios name = MYSERVER
; interfaces = lo eth0 192.168.12.2/24 192.168.13.2/24
; hosts allow = 127. 192.168.12. 192.168.13.
# --------------------------- Logging Options -----------------------------
# logs split per machine
log file = /var/log/samba/log.%m
# max 50KB per log file, then rotate
max log size = 50
# ----------------------- Standalone Server Options ------------------------
# security = user
# passdb backend = tdbsam
smb passwd file = /etc/samba/smbpasswd
# ----------------------- Domain Members Options ------------------------
#
; security = domain
; passdb backend = tdbsam
; realm = MY_REALM
; password server =
# ----------------------- Domain Controller Options ------------------------
#
; security = user
; passdb backend = tdbsam
; domain master = yes
; domain logons = yes
# the login script name depends on the machine name
; logon script = %m.bat
# the login script name depends on the unix user used
; logon script = %u.bat
; logon path = \%LProfiles%u
# disables profiles support by specifing an empty path
; logon path =
; add user script = /usr/sbin/useradd "%u" -n -g users
; add group script = /usr/sbin/groupadd "%g"
; add machine script = /usr/sbin/useradd -n -c "Workstation (%u)" -M -d /nohome -s /bin/false "%u"
; delete user script = /usr/sbin/userdel "%u"
; delete user from group script = /usr/sbin/userdel "%u" "%g"
; delete group script = /usr/sbin/groupdel "%g"
# ----------------------- Browser Control Options ----------------------------
#
# set local master to no if you don't want Samba to become a master
# browser on your network. Otherwise the normal election rules apply
#
# OS Level determines the precedence of this server in master browser
# elections. The default value should be reasonable
#
# Preferred Master causes Samba to force a local browser election on startup
# and gives it a slightly higher chance of winning the election
; local master = no
; os level = 33
; preferred master = yes
#----------------------------- Name Resolution -------------------------------
; wins support = yes
; wins server = w.x.y.z
; wins proxy = yes
; dns proxy = yes
# --------------------------- Printing Options -----------------------------
load printers = yes
cups options = raw
; printcap name = /etc/printcap
#obtain list of printers automatically on SystemV
; printcap name = lpstat
; printing = cups
# --------------------------- Filesystem Options ---------------------------
; map archive = no
; map hidden = no
; map read only = no
; map system = no
; store dos attributes = yes
#============================ Share Definitions ==============================
[homes]
comment = Home Directories
browseable = no
writable = yes
create = mask 0700
directory mask = 0700
; valid users = %S
; valid users = MYDOMAIN%S
[qinguan2]
path = /home/qinguan2
writeable = yes
; browseable = yes
guest ok = yes
read list = @student student1 qinguan2
write list = @student qinguan2
[student1]
path = /home/student1
writeable = yes
; browseable = yes
guest ok = yes
read list = @student qinguan2
[printers]
comment = All Printers
path = /var/spool/samba
browseable = no
guest ok = no
writable = no
printable = yes
# Un-comment the following and create the netlogon directory for Domain Logons
; [netlogon]
; comment = Network Logon Service
; path = /var/lib/samba/netlogon
; guest ok = yes
; writable = no
; share modes = no
# Un-comment the following to provide a specific roving profile share
# the default is to use the user's home directory
; [Profiles]
; path = /var/lib/samba/profiles
; browseable = no
; guest ok = yes
# A publicly accessible directory, but read only, except for people in
# the "staff" group
; [public]
; comment = Public Stuff
; path = /home/samba
; public = yes
; writable = yes
; printable = no
; write list = +staff
[share]
comment = sharefile
path = /home
public = yes
writable = yes
printable = no
read list = student1 qinguan2 @student
write list = @student qinguan2
#======================= Global Settings =====================================
[global]
workgroup = WORKGROUP
server string = Samba Server Version %v
security = share
username map = /etc/samba/smbusers
; netbios name = MYSERVER
; interfaces = lo eth0 192.168.12.2/24 192.168.13.2/24
; hosts allow = 127. 192.168.12. 192.168.13.
# --------------------------- Logging Options -----------------------------
# logs split per machine
log file = /var/log/samba/log.%m
# max 50KB per log file, then rotate
max log size = 50
# ----------------------- Standalone Server Options ------------------------
# security = user
# passdb backend = tdbsam
smb passwd file = /etc/samba/smbpasswd
# ----------------------- Domain Members Options ------------------------
#
; security = domain
; passdb backend = tdbsam
; realm = MY_REALM
; password server =
# ----------------------- Domain Controller Options ------------------------
#
; security = user
; passdb backend = tdbsam
; domain master = yes
; domain logons = yes
# the login script name depends on the machine name
; logon script = %m.bat
# the login script name depends on the unix user used
; logon script = %u.bat
; logon path = \%LProfiles%u
# disables profiles support by specifing an empty path
; logon path =
; add user script = /usr/sbin/useradd "%u" -n -g users
; add group script = /usr/sbin/groupadd "%g"
; add machine script = /usr/sbin/useradd -n -c "Workstation (%u)" -M -d /nohome -s /bin/false "%u"
; delete user script = /usr/sbin/userdel "%u"
; delete user from group script = /usr/sbin/userdel "%u" "%g"
; delete group script = /usr/sbin/groupdel "%g"
# ----------------------- Browser Control Options ----------------------------
#
# set local master to no if you don't want Samba to become a master
# browser on your network. Otherwise the normal election rules apply
#
# OS Level determines the precedence of this server in master browser
# elections. The default value should be reasonable
#
# Preferred Master causes Samba to force a local browser election on startup
# and gives it a slightly higher chance of winning the election
; local master = no
; os level = 33
; preferred master = yes
#----------------------------- Name Resolution -------------------------------
; wins support = yes
; wins server = w.x.y.z
; wins proxy = yes
; dns proxy = yes
# --------------------------- Printing Options -----------------------------
load printers = yes
cups options = raw
; printcap name = /etc/printcap
#obtain list of printers automatically on SystemV
; printcap name = lpstat
; printing = cups
# --------------------------- Filesystem Options ---------------------------
; map archive = no
; map hidden = no
; map read only = no
; map system = no
; store dos attributes = yes
#============================ Share Definitions ==============================
[homes]
comment = Home Directories
browseable = no
writable = yes
create = mask 0700
directory mask = 0700
; valid users = %S
; valid users = MYDOMAIN%S
[qinguan2]
path = /home/qinguan2
writeable = yes
; browseable = yes
guest ok = yes
read list = @student student1 qinguan2
write list = @student qinguan2
[student1]
path = /home/student1
writeable = yes
; browseable = yes
guest ok = yes
read list = @student qinguan2
[printers]
comment = All Printers
path = /var/spool/samba
browseable = no
guest ok = no
writable = no
printable = yes
# Un-comment the following and create the netlogon directory for Domain Logons
; [netlogon]
; comment = Network Logon Service
; path = /var/lib/samba/netlogon
; guest ok = yes
; writable = no
; share modes = no
# Un-comment the following to provide a specific roving profile share
# the default is to use the user's home directory
; [Profiles]
; path = /var/lib/samba/profiles
; browseable = no
; guest ok = yes
# A publicly accessible directory, but read only, except for people in
# the "staff" group
; [public]
; comment = Public Stuff
; path = /home/samba
; public = yes
; writable = yes
; printable = no
; write list = +staff
[share]
comment = sharefile
path = /home
public = yes
writable = yes
printable = no
read list = student1 qinguan2 @student
write list = @student qinguan2
|
映射网络驱动器
|
晕,都不知道Samba支持vista不。
|
vista可以,vista要在网络设置里面开启局域网发现功能才可以列出局域网内共享的目录,如果还不行就是samba的问题