Hi
I've installed Debian 9 and for the life of me I cannot get this OS to automatically mount a network volume on restart.
The Volume is an SMB Share. I spent a good few hours yesterday googling this and well I give up and need help!
I can mount this manually via command line.
mount -t cifs "//192.168.0.2/TEST" -o username=TEST,password=TEST,domain=<WORKGROUP,vers=3\.0 /home/me/TEST
So my server IP is 192.168.0.2
The Username is TEST
Password is TEST
As you'll guess this is my first time with Debian and linux as a whole
Help VM appreciated.
Cheers Bill
Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
Automount SMB netwok drive
-
- Posts: 4
- Joined: 2018-11-17 19:01
Re: Automount SMB netwok drive
Hi Debian community
Oh well. This didnt work.
The file system i'm trying to log on to is read only, which is correct. and it's set for guest access.
Is this fstab approach the only way?
TIA
Bill
Oh well. This didnt work.
The file system i'm trying to log on to is read only, which is correct. and it's set for guest access.
Is this fstab approach the only way?
TIA
Bill
-
- Posts: 4
- Joined: 2018-11-17 19:01
Re: Automount SMB netwok drive
Hi
Me again, this is driving me a bit nuts now! I tried other options and it seems fstab is the only way to go. As long as I get an automounted on reboot smb share I really don't care.
On the Debian this is just not happening for me consistently. Sometimes when I reboot it may mount, sometimes it will not. More not then often!
The server is a freenas box with a folder called HI_RES set to smb share as read only. I can connect to this share from my mac with no issues.
I enter the user and password in the dialogue box and it mounts.
This is my fstab entry
//192.168.1.200/HI_RES /home/bill/HI_RES cifs credentials=/home/bill/.HI_RES_credentials,uid=1000,gid=1000,users,vers=3.0,iocharset=utf8,sec=ntlm 0 0
My .HI_RES_credentials text file is
username=username
password=password
Can anyone see what I am doing wrong?
Please?
cheers
Bill
Me again, this is driving me a bit nuts now! I tried other options and it seems fstab is the only way to go. As long as I get an automounted on reboot smb share I really don't care.
On the Debian this is just not happening for me consistently. Sometimes when I reboot it may mount, sometimes it will not. More not then often!
The server is a freenas box with a folder called HI_RES set to smb share as read only. I can connect to this share from my mac with no issues.
I enter the user and password in the dialogue box and it mounts.
This is my fstab entry
//192.168.1.200/HI_RES /home/bill/HI_RES cifs credentials=/home/bill/.HI_RES_credentials,uid=1000,gid=1000,users,vers=3.0,iocharset=utf8,sec=ntlm 0 0
My .HI_RES_credentials text file is
username=username
password=password
Can anyone see what I am doing wrong?
Please?
cheers
Bill
- thatguychuck
- Posts: 52
- Joined: 2013-03-25 00:49
- Been thanked: 2 times
Re: Automount SMB netwok drive
I'm not exactly an expert on these things, but I've been using the same setup for a long while now and can't recall any issues with it.
My fstab:
My fstab:
Code: Select all
//192.168.1.101/server_storage_a /lan.mnt/server_storage_a cifs noauto,users,credentials=/home/charles/.credentials/.server_storage,workgroup=WORKGROUP 0 0
-
- Posts: 190
- Joined: 2018-05-05 22:30
Re: Automount SMB netwok drive
I have had similar problems. Here are a couple things to check: first, if you read up on fstab (enter "man fstab" in terminal) it points out that the order of drives in the table does make a difference! Place your samba share just after your internal drive mounts and before any other removeable drives (CD, DVD, floppy etc). Second, and I'm guessing this is your stumbling block, samba or any other network share can't mount if your network isn't up yet. So add the "noauto" and "users" options to the fstab entry, (I see you have users), then mount it with a simple script. The "noauto" keeps it from trying to mount early in the boot process, the "users" allows a normal user to mount it later. I put my script in /usr/local/sbin and call it from XFCE's "Session and Startup" utility. It should read something like
The ampersand allows other stuff to happen while the mount is being executed; the exit 0 (that's a zero) may help with a slow-shutdown problem. It is two lines, two commands in the script. Save the script anywhere, really, with a .sh extension, and don't forget to make it executable:
in terminal if sambamount.sh is the name of your script.
This works for me consistently (well, except when I forget to boot the server box first).
Code: Select all
mount HI_RES &
exit 0
Code: Select all
chmod +x sambamount.sh
This works for me consistently (well, except when I forget to boot the server box first).