Setup the client
Last updated
Was this helpful?
Last updated
Was this helpful?
After setting up the server (see the dedicated file), I almost did all the job. Indeed, with a little bit of work, I was able to connect to the samba server with both of my client.
In order to map the raspberry with the windows system, you have to associated a letter (E: for example) to the share folder.
You can accomplished that with a WYSIWYG explorer interface : 1. Open a file explorer window. 2. On the left panel, click on the root folder named "This PC". 3. In the top view, click on the Computer tab 4. Click on the Map network drive icon. 5. Select the letter you want to use for the share space and give the link to it (something like \\\192.168.X.X\share
) 6. Then, you should be prompt to enter your credentials in order to connect to that space. 7. You're done ! You just need to click on the icon that correspond to this share space, connect with your credential every time you need to
What I did on Windows did not fit with my current workflow in Ubuntu. Unlike Windows, I did not open often the explorer window. So I did not wanted a solution that rely heavily on user interface.
I decided to use the same previous technique I did on the server with fstab to automatically mount the shared folder.
It works perfectly! But I had a small issue : The connexion was not launched at boottime si I had to run manually mount -a
every time. But, as pointed in this , if you use a wifi connection, fstab will not be able to load because the user didn't log in yet. So a solution will be to use autofs.
autofs control the deamon in charge of automount in the system. Note: All the information below come from this website. But sadly for most of you, it's in the language of Molière (french).
Install autofs and also cifs-utils in my case (because I'm using samba for my window client)
Run the following command to modify the file /etc/auto.master
and add the following line :
Create /etc/auto.<type>
and rule for each share file :
As usual when you make changes, run the command :
[X] Make sure the in the /etc/auto.master
needs to exist.
[X] In the file /etc/auto.<type>
, the need to not exist.
It will be created automatically when the shared folder is loaded.
[X] NasName needs to be replaced by the server ip adress since Windows do not resolve server name automatically. Don't forget the :
character.
[X] uid=1000 corresponds to your linux uid on the client.
[X] gid=100 corresponds of the users
group in linux.
[X] Connect to server by hostname (instead of IP adresses)
I'm currently using the IP adress of the server to connect to it. Is there any way i can use the hostname name directly ?
See the links below for more information on that.
[X] Permission denied
I have an error when running mount -a
: error 13 = Permission denied
. What is going on ?
[X] Error failed to push some refs to
When I try to push I get the following log with error: remote unpack failed: unable to create temporary object directory
.
If you try to push and still get an error that contains the above message, it probably means you do not have access (write) to the mounted devices. To fix this, you need to change the permissions on the files you want to write to (by using chmod
for example). An alternative could be to use sudo [your command]
and see if it works. It that's a permission issue, the sudo command should work.
You can use package that will take care of mapping the server IP with his hostname and propagate this info to a daemon which will configures unicast DNS servers.
This can come from many reason. You might want to take a look at the following step: