域用户访问samba共享享文件为什么链接时断时续

驱动开发(22)
//----------------------------------------------------------------------------------------------------------------
sudo apt-get install samba
遇到依赖关系,下面2个版本冲突
samba-common
libwbclient0
//----------------------------------------------------------------------------------------------------------------
xcz@xcz-OptiPlex-3020:~/Desktop$&
xcz@xcz-OptiPlex-3020:~/Desktop$ sudo apt-get remove samba
Reading package lists... Done
Building dependency tree & & &&
Reading state information... Done
Package samba is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
//----------------------------------------------------------------------------------------------------------------
xcz@xcz-OptiPlex-3020:~/Desktop$&
xcz@xcz-OptiPlex-3020:~/Desktop$ sudo apt-get remove libwbclient0
Reading package lists... Done
Building dependency tree & & &&
Reading state information... Done
The following packages were automatically installed and are no longer required:
& apturl-common apturl
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
& gvfs-backends libsmbclient libwbclient0 nautilus-share python-smbc
& samba-common-bin smbclient system-config-printer-common
& system-config-printer-gnome ubuntu-desktop
0 upgraded, 0 newly installed, 10 to remove and 0 not upgraded.
After this operation, 72.5 MB disk space will be freed.
Do you want to continue [Y/n]?&
//----------------------------------------------------------------------------------------------------------------
xcz@xcz-OptiPlex-3020:~/Desktop$&
xcz@xcz-OptiPlex-3020:~/Desktop$ sudo apt-get remove samba-common
Reading package lists... Done
Building dependency tree & & &&
Reading state information... Done
The following packages were automatically installed and are no longer required:
& libtalloc2 python-cupshelpers libcdio-paranoia1 python-gnomekeyring
& apturl-common avahi-utils system-config-printer-udev apturl libcdio-cdda1
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
& samba-common
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 682 kB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 162670 files and directories currently installed.)
Removing samba-common ...
xcz@xcz-OptiPlex-3020:~/Desktop$&
xcz@xcz-OptiPlex-3020:~/Desktop$&
xcz@xcz-OptiPlex-3020:~/Desktop$&
//----------------------------------------------------------------------------------------------------------------
xcz@xcz-OptiPlex-3020:~/Desktop$&
xcz@xcz-OptiPlex-3020:~/Desktop$ sudo apt-get install samba samba-common system-config-samba winbind&
Reading package lists... Done
Building dependency tree & & &&
Reading state information... Done
The following packages were automatically installed and are no longer required:
& python-cupshelpers libcdio-paranoia1 python-gnomekeyring apturl-common
& avahi-utils system-config-printer-udev apturl libcdio-cdda1
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
& libpam-winbind libuser1 libwbclient0 python-central python-libuser
& samba-common-bin tdb-tools
Suggested packages:
& openbsd-inetd inet-superserver smbldap-tools ldb-tools ctdb
The following NEW packages will be installed:
& libpam-winbind libuser1 libwbclient0 python-central python-libuser samba
& samba-common samba-common-bin system-config-samba tdb-tools winbind
0 upgraded, 11 newly installed, 0 to remove and 0 not upgraded.
Need to get 25.2 MB of archives.
After this operation, 62.8 MB of addi
//----------------------------------------------------------------------------------------------------------------
smb://xxx.xx.x.XXX/ 访问不了
并且ubuntu-desktop被卸掉了,现在再恢复回去
//----------------------------------------------------------------------------------------------------------------
The following packages will be REMOVED:
& gvfs-backends libsmbclient libwbclient0 nautilus-share python-smbc
& samba-common-bin smbclient system-config-printer-common
& system-config-printer-gnome ubuntu-desktop
0 upgraded, 0 newly installed, 10 to remove and 0 not upgraded.
The following NEW packages will be installed:
& libpam-winbind--- libuser1 libwbclient0 python-central python-libuser samba---
& samba-common---- samba-common-bin--- system-config-samba----- tdb-tools winbind-----
0 upgraded, 11 newly installed, 0 to remove and 0 not upgraded.
//------------------------------------------------------------------------------------remove
把安装的都卸掉(截的片段,仅参考)
The following NEW packages will be installed:
& &libuser1 libwbclient0 python-central python-libuser
& & tdb-tools
0 upgraded, 11 newly installed, 0 to remove and 0 not upgraded.
//-------------------------------------------1
xcz@xcz-OptiPlex-3020:~/Desktop$ sudo apt-get remove samba samba-common system-config-samba winbind&
Reading package lists... Done
Building dependency tree & & &&
Reading state information... Done
The following packages were automatically installed and are no longer required:
& libtalloc2 python-cupshelpers libcdio-paranoia1 libwbclient0 python-central
& python-gnomekeyring apturl-common tdb-tools avahi-utils
& system-config-printer-udev libuser1 apturl libcdio-cdda1 python-libuser
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
& libpam-winbind samba samba-common samba-common-bin system-config-samba
0 upgraded, 0 newly installed, 6 to remove and 0 not upgraded.
After this operation, 61.9 MB disk space will be freed.
Do you want to continue [Y/n]?&
//----------------------------------------2
The following packages were automatically installed and are no longer required:
& libtalloc2 python-cupshelpers libcdio-paranoia1 python-gnomekeyring
& apturl-common avahi-utils system-config-printer-udev apturl libcdio-cdda1
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
& libuser1 libwbclient0 python-central python-libuser tdb-tools
0 upgraded, 0 newly installed, 5 to remove and 0 not upgraded.
After this operation, 903 kB disk space will be freed.
Do you want to continue [Y/n]?&
//---------------------------------------------------------------------remove --end
//----------------------------------------------------------------------------------------------------------------
下面再把原来remove掉的装回来(截的片段,仅参考)
The following packages will be REMOVED:
& gvfs-backends libsmbclient libwbclient0 nautilus-share python-smbc
& samba-common-bin smbclient system-config-printer-common
& system-config-printer-gnome ubuntu-desktop
0 upgraded, 0 newly installed, 10 to remove and 0 not upgraded.
The following packages will be REMOVED:
& gvfs-backends libsmbclient----- libwbclient0---- nautilus-share--- python-smbc---
& samba-common-bin--- smbclient--- system-config-printer-common-----
& system-config-printer-gnome---- ubuntu-desktop----
0 upgraded, 0 newly installed, 10 to remove and 0 not upgraded.
sudo apt-get install libwbclient0
The following NEW packages will be installed:
& nautilus-share samba-common samba-common-bin
The following NEW packages will be installed:
& python-smbc system-config-printer-common
The following extra packages will be installed:
& linux-headers-3.2.0-23 linux-headers-3.2.0-23-generic linux-headers-generic
The following NEW packages will be installed:
& linux-headers-3.2.0-23 linux-headers-3.2.0-23-generic linux-headers-generic
& ubuntu-desktop
0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Need to get 12.4 MB of archives.
sudo apt-get install gvfs-backends
The following packages have unmet dependencies:
&gvfs-backends : Depends: gvfs (= 1.12.1-0ubuntu1) but 1.12.1-0ubuntu1.2 is to be installed
& & & & & & & & &Depends: gvfs-daemons (= 1.12.1-0ubuntu1)
& & & & & & & & &Depends: gvfs-libs (= 1.12.1-0ubuntu1) but 1.12.1-0ubuntu1.2 is to be installed
& & & & & & & & &Depends: gvfs-common (= 1.12.1-0ubuntu1) but 1.12.1-0ubuntu1.2 is to be installed
E: Unable to correct problems, you have held broken packages.
xcz@xcz-OptiPlex-3020:~$&
xcz@xcz-OptiPlex-3020:~$ sudo aptitude install gvfs-backends
The following NEW packages will be installed:
& gvfs-backends{b}&
0 packages upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 1,012 kB of archives. After unpacking 2,877 kB will be used.
The following packages have unmet dependencies:
&gvfs-backends : Depends: gvfs (= 1.12.1-0ubuntu1) but 1.12.1-0ubuntu1.2 is installed.
& & & & & & & & &Depends: gvfs-daemons (= 1.12.1-0ubuntu1) but 1.12.1-0ubuntu1.2 is installed.
& & & & & & & & &Depends: gvfs-libs (= 1.12.1-0ubuntu1) but 1.12.1-0ubuntu1.2 is installed.
& & & & & & & & &Depends: gvfs-common (= 1.12.1-0ubuntu1) but 1.12.1-0ubuntu1.2 is installed.
The following actions will resolve these dependencies:
& & &Remove the following packages: & & & & & & & & & & &&
1) & & unity-launcher-folders & & & & & & & & & & & & & &&
& & &Keep the following packages at their current version:
2) & & gvfs-backends [Not Installed] & & & & & & & & & & &
Accept this solution? [Y/n/q/?]&
choose Y and remove unity-launcher-folders ==&Unity 橱窗 这个软件本来就是ubuntu-1404上的,有依赖问题,后来一直没删
sudo aptitude install gvfs-backends
& & &Keep the following packages at their current version:
2) & & gvfs-backends [Not Installed] &
Accept this solution? [Y/n/q/?]&
choose N and then choose Y to upgrade the version of depends packages
//----------------------------------------------------------------------------------------------------------------
sudo apt-get install samba
//----------------------------------------------------------------------------------------------------------------
要共享的文件夹--&右击--&Proprerties--&Share
--&勾选下面三个选项
(1)Share this folder
(2)Allow others to create and delete ...
(3)Guest access
//----------------------------------------------------------------------------------------------------------------
ok,别人可以访问你的共享文件夹了
参考知识库
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:5805次
排名:千里之外
原创:17篇
(1)(4)(1)(1)(4)(1)(2)(9)查看: 3005|回复: 5
samba不能访问共享文件 求解~~
QQ截图21.jpg (128.18 KB, 下载次数: 0)
00:34 上传
QQ截图08.jpg (98.93 KB, 下载次数: 0)
00:34 上传
电脑进入 找不到地址&&手机能看到 但是一点就要密码 我输入路由的密码可惜也登陆不了 明明开启了匿名登录 为何不能看到共享文件~~ 求解
不明白。。
[XML] 纯文本查看 / 双击代码区域 Ctrl+A快速复制invalid users = root这个前面加上注释
这个前面加上注释
依然无法连接·~~~&&实在前面加#号吧~~
RE: samba不能访问共享文件 求解~~
依然无法连接·~~~&&实在前面加#号吧~~
那就不清楚了。。
那就不清楚了。。
手机倒是能看到 但是每次登陆都要密码 输入又链接失败~~ 不输入 也是链接失败~~
Copyright & KaFan & All Rights Reserved.
Powered by Discuz! X3.1( 苏ICP备号 ) GMT+8,1,必备知识。已经知道的请跳过。
首先科普一下这两个东西:samba和chmod其实是完全不同层面的东西,一个是共享服务协议,一个是权限设置语句。但是他们有一个共同的用途:可以用来实现设置一个共享文件夹的访问权限。
Samba是用来实现SMB的一种软件,咱们在这里在了解一下SMB(Server MessageBlock,服务信息块)。SMB协议可以看作是局域网上的共享文件/打印机的一种协议,它可以为网络内部的其它Windows和Linux机器提供文件系统、打印服务或是其他一些信息。
可以使用命令chmod来为文件或目录赋予权限。Linux/Unix 的权限分为三级 : 档案拥有者、群组、其他。利用 chmod 可以藉以控制档案如何被他人所存取。
abc权限设置:
其中a,b,c各为一个数字,分别表示User、Group、及Other的权限。
r=4,w=2,x=1
若要rwx属性则4+2+1=7;
若要rw-属性则4+2=6;
若要r-x属性则4+1=5。
2,使用方法。
Samba设置一个文件夹的权限步骤:
(1)编辑samba配置文件:sudo vi /home/etc/samba/smb.conf
内容如下:
[共享文件夹名]
Path=/home/…/文件夹名
Valid user=用户名1,用户名2,用户名3…
Create mask=0777(此处权限设定依具体情况而定)
(2)重启samba使之生效:sudo smbd restart&
chmod更改一个文件夹的权限步骤:
格式:chmod [-cfvR] [--help] [--version] abc /home/…/文件夹名
3,比较实验。
那么这两个家伙谁的权力大,谁的级别高呢,我做了如下一系列的实验:
创建一个文件夹,修改smb.conf设置其为共享文件夹。此时,同时修改chmod和valid user来进行比较。
(1)chmod abc&770 (如771,772,773,775,776,777) ;& valid user= user name A&&&&& =&& A有读,写,执行权限
(2)chmod abc&760 ; valid user= user name A&& =&& A的权限完全受制于chmod abc,与samba设置无关
(3)chmod abc&770 (如771,772,773,775,776,777) ;& valid user内不包含&user name A (A为group user或者owner) & & =&& A无读,写,执行权限
(4)chmod abc&760& ;& valid user内无 user name A & &(A为group user或者owner)&&=&& A无读,写,执行权限
chmod和samba在近端和远端共同控制着一个文件夹的访问权限,相当于一条路的两道关卡,要想通过,缺一不可。chmod是本地控制,对各级用户使用权限具有本地决定权;samba是网端控制,在开放chmod权限的前提下(通常是至少770),才能使用samba进一步设置特定用户权限,具有网端决定权。
5,特殊说明。
(1)若所共享的文件夹处于某一用户目录下,则对于该目录访问权限,该用户仅受本地chmod abc控制,samba对于设置无效。若将文件夹置于root目录下,则不存在这个问题。
(2)samba中的valid user对文件夹的owner,group user ,other具有同等的权限赋予能力。
阅读(...) 评论()

我要回帖

更多关于 windows无法访问samba 的文章

 

随机推荐