大网数据广告活动
服务器运维问答

Linux SMB share - how to give access to Windows local system account?

· 52CE 我爱测

I have a SMB share on a Linux host. To grant remote access to the share for a Windows user, one must create a new SMB user which has the same username, and same password as the Windows account. i.e. to give access to Windows user…

问题原文

原帖链接 · latkin · CC BY-SA 3.0

I have a SMB share on a Linux host. To grant remote access to the share for a Windows user, one must create a new SMB user which has the same username, and same password as the Windows account.

i.e. to give access to Windows user winhost\calvin I would run smbpasswd -a calvin, and use the same password that winhost\calvin uses. Then I would update smb.conf to something like

[myshare]
path = /home/lincoln/myshare
valid users = lincoln, calvin
read only = no

Once this is in place, calvin can now see the share from Windows via UNC path \\<ip addr>\myshare

This works fine for named user accounts, but I can't figure out how to grant access to a Windows "local system" account, i.e. a machine account.

I have tried creating SMB users with names like WINHOST and WINHOST$ with a blank password (local system accounts don't have passwords), but this doesn't seem to work.

When I try to access the share using the system account (via dir \\<ip addr>\myshare) I get the error "The specified server cannot perform the requested operation".

What are the details of the SMB account and config that can make this happen?

I do not want to make the share public - this seems to be the only workaround I can find so far.

已采纳解答

原帖链接 · shodanshok · CC BY-SA 3.0

When not using a domain, the LocalSystem account can access network resources only with anonymous credential. In other words, it will not present named credential to the remote samba server.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2016-07-15)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。