阅读更多
在windows 的 ‘运行’ 里 输入 \\192.168.1.**
提示没权限访问
原因是登录后会记住当前登陆的帐号密码,这样第二次接着登录就不用输了,
solution1
要把windows 里的 samba 帐号和密码删除,如下:
点击“开始”菜单->运行->输入 “control userpasswords2”-弹出“用户帐户”对话框,再切换到“高级”选项卡->点击"管理密码"->就可以看到网络设置记录的密码都保存在这个弹出来的"存储用户名和密码"的对话框里 ->最后选择想要删除的记录点“删除”->再注销/重启电脑就能生效了。
solution2
在windows 终端 输入 net use * /del
再登录就可以了
ps: samba 的配置如下
[global]
security = user # 不是所有人都可以随便读写
[release]
comment = Share
browseable = yes
path = /imedata/release
available = yes
public = yes
writable = yes
#valid users = @imedev,imebuild
write list = @imedev,imebuild
guest ok = yes
[ImeCustom]
comment = tes
browseable = yes
path = /imedata/ImeCustom
available = yes
#read only = yes
create mask = 0775
public = no
writable = no
valid users = @imedev
write list = imedev # 次用户才能写
guest ok = no #需要输入帐号密码验证
[homes]
comment = home director
guest ok = no
browseable = no
---------------------------设置密码------------------
pdbedit -a -u imeadmin2
---------------------测试---------------------
$ smbclient -L //127.0.0.1 -U imeadmin2
Enter imeadmin2's password:
Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.6.3]
Sharename Type Comment
--------- ---- -------
print$ Disk Printer Drivers
IPC$ IPC IPC Service (imeadmin2 server (Samba, Ubuntu))
imeadmin2 Disk home director
Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.6.3]
Server Comment
--------- -------
IMEADMIN2 imeadmin2 server (Samba, Ubuntu)
IMEDEV3 imedev3 server (Samba, Ubuntu)
Workgroup Master
--------- -------
WORKGROUP IMEDEV3
--------------------------ok-------------------------------------
usermod -a -G groupA user #把 user 添加进 groupA 组 (一定要加 -a 不然 user 就只是groupA组了)
-----------------------------
#sudo pdbedit -a -u sambuser # 增加 samba 用户 并设置密码
----------------------------------
sudo service smbd restart
------------------------------------------------------------------------****************________________________
ubuntu 14.04.3 装了samba 没用,不能读写,新建文件或文件夹 提示 abort ,总之各种行不通,试过编译安装也不成功,deb包安装也提示依赖没装。最后,在google之后 ,某大神的一个命令就解决了。就是下面这个 ,; 有问题的版本为 :samba --version == Version 4.3.9-Ubuntu (Version 4.1.6-Ubuntu 没问题)
原因:In a security update (19 april 2016) a dependency has been forgotten. You have to update library libtalloc2 with apt-get install libtalloc2
原来是 更新时 忘了一个依赖库 ,就是 libtalloc2 ,装上这个就ok了
sudo apt-get install libtalloc2
ps :还有一个方法没试过(
The problem is that the new version of samba has a mind blowing bug, so every one that has a similar problem use following command to downgrade their samba:
sudo apt-get install samba=2:4.1.6+dfsg-1ubuntu2 samba-common=2:4.1.6+dfsg-1ubuntu2 samba-libs=2:4.1.6+dfsg-1ubuntu2 samba-common-bin=2:4.1.6+dfsg-1ubuntu2 samba-dsdb-modules=2:4.1.6+dfsg-1ubuntu2 python-samba=2:4.1.6+dfsg-1ubuntu2 libldb1=1:1.1.16-1 python-ldb=1:1.1.16-1
)
--------------windows10 访问samba 输入pin码