Joe*_*aff 13 server samba dns dhcp
我一直在试图解决两个我怀疑相互关联的问题。最近,我们的网络进行了重新配置,之后,由于网络配置问题,我遇到了很长的启动时间,并且启动后,不再能够从 Win10 客户端访问 samba 文件共享。
启动时间消息:
[ OK ] Reached target Network (Pre).
Starting Network Service...
Starting Wait for Network to be Configured...
Starting Network Name Resolution.
[ OK ] Started Network Name Resolution.
[ OK ] Reached target Host and Network Name Lookups.
[** ] A start job is running for Wait for Network to be Configured (XX / no limit)
Run Code Online (Sandbox Code Playgroud)
最后一条消息大约需要两分钟才能清除。我怀疑这可能是 DHCP 或 DNS 相关的问题。我还注意到 /var/log/syslog 中散布着几个“NXDOMAIN /潜在的 DVE2018-0001 违规”错误。目前,我真的不知道接下来该去哪里查找造成这种延迟的原因(或者为什么文件服务器对 Win10 客户端不可见)。顺便说一句,Samba 似乎正在运行,并且 Webmin 报告文件夹共享处于活动状态...
根据评论中 @heynnema 的建议,输出cat /etc/netplan/*.yaml:
# This is the network config written by 'subiquity'
network:
ethernets:
enp4s0:
dhcp4: true
version: 2
Run Code Online (Sandbox Code Playgroud)
Samba 相关输出。
fstab 内容:
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/md2 during curtin installation
/dev/disk/by-id/md-uuid-4c695059:2f774b0b:9e5492d2:bcb62609 / ext4 defaults 0 0
/dev/disk/by-id/md-uuid-05f3f447:6002213f:2bb97c81:6416f121 none swap sw 0 0
# /boot was on /dev/md0 during curtin installation
/dev/disk/by-id/md-uuid-58dd9ab9:74b02d8a:10890b55:2212c9cb /boot ext4 defaults 0
0
/swap.img none swap sw 0 0
Run Code Online (Sandbox Code Playgroud)
smb.conf 共享定义:
#======================= Share Definitions =======================
# Un-comment the following (and tweak the other settings below to suit)
# to enable the default home directory shares. This will share each
# user's home directory as \\server\username
;[homes]
; comment = Home Directories
; browseable = no
# By default, the home directories are exported read-only. Change the
# next parameter to 'no' if you want to be able to write to them.
; read only = yes
# File creation mask is set to 0700 for security reasons. If you want to
# create files with group=rw permissions, set next parameter to 0775.
; create mask = 0700
# Directory creation mask is set to 0700 for security reasons. If you want to
# create dirs. with group=rw permissions, set next parameter to 0775.
; directory mask = 0700
# By default, \\server\username shares can be connected to by anyone
# with access to the samba server.
# Un-comment the following parameter to make sure that only "username"
# can connect to \\server\username
# This might need tweaking when using external authentication schemes
; valid users = %S
# Un-comment the following and create the netlogon directory for Domain
Logons
# (you need to configure Samba to act as a domain controller too.)
;[netlogon]
; comment = Network Logon Service
; path = /home/samba/netlogon
; guest ok = yes
; read only = yes
# Un-comment the following and create the profiles directory to store
# users profiles (see the "logon path" option above)
# (you need to configure Samba to act as a domain controller too.)
# The path below should be writable by all users so that their
# profile directory may be created the first time they log on
;[profiles]
; comment = Users profiles
; path = /home/samba/profiles
; guest ok = no
; browseable = no
; create mask = 0600
; directory mask = 0700
[printers]
comment = All Printers
browseable = no
path = /var/spool/samba
printable = yes
guest ok = no
read only = yes
create mask = 0700
# Windows clients look for this share name as a source of downloadable
# printer drivers
[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
browseable = yes
read only = yes
guest ok = no
# Uncomment to allow remote administration of Windows print drivers.
# You may need to replace 'lpadmin' with the name of the group your
# admin users are members of.
# Please note that you also need to set appropriate Unix permissions
# to the drivers directory for these users to have write rights in it
; write list = root, @lpadmin
[media_Public]
create mode = 777
path = /home/media/Public
writeable = yes
public = yes
directory mode = 777
Run Code Online (Sandbox Code Playgroud)
hey*_*ema 19
用此替换当前的/etc/netplan/*.yaml文件,并将 enpxxx 更改为第二个接口的正确名称...
network:
version: 2
renderer: networkd
ethernets:
enp4s0:
dhcp4: true
optional: true
enpxxx:
dhcp4: true
optional: true
Run Code Online (Sandbox Code Playgroud)
sudo netplan generate
sudo netplan apply
reboot
| 归档时间: |
|
| 查看次数: |
39693 次 |
| 最近记录: |