如何在Samba机器上使用本地帐户

我有一个运行samba的Linux系统,它具有到Windows 7 PC的以太网连接。 经过阅读和尝试了很多,我得到了以下configuration:

[myShare] path = /usr/share/mySystemUser/ public = yes guest ok = yes writeable = yes browseable = yes ntlm auth = no 

我只是希望myShare可以被访问

  1. 没有任何密码(公共份额)
  2. mySystemUser的凭据。 mySystemUser是linux机器上的本地用户。

但是到目前为止Windows需要一个密码,因此myShare只能在我运行的时候被访问

 useradd myWindowsUserName smbpasswd -a myWindowsUsername 

在Windows机器上input相同的密码,以便在具有相同密码的linux和Windows7机器上同时存在相同的用户名。

1.和2.如何解决?

我正在使用这个configuration

 [public] comment = Public Folder path = /home/public public = yes writable = yes create mask = 0777 directory mask = 0777 force user = nobody force group = nogroup 

并在mySystemUser = myWindowsUserName的情况下

 [mySystemUser] path = /usr/share/mySystemUser/ browseable = no writeable = yes create mode = 0770 directory mode = 0770 read only = no valid users = mySystemUser force user = mySystemUser 

如果您想在Windows资源pipe理器中看到您的共享文件夹,请将browseable设置为yes。