【发布时间】:2023-03-17 16:45:01
【问题描述】:
我是设置 Samba 共享的新手,我想我离让它发挥作用还有一英寸的距离。我正在使用的配置文件如下。当我连接到共享时,我可以很好地读取文件并将它们复制到我的本地计算机,但是当我尝试写入共享时(使用 OSX)我被要求输入用户名和密码,即使我已经设置了它作为具有访客访问权限的公共共享。
我是否缺少设置?感谢您的帮助!
killall smbd 杀戮 nmbd 睡觉2
mkdir -p /tmp/etc/samba 回声“
[全局]
netbios name = DD-WRT
workgroup = WORKGROUP
server string = DD-WRT
syslog = 10
obey pam restrictions = yes
socket options = TCP_NODELAY
preferred master = no
os level = 20
security = share
guest account = nobody
invalid users = root, mail, deamon, reboot
null passwords = yes
guest only = yes
map to guest = Bad User
private dir = /tmp/etc/samba/
lock directory = /var/lock/
pid directory = /var/run/
unix charset = UTF-8
dos charset = UTF-8
map archive = No
map hidden = No
map system = No
[分享]
path = /mnt/
read only = no
create mask = 0700
directory mask = 0700
writeable = yes
browseable = yes
" > /tmp/etc/samba/smb.conf
grep -q 没有人 /etc/passwd || echo 'nobody:x:65534:65534:nobody:/mnt:/bin/false' >> /etc/passwd
SMBOPTIONS="-s /tmp/etc/samba/smb.conf" /usr/sbin/smbd $SMBOPTIONS /usr/sbin/nmbd $SMBOPTIONS
【问题讨论】:
标签: linux apache macos permissions samba