Now unable to mount network server shares

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
lbunch
Level 2
Level 2
Posts: 57
Joined: Mon Aug 12, 2013 12:32 pm

Now unable to mount network server shares

Post by lbunch »

mint 18.3, ubuntu server 18.04
moved server and clients, new router forced a new network address. Now can't mount the server shares on the clients. Same setup used for years.

fstab line on client:
# mount music_flac_vb
//192.168.254.18/music_flac /media/music_flac_vb cifs user=les,pass=nnnn 0 0

/media (exists)
/music_flac_vb (empty folder)

smb.conf line on server:
[music_flac]
path = /srv/music_flac
valid users = les
read only = no
browseable = yes
guest ok = no

The server shows in the file manager as vortexbox2, its computer name,
but I cannot access it in the file manager.

In terminal, I can access the server by smb: les@192.168.254.18. The computer name won't work. I can browse the server and edit files, etc. in the terminal.

Attempting to mount the shares on the client gives "only root can mount //192.168.254.18/music_flac on /media/music_flac_vb"

It should be something simple, but I don't see it.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
altair4
Level 20
Level 20
Posts: 11453
Joined: Tue Feb 03, 2009 10:27 am

Re: Now unable to mount network server shares

Post by altair4 »

Here is my guess:

For whatever reason - since it worked in the past - you are not mounting the ubuntu share at boot since the network stack isn't ready when fstab is read. This happens a lot.

THen when you click on the music_flac_vb link on the side panel of your file manager you get the "only root can mount //192.168.254.18/music_flac on /media/music_flac_vb" error.

A suggestion:

Change your fstab declaration to this:
//192.168.254.18/music_flac /media/music_flac_vb cifs user=les,pass=nnnn,noauto,user 0 0
noauto == will make it so it doesn't mount at boot.
user == will make it so an ordinary user ( not root ) can mount the share.

Since the mount point is under /media it will still show up as a mountable link to your share in your file manager and will do so without being root.

Side note:

If the Ubuntu server has a hostname of vortexbox2 you should be able to connect to it as vortexbox2.local. All the ubuntu server needs is to have avahi installed:
sudo apt install avahi-daemon
Ubuntu - Desktop already has it installed. Ubuntu - Server does not.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
lbunch
Level 2
Level 2
Posts: 57
Joined: Mon Aug 12, 2013 12:32 pm

Re: Now unable to mount network server shares

Post by lbunch »

Altair4, thanks for the quick response.

Now I am confused. I had already added avahi to the server. Added noauto and user to fstab.
Tried both the URL and the computer name, with and without .local. No soap, BUT 3 other folders which were not mounting DID mount on reboot, but the music_flac folder still did not.

However, I can access the flac folder from the file manager manually, using either the URL or the computer name, with or without .local.
It prompts for the password and lets me in. The other three folders are persistently showing with the unmount icon in the file manager, and work the way they should.

I did think I could use the mount command in terminal to process fstab, but that doesn't seem to work. What is the proper syntax to use mount from the terminal?

Still missing my music.
altair4
Level 20
Level 20
Posts: 11453
Joined: Tue Feb 03, 2009 10:27 am

Re: Now unable to mount network server shares

Post by altair4 »

I did think I could use the mount command in terminal to process fstab, but that doesn't seem to work. What is the proper syntax to use mount from the terminal?
If your fstab line now looks like this:

Code: Select all

//192.168.254.18/music_flac /media/music_flac_vb cifs user=les,pass=nnnn,noauto,user 0 0
You can mount it without sudo in a terminal with:

Code: Select all

mount /media/music_flac_vb
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
lbunch
Level 2
Level 2
Posts: 57
Joined: Mon Aug 12, 2013 12:32 pm

Re: Now unable to mount network server shares

Post by lbunch »

Thanks again Altair4.
Yes the fstab line is this: //192.168.254.18/music_flac /media/music_flac_vb cifs user=les,pass=nnnn,noauto,user 0 0
But the terminal command does not work:
"mount: only root can mount //192.168.254.18/music_flac on /media/music_flac_vb
Very strange, since I can get it from the file manager with smb: //etc etc
altair4
Level 20
Level 20
Posts: 11453
Joined: Tue Feb 03, 2009 10:27 am

Re: Now unable to mount network server shares

Post by altair4 »

Run the following commands to make sure systemd is happy:

Code: Select all

sudo systemctl daemon-reload

Code: Select all

sudo systemctl restart remote-fs.target
Then run the mount /media/music_flac_vb again.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
altair4
Level 20
Level 20
Posts: 11453
Joined: Tue Feb 03, 2009 10:27 am

Re: Now unable to mount network server shares

Post by altair4 »

If you are stil being told that you need to be sudo post your fstab because that shouldn't happen:

Code: Select all

cat /etc/fstab
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
Locked

Return to “Networking”