[SOLVED] Mounting a share. Could not resolve address

Questions about Wi-Fi and other network devices, file sharing, firewalls, connection sharing etc
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
bigal
Level 5
Level 5
Posts: 512
Joined: Mon Aug 03, 2009 3:26 am
Location: Pembrokeshire, South West Wales

[SOLVED] Mounting a share. Could not resolve address

Post by bigal »

Here we go again.

Two machines, both running 20.1 Cinnamon both fully updated.

I am trying to manually mount a shared folder on the second machine so entered this:

Code: Select all

sudo mount -t cifs //netclient015/015data /home/alan/015data -o uid=1000,gid=1000,credentials=/home/alan/.smbcredentials
I got this error

Code: Select all

mount error: could not resolve address for netclient015: Unknown error
Just to be sure I checked the netbios name and got

Code: Select all

$ nmblookup -A 192.168.0.15
Looking up status of 192.168.0.15 NETCLIENT015    <00> -         B <ACTIVE> 
So if the netbios name is correct what else is wrong. I am beginning to think that I am old and stupid. (The local folder does exist although the command doesn't get that far.)
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Lots of Minty machines but there again I like lamb and I do live in Wales!
altair4
Level 20
Level 20
Posts: 11458
Joined: Tue Feb 03, 2009 10:27 am

Re: Mounting a share. Could not resolve address

Post by altair4 »

If you want to be able to address another Linux ( or MacOS or Windows 10 ) machine reliably use it's mDNS host name ( netclient015.local ) since NetBIOS is effectively disabled today. So your line would read:

Code: Select all

sudo mount -t cifs //netclient015.local/015data /home/alan/015data -o uid=1000,gid=1000,credentials=/home/alan/.smbcredentials
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
bigal
Level 5
Level 5
Posts: 512
Joined: Mon Aug 03, 2009 3:26 am
Location: Pembrokeshire, South West Wales

Re: Mounting a share. Could not resolve address

Post by bigal »

Thank you for that altair4. Following your suggestion worked for me but only so far. I had to amend the share to give guest access. Then it worked. That done I found that any new folders or files on the share were owned by nobody in the nobody group. I tried altering the username and password in the .smbcredentials files to that on the remote machine thinking that might be the source of the problem but obviously it is not. It was a bit of a long shot. Can you help again please?

Once I get the manual mount sorted my plan is to add it to my fstab file but one thing at a a time.
Lots of Minty machines but there again I like lamb and I do live in Wales!
altair4
Level 20
Level 20
Posts: 11458
Joined: Tue Feb 03, 2009 10:27 am

Re: Mounting a share. Could not resolve address

Post by altair4 »

It would be best if you were to post the output of the following commands from the server:

Code: Select all

testparm -s

Code: Select all

net usershare info --long
That way any response would be tailored to your setup.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
bigal
Level 5
Level 5
Posts: 512
Joined: Mon Aug 03, 2009 3:26 am
Location: Pembrokeshire, South West Wales

Re: Mounting a share. Could not resolve address

Post by bigal »

Code: Select all

$ testparm -s
Load smb config files from /etc/samba/smb.conf
Loaded services file OK.
Server role: ROLE_STANDALONE

# Global parameters
[global]
	client max protocol = NT1
	log file = /var/log/samba/log.%m
	logging = file
	map to guest = Bad User
	max log size = 1000
	obey pam restrictions = Yes
	pam password change = Yes
	panic action = /usr/share/samba/panic-action %d
	passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
	passwd program = /usr/bin/passwd %u
	server role = standalone server
	server string = %h server (Samba, Ubuntu)
	unix password sync = Yes
	usershare allow guests = Yes
	idmap config * : backend = tdb
	force user = alan


[printers]
	browseable = No
	comment = All Printers
	create mask = 0700
	path = /var/spool/samba
	printable = Yes


[print$]
	comment = Printer Drivers
	path = /var/lib/samba/printers

Code: Select all

$ net usershare info --long
No output whatsoever.
Lots of Minty machines but there again I like lamb and I do live in Wales!
altair4
Level 20
Level 20
Posts: 11458
Joined: Tue Feb 03, 2009 10:27 am

Re: Mounting a share. Could not resolve address

Post by altair4 »

You have no shares defined. Is that output from the client or the server?
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
bigal
Level 5
Level 5
Posts: 512
Joined: Mon Aug 03, 2009 3:26 am
Location: Pembrokeshire, South West Wales

Re: Mounting a share. Could not resolve address

Post by bigal »

That is the output from the client.
Sorry I should have said. Here is the output from the 'server' machine.

Code: Select all

$ testparm -s
Load smb config files from /etc/samba/smb.conf
Loaded services file OK.
Server role: ROLE_STANDALONE

# Global parameters
[global]
	log file = /var/log/samba/log.%m
	logging = file
	map to guest = Bad User
	max log size = 1000
	obey pam restrictions = Yes
	pam password change = Yes
	panic action = /usr/share/samba/panic-action %d
	passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
	passwd program = /usr/bin/passwd %u
	server role = standalone server
	server string = %h server (Samba, Ubuntu)
	unix password sync = Yes
	usershare allow guests = Yes
	idmap config * : backend = tdb
	force user = alan


[printers]
	browseable = No
	comment = All Printers
	create mask = 0700
	path = /var/spool/samba
	printable = Yes


[print$]
	comment = Printer Drivers
	path = /var/lib/samba/printers

Code: Select all

$ net usershare info --long
[015data]
path=/home/alan/015data
comment=From 2021-04-03
usershare_acl=Everyone:F,
guest_ok=n
Lots of Minty machines but there again I like lamb and I do live in Wales!
altair4
Level 20
Level 20
Posts: 11458
Joined: Tue Feb 03, 2009 10:27 am

Re: Mounting a share. Could not resolve address

Post by altair4 »

It looks like your server is set up correctly.

You included the force user = alan in your [global] section so all new files added would be saved with owner = "alan".

I see no issue with this.

Your share is designed for credentialed user so you would have to set a samba password for that user even if the remote user was "alan" - so on the server:

Code: Select all

sudo smbpasswd -a alan
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
bigal
Level 5
Level 5
Posts: 512
Joined: Mon Aug 03, 2009 3:26 am
Location: Pembrokeshire, South West Wales

Re: Mounting a share. Could not resolve address

Post by bigal »

I set the smbpasswd on the server machine to be the same as its logon password. That didn't work so I tried using the login password for the client machine. That didn't work either. Both times I got
$ sudo mount -t cifs //netclient015.local/015data /home/alan/015data -o uid=1000,gid=1000,credentials=/home/alan/.smbcredentials
mount error(13): Permission denied
I'm sorry but I am way out of my depth here.
Lots of Minty machines but there again I like lamb and I do live in Wales!
altair4
Level 20
Level 20
Posts: 11458
Joined: Tue Feb 03, 2009 10:27 am

Re: Mounting a share. Could not resolve address

Post by altair4 »

Go back to the server. Change your share definition to allow guest access with write access.

On the client access that share this way:

Code: Select all

sudo mount -t cifs //netclient015.local/015data /home/alan/015data -o guest,uid=1000,gid=1000
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
bigal
Level 5
Level 5
Posts: 512
Joined: Mon Aug 03, 2009 3:26 am
Location: Pembrokeshire, South West Wales

Re: Mounting a share. Could not resolve address

Post by bigal »

Wahoo!!!!! That worked. I have read and write access to the share. Do I leave it at that or is there some further change before I try to set it up in fstab?
Lots of Minty machines but there again I like lamb and I do live in Wales!
altair4
Level 20
Level 20
Posts: 11458
Joined: Tue Feb 03, 2009 10:27 am

Re: Mounting a share. Could not resolve address

Post by altair4 »

I would recommend the following approach to fstab. Set it up this way:

[1] Unmount the share first:

Code: Select all

sudo umount /home/alan/015data
[2] Then in fstab the line I'm suggesting would look like this:

Code: Select all

//netclient015.local/015data /home/alan/015data cifs guest,uid=1000,gid=1000,noauto,user 0 0
Save fstab.

When you open Nemo you should see the 015data folder on the left side panel. When selected it will go to fstab to find out how to mount it then display the shares contents - gods willing.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
bigal
Level 5
Level 5
Posts: 512
Joined: Mon Aug 03, 2009 3:26 am
Location: Pembrokeshire, South West Wales

Re: Mounting a share. Could not resolve address

Post by bigal »

Altair4, I had never realised before but now I know.

Linux Mint keeps you fit.

The two machines we have been talking about are in separate buildings around 80m apart. I have had plenty of my daily exercise rushing between the two far more times than I care to count. I’ll need a new boot on the end of my walking stick next.

It was all worth it though. IT WORKS. Thank you so much for all the help and for sticking with me. You have no idea just how grateful I am.

I am marking this post as solved.
Lots of Minty machines but there again I like lamb and I do live in Wales!
bigal
Level 5
Level 5
Posts: 512
Joined: Mon Aug 03, 2009 3:26 am
Location: Pembrokeshire, South West Wales

Re: [SOLVED] Mounting a share. Could not resolve address

Post by bigal »

Although my shared folder is set up exactly as altair4 advised and is accessible on the ‘client’ machine exactly as he thought it would I am puzzled by a couple of things.

While the share does indeed shew up in the left side panel of Nemo, if I open the ‘Network’ folder it does not. What I still see is
NETCLIENT015 (File Sharing) - unknown type - unknown modification date
I do not understand why.

There is an additional, supplementary, question and that is can I set a fstab entry in the ‘client’ machine to open the link upon startup?
Lots of Minty machines but there again I like lamb and I do live in Wales!
altair4
Level 20
Level 20
Posts: 11458
Joined: Tue Feb 03, 2009 10:27 am

Re: [SOLVED] Mounting a share. Could not resolve address

Post by altair4 »

What do you mean by "open the link upon startup"?

You mean you want the share to mount and open nemo to that mount point when you login?

Menu > System Settings > Startup Applications > + ( to Add )

Give it a name

Then for the command enter:

Code: Select all

bash -c 'mount /home/alan/015data;nemo /home/alan/015data'
If it's currently mounted unmount it then logoff and login again. Your partition should mount and open nemo to the mount point.

You may have to play with the "startup delay" setting depending on how obstinate the networking stack is on Mint.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
Locked

Return to “Networking”