网络文件夹设置问题

我觉得我正在努力做一些应该简单的事情。

我需要让我的扫描仪(hp color laserjet pro m477fdw,一体机)访问我的ubuntu机器上的共享文件夹。

设置在打印机本身上,通过在浏览器中输入ip-adress来访问菜单,就像访问路由器/调制解调器一样。

所有打印机需要知道的是正确(完整)路径和用户名和密码,以便它可以通过我的电脑上的网络保存文件。

为了简单起见我分享了文件夹,虽然我不完全确定这是必要的。

如果正确完成,扫描仪会测试并保存设置,但是我无法进行测试。

因此,不需要通过PC本身进行xsane或简单扫描。 因为所有命令都是直接从扫描仪本身给出的。

当这工作时,我想创建一个类似的访问我的Linux基于asustor-nas的共享文件夹,但现在我的Ubuntu机器优先!

笔记本电脑的本地IP是:192.168.0.204
扫描仪/打印机的本地IP是:192.168.0.101共享文件夹的位置是:扫描文件夹Documents

设置直接在扫描仪本身(不是通过hplip)完成,所以通过它的本地IP(192.168.0.101)访问它

输入参数后,它通过测试检查连接并保存。 只给出答复:

测试没有成功。 再试一次。

所以信息量不大。

als我不完全确定使用哪个斜杠\或/,总是认为\是for winsdows和/ for linux。 但由于smb与windows相关,我感到困惑,但这是必不可少的。

哦,我让nautilus使用共享文件夹的标准设置。

我现在必须添加,我从头开始重新安装ubuntu 17.10! 在Documents中放置一个具有相同名称的文件夹并创建一个共享。 但是设置这个我得到了一个错误信息。

找不到libpam-smbpass。!

当我第一次这样做时,我不记得收到通知了,但我对此并不完全确定。

所以我试图从synaptic安装它,但遇到了synaptic的wayland会话bug。 所以注销并运行x11。

试图安装..但实际安装没什么。

然后我跑了

sudo apt-get remove --purge samba sudo apt-get install samba sudo apt-get remove --purge smbclient libsmbclient sudo apt-get install smbclient libsmbclient 

没有警告/错误。

哦,我还试图通过以下方式在终端中找到完整路径名称:

 # pwd /home/matt/Documents/Scanned 

(复制粘贴所以没有类型-0)

我在这3个链接中进行了最后几次尝试:
– //192.168.0.204/home/matt/Documents/Scanned
– //192.168.0.204/home/Documents/Scanned
– //192.168.0.204/home/Scanned

我假设它正在使用smb协议,但我不确定这个..(我读到它在Windows机器上的某个地方)

无论如何,我已经尝试了所有可能的路径实例,每侧都被削减,但我似乎无法让它实际通过测试并保存。

我个人认为解决的前两个步骤是检查libpam-smbpass是否仍有问题,并确定/或\应该面对哪个方向。

感谢您的帮助,请根据需要提供尽可能多的信息

马特:)

添加:

 # touch /home/matt/Documents/Scanned/testing123 

它在文件夹中创建了一个名为testing123的空文档。

**不要沉迷于libpam-smbpass或任何其他pam,因为它们不是问题。

**你说你创造了通过鹦鹉螺扫描的份额。 您可以通过查看此命令的输出来validation是否成功:

 net usershare info --long 

**所有这些都是不正确的:

我在这三个链接中进行了最后几次尝试: – //192.168.0.101/home/matt/Documents/Scanned – //192.168.0.101/home/Documents/Scanned – //192.168.0.101/home/Scanned

它的forms是// server / share,所以在这种情况下它是:

 //192.168.0.101/Scanned 

\\192.168.0.101\Scanned

服务器上允许您进行扫描的内部路径在共享定义中定义,您将在上面运行usershare命令时看到该路径。

您可以在自己的机器上自己尝试。 打开终端并运行:

 nautilus smb://192.168.0.101/Scanned 

你看到你通过触摸添加的testing123文件了吗?

编辑 :如果您共享需要凭据,请记住将自己添加到samba密码数据库:

sudo smbpasswd -a matt

由于出于安全原因, libpam-smbpass包在很久以前被删除了。

 pam_smbpass: REMOVE this PAM module This pam module causes GPLv3, thread-unsafe Samba code to be directly loaded into the address space of many system services. The code in question was not expected to run in this context, and while using the Samba, rather than the system password file is a admirable goal, this needs to be done over inter-process communication, such as is done by pam_winbind. pam_winbind is not a total replacement, as the migrate functionality used to keep the Samba password up to date with the system password is not present, but otherwise can provide essentially the same services. Andrew Bartlett 

已经就此问题提交了已确认的错误报告 ,您可能希望订阅该报告。

似乎使用pam_winbind代替了安全的解决方法。 有关详细信息,请参阅此处和此处。

编辑:

  When a PAM aware privilege granting application is started, it activates its attachment to the PAM-API. This activation performs a number of tasks, the most important being the reading of the configuration file(s): /etc/pam.conf. Alternatively, this may be the contents of the /etc/pam.d/ directory. The presence of this directory will cause Linux-PAM to ignore /etc/pam.conf. me@zippy-64bit:~$ cat /etc/pam.conf # ---------------------------------------------------------------------------# # /etc/pam.conf # # ---------------------------------------------------------------------------# # # NOTE # ---- # # NOTE: Most program use a file under the /etc/pam.d/ directory to setup their # PAM service modules. This file is used only if that directory does not exist. # ---------------------------------------------------------------------------# # Format: # serv. module ctrl module [path] ...[args..] # # name type flag 

在我看来,在Ubuntu中,授权设置在/etc/pam.d/common-account中设置从pam 1.0.1-6开始,此文件默认由pam-auth-update管理。 有关pam-auth-update更多信息,请参见手册页

资料来源:

https://packages.ubuntu.com/search?suite=all&arch=any&searchon=names&keywords=libpam-smbpass

https://lists.samba.org/archive/samba-cvs/2015-October/111473.html

https://www.samba.org/samba/docs/current/man-html/pam_winbind.8.html

https://www.samba.org/samba/docs/old/Samba3-HOWTO/pam.html

http://manpages.ubuntu.com/manpages/trusty/man5/pam.conf.5.html