Network folder setup problem
i feel like i'm struggling massively with something that should be simple.
I need to give my scanner (hp color laserjet pro m477fdw, all-in-one machine) access to a shared folder on my ubuntu machine.
The settings are on the printer itself and the menu is accessed by entering it's ip-adress in my browser like one would access a router/modem.
All the printer needs to know is the correct (complete) pathway and username and password so it can save the documents over the network on my pc.
To make it simple i shared the folder, although i'm not entirely certain that that is neccessairy.
The scanner does test and save the settings if done correctly, but sofar i haven't been able to.
So for this there is no need for xsane or simple scan via the pc itself. as all the command are given directly from the scanner itself.
When this works i would like to create a similar access to a shared folder on my linux based asustor-nas but for now my Ubuntu machine has priority!
local ip of the laptop is: 192.168.0.204
local ip of the scanner/printer is :192.168.0.101
location of the shared folder is: Scanned in the folder Documents
the setup in done directly in the scanner itself (not via hplip) so by accessing it through it's local ip (192.168.0.101)
after entering the parameters it checks the connection via test and save. which only gives the reply:
The test was unsuccessful. Try again.
so not very informative.
als i'm not entirely sure which slash to use \ or /, always thought \ was for winsdows and / for linux. but since smb is windows related i'm getting confused, but it is essential.
oh and I let nautilus use the standard settings for the shared folder.
i must add now that i reinstalled ubuntu 17.10 from scratch! placed a folder with the same name in Documents and created a share. but wile setting this up i got a error msg.
could not find libpam-smbpass.!
i can't recall getting that notification when i did it the first time, but am not entirely sure about this.
so i tried to install this from synaptic, but ran into the wayland session bug for synaptic. so logged off and ran x11.
tried to install.. but was nothing to actually install.
then i ran
sudo apt-get remove --purge samba
sudo apt-get install samba
sudo apt-get remove --purge smbclient libsmbclient
sudo apt-get install smbclient libsmbclientand got no warnings / errors.
oh i also tried to find the full path name in the terminal by:
# pwd
/home/matt/Documents/Scanned(copy pasted so no type-0)
last few attempts i focessed in these 3 links:
- //192.168.0.204/home/matt/Documents/Scanned
- //192.168.0.204/home/Documents/Scanned
- //192.168.0.204/home/Scanned
i assume it's using smb protocol, but am not sure of this.. (i read somewhere that it does on windows machines)
anyway i have tried all possible instances of the path with slashed to each side but i can't seem to get it to actually pass the test and save.
personally i believe the first two steps to solve is to check is there is still an issue with libpam-smbpass or not and also become sure which direction the / or \ should face.
thanks for any help, and please ask for as much info as needed
Matt :)
added:
# touch /home/matt/Documents/Scanned/testing123it created an empty document named testing123 in the folder.
82 Answers
** Don't be obsessed with libpam-smbpass or any of the other pam's they are a non issue.
** You say you created the share of Scanned through nautilus. You can verify if that was successful by looking at the output of this command:
net usershare info --long** All of these are incorrect:
last few attempts i focessed in these 3 links: - //192.168.0.101/home/matt/Documents/Scanned - //192.168.0.101/home/Documents/Scanned - //192.168.0.101/home/Scanned
It's form is //server/share so in this case it's:
//192.168.0.101/ScannedOr \\192.168.0.101\Scanned
The internal path on the server that gets you to Scanned is defined in the share definition which you will see when you run the usershare command above .
You can try this yourself on your own machine. Open a terminal and run:
nautilus smb://192.168.0.101/ScannedDo you see the testing123 file you added with touch?
EDIT: If you share requires credentials remember to add yourself to the samba password database:
15sudo smbpasswd -a matt
The package libpam-smbpass was removed upstream quite some time ago for what appears to be security reasons.
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 BartlettA confirmed bug report has been filed regarding this issue which you may wish to subscribe to.
It appears that utilizing pam_winbind instead is the secure workaround. For more on that see here and here.
Edit:
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 It looks to me like in Ubuntu the authorization settings are set in /etc/pam.d/common-account As of pam 1.0.1-6, this file is managed by pam-auth-update by default. for more information on pam-auth-update see the man page
Sources:
6