Haggis Veteran Posted January 29, 2014 Veteran Share Posted January 29, 2014 hi guys i have a server running in a VM on 192.168.0.64 or dns hostname is ubuntu I want to mount it locally in a folder so i can go to /home/haggis/mountedshare and deal with the files there i am struggling on getting it mounted like that its created using Samba Link to comment Share on other sites More sharing options...
Brian M. Veteran Posted January 30, 2014 Veteran Share Posted January 30, 2014 You're probably looking for the smbmount command (or similar). Something like: smbmount //ubuntu/sharename /home/haggis/mountedshare -o username=user,password=pass,rw Although, smbmount is pretty old now. Another (probably better) way to do it would be: mount -t cifs //ubuntu/sharename /home/haggis/mountedshare -o rw Before doing this, you'll want to install the cifs-utils package. You can add it to fstab with no auto and then just issue a mount command when you want to mount it - but there's no point having an auto mount if it's in a VM since the share won't be available at boot. Link to comment Share on other sites More sharing options...
Haggis Veteran Posted January 30, 2014 Author Veteran Share Posted January 30, 2014 yep agreed thanks for this what i am doing is playing about with server in a VM as i am ordering a N54L this month so i wanted to at least have an idea of what i was doing lol I dont intend to install a gui so this will be my first CLI only system So far i have managed to setup:- shares SSH Web Server Dropbox DNS Plex I am using Webmin to help me with some stuff I think i will also use a live usb to partition the disks as i am not comfortable with doing that on cli Link to comment Share on other sites More sharing options...
Brian M. Veteran Posted January 30, 2014 Veteran Share Posted January 30, 2014 Are you installing debian/ubuntu/another debian derivative? Practice in a VM with the text based installer - it's really not that bad as long as you read the options carefully. During the text based install, you should have the option to install SSH from the start (it's the only thing I choose - I prefer to install everything else myself manually so I know exactly what's installed). What disk setup are you using? The text based installer isn't too complicated, unless you're doing software raid, in which case there are some very good tutorials out there (and you can practice by installing it to a virtual machine with multiple virtual hdds attached). Link to comment Share on other sites More sharing options...
]SK[ Posted January 30, 2014 Share Posted January 30, 2014 Does the hostname resolve on the source computer? Link to comment Share on other sites More sharing options...
Haggis Veteran Posted January 30, 2014 Author Veteran Share Posted January 30, 2014 oohhh i never thought about adding extra hard drives to the VM lol Its Ubuntu Server i am installing just purely for ease of use and lots of online documentation I got through the installer fine (i will admit i just made it use the full disk for the OS as i wont be using that drive for anything else but that) I will add more drives to another VM and play with that Does the hostname resolve on the source computer? I can type ubuntu into my laptop and it picks up the webserver for example on that machine connecting to webmin is just https://ubuntu:1000 Link to comment Share on other sites More sharing options...
Haggis Veteran Posted January 30, 2014 Author Veteran Share Posted January 30, 2014 ok i mounted the folder which was fine i created a folder in that share on my local machine not the server the folder created fine but i dont have permission to create anything in that lol when i right click and go to properties and then permission its greyed out under root Link to comment Share on other sites More sharing options...
Haggis Veteran Posted January 30, 2014 Author Veteran Share Posted January 30, 2014 ok i got it i forgot to add the details to smb.conf [<folder_name>] path = /home/<user_name>/<folder_name> available = yes valid users = <user_name> read only = no browseable = yes public = yes writable = yes Link to comment Share on other sites More sharing options...
Haggis Veteran Posted February 8, 2014 Author Veteran Share Posted February 8, 2014 ok to allow me to let all users write to the folder i had to do chown nobody:nogroup -R /path/to/folder is this safe? Link to comment Share on other sites More sharing options...
Haggis Veteran Posted February 13, 2014 Author Veteran Share Posted February 13, 2014 Anyone any idea :) Link to comment Share on other sites More sharing options...
Brian M. Veteran Posted February 13, 2014 Veteran Share Posted February 13, 2014 Anyone any idea :) I don't like having nobody/nogroup etc. Personally, I have my shares owned by root:fileshareusers. Any user who can access the shares is a member of the fileshareusers group. Then I set permissions to be 760. If you're not in the fileshareusers group, you don't have access - i.e. root: rwx %fileshareusers: rw, world, no access. I do this for pretty much everything. People who need access to bind/apache etc are in the serviceusers group, and have sudo access to those controls only. People who need ssh access are in the sshusers group, people who need access to virtualbox are in the vboxusers group, etc, etc, etc. Link to comment Share on other sites More sharing options...
Haggis Veteran Posted February 13, 2014 Author Veteran Share Posted February 13, 2014 yeah but i am not sure how to do that so lets say i have my son, my wife and my daughter they are Alex with password of password1 (Linux) Lynette with password of password2 (Windows) Lucy with password of password3 (Android) Do i just setup users matching these details? so when they try and access my photos folder for example Alex would just then type in Alex and password1? sorry i may be making this more complex than it is also i would have security set to user in the smb.conf i have been following this guide https://help.ubuntu.com/lts/serverguide/samba-fileserver.html Link to comment Share on other sites More sharing options...
Haggis Veteran Posted February 19, 2014 Author Veteran Share Posted February 19, 2014 I am stcuk again i rebuilt using Debian this time when trying to mount the folders i get mount error(13): Permission denied Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) Link to comment Share on other sites More sharing options...
Recommended Posts