Hi,
I've only used windows in the past, this is my second day playing with Linux Mint. It all seems a bit strange right now.
Yesterday I found out how to map my network drive so PLEX can browse the contents under /media/Goflex by using this command in terminal:
sudo mount -t cifs "//192.168.0.11/GoFlex Home Public" /media/GoFlex -o username=xxxxx,password=xxxxx,uid=dan,vers=1.0
(the xxxxx represents my username and password)
Unfortunately i have to do this every time i re-boot my PC (going to be a plex server / home theatre pc)
Can I have this terminal command executed automatically each time I boot my PC so that PLEX can see the contents of the Goflex NAS drive without me having to manually do it?
Regards Dan
Automatically Mount network drive on boot up
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Automatically Mount network drive on boot up
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.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: Automatically Mount network drive on boot up
Depends on whether you want to mount them at boot or only upon login of your user.
For the at boot see here:
https://wiki.ubuntu.com/MountWindowsSha ... rk_folders
This is slightly outdated but still looks ok at least in the section I linked (replace gedit with xed in that command)
For the at boot see here:
https://wiki.ubuntu.com/MountWindowsSha ... rk_folders
This is slightly outdated but still looks ok at least in the section I linked (replace gedit with xed in that command)
Re: Automatically Mount network drive on boot up
This in a terminal:
Becomes this in /etc/fstab:
It will mount at boot - maybe. THe network stack in Mint sometimes doesn't initialize in time for fstab execution. If that is the case with you an alternative would be this:
That will not mount at boot but when used. For an explanation of what that means please see this: On Demand CIFS Mounting of Shares
Code: Select all
sudo mount -t cifs "//192.168.0.11/GoFlex Home Public" /media/GoFlex -o username=xxxxx,password=xxxxx,uid=dan,vers=1.0
Code: Select all
//192.168.0.11/GoFlex\040Home\040Public /media/GoFlex cifs username=xxxxx,password=xxxxx,uid=dan,vers=1.0 0 0
Code: Select all
//192.168.0.11/GoFlex\040Home\040Public /media/GoFlex cifs username=xxxxx,password=xxxxx,uid=dan,vers=1.0,noauto,user 0 0
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
Re: Automatically Mount network drive on boot up
Thanks you fo the prompt resonses I'll have a play with this.
PS i notice that PLEX cannot delete files when i use :
sudo mount -t cifs "//192.168.0.11/GoFlex Home Public" /media/GoFlex -o username=xxxxx,password=xxxxx,uid=dan,vers=1.0
if i change uid=dan to uid=plex then plex can delete but user dan cannot.
is there a way to do uid=dan&plex so that both plex and dan can delete files?
PS i notice that PLEX cannot delete files when i use :
sudo mount -t cifs "//192.168.0.11/GoFlex Home Public" /media/GoFlex -o username=xxxxx,password=xxxxx,uid=dan,vers=1.0
if i change uid=dan to uid=plex then plex can delete but user dan cannot.
is there a way to do uid=dan&plex so that both plex and dan can delete files?
Re: Automatically Mount network drive on boot up
Sort of:is there a way to do uid=dan&plex so that both plex and dan can delete files?
Make dan a member of the plex group - I'm guessing the plex group is "plex":
Code: Select all
sudo gpasswd -a dan plex
Then change your mount command to this:
Code: Select all
sudo mount -t cifs "//192.168.0.11/GoFlex Home Public" /media/GoFlex -o username=xxxxx,password=xxxxx,uid=plex,gid=plex,dir_mode=0777,file_mode=0777,nounix,vers=1.0
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
Re: Automatically Mount network drive on boot up [SOLVED]
Thanks gents,
making dan a member of the plex group then adding gid=plex to the command worked. both plex and dan can delete.
also when i edited /etc/fstab
and added
//192.168.0.11/GoFlex\040Home\040Public /media/GoFlex cifs username=xxxxx,password=xxxxx,uid=plex,gid=plex,vers=1.0 0 0
this also worked on reboot. Now Plex is fully functional without me having to manually add commands
Much appreciated, might get into this linux malarky.
Cheers Dan
making dan a member of the plex group then adding gid=plex to the command worked. both plex and dan can delete.
also when i edited /etc/fstab
and added
//192.168.0.11/GoFlex\040Home\040Public /media/GoFlex cifs username=xxxxx,password=xxxxx,uid=plex,gid=plex,vers=1.0 0 0
this also worked on reboot. Now Plex is fully functional without me having to manually add commands
Much appreciated, might get into this linux malarky.
Cheers Dan
Re: Automatically Mount network drive on boot up
I'm having an issue with mounting drives.
I have my login user (dan) and two media server users plex and emby
I've added dan and emby to the plex group in terminal as follows:
sudo gpasswd -a dan plex
sudo gpasswd -a emby plex
If I user this command from terminal all is good (xxxxx represents user & password) :
sudo mount -t cifs "//192.168.0.11/GoFlex Home Public" /media/goflex -o username=xxxxx,password=xxxxx,uid=plex,gid=plex,dir_mode=0777,file_mode=0777,nounix,vers=1.0
I can read, write and delete media on the goflex nas drive as user dan
Also both media servers plex and emby can view and delete media, so this all works.
but this means I have to run the above command each time I boot the PC.
as a work around I use these commands in fstab :
//192.168.0.11/GoFlex\040Home\040Public /media/goflex cifs username=xxxxx,password=xxxxx,uid=plex,gid=plex,vers=1.0 0 0
//192.168.0.11/GoFlex\040Home\040Public /media/goflex2 cifs #username=xxxxx,password=xxxxx,uid=dan,gid=dan,vers=1.0 0 0
This automatically mounts goflex and goflex2 (same drive) plex can delete from goflex and dan can delete from goflex2 (but dan cannot delete from goflex) , I was thinking of making a goflex3 for emby.
Can the terminal command :
sudo mount -t cifs "//192.168.0.11/GoFlex Home Public" /media/goflex -o username=xxxxx,password=xxxxx,uid=plex,gid=plex,dir_mode=0777,file_mode=0777,nounix,vers=1.0
which makes goflex accessible (including delete) for the media servers and dan be converted for use in fstab? allowing dan,plex and emby to delete files in goflex without having to mount different drives for each user?
Regards
Dan
Best Regards
Dan
I have my login user (dan) and two media server users plex and emby
I've added dan and emby to the plex group in terminal as follows:
sudo gpasswd -a dan plex
sudo gpasswd -a emby plex
If I user this command from terminal all is good (xxxxx represents user & password) :
sudo mount -t cifs "//192.168.0.11/GoFlex Home Public" /media/goflex -o username=xxxxx,password=xxxxx,uid=plex,gid=plex,dir_mode=0777,file_mode=0777,nounix,vers=1.0
I can read, write and delete media on the goflex nas drive as user dan
Also both media servers plex and emby can view and delete media, so this all works.
but this means I have to run the above command each time I boot the PC.
as a work around I use these commands in fstab :
//192.168.0.11/GoFlex\040Home\040Public /media/goflex cifs username=xxxxx,password=xxxxx,uid=plex,gid=plex,vers=1.0 0 0
//192.168.0.11/GoFlex\040Home\040Public /media/goflex2 cifs #username=xxxxx,password=xxxxx,uid=dan,gid=dan,vers=1.0 0 0
This automatically mounts goflex and goflex2 (same drive) plex can delete from goflex and dan can delete from goflex2 (but dan cannot delete from goflex) , I was thinking of making a goflex3 for emby.
Can the terminal command :
sudo mount -t cifs "//192.168.0.11/GoFlex Home Public" /media/goflex -o username=xxxxx,password=xxxxx,uid=plex,gid=plex,dir_mode=0777,file_mode=0777,nounix,vers=1.0
which makes goflex accessible (including delete) for the media servers and dan be converted for use in fstab? allowing dan,plex and emby to delete files in goflex without having to mount different drives for each user?
Regards
Dan
Best Regards
Dan
Re: Automatically Mount network drive on boot up
I used this command in the fstab
//192.168.0.11/GoFlex\040Home\040Public /media/goflex cifs username=xxxxx,password=xxxxx,uid=plex,gid=plex,rw,nounix,file_mode=0777,dir_mode=0777,vers=1.0 0 0
now emby, plex and dan can all read and delete files.
//192.168.0.11/GoFlex\040Home\040Public /media/goflex cifs username=xxxxx,password=xxxxx,uid=plex,gid=plex,rw,nounix,file_mode=0777,dir_mode=0777,vers=1.0 0 0
now emby, plex and dan can all read and delete files.