Need some help setting up a Linux share

Discussion in 'Linux/BSD/Free Systems' started by Deadjasper, Jan 12, 2018.

  1. Deadjasper

    Deadjasper [H]ard|Gawd

    Messages:
    1,491
    Joined:
    Oct 28, 2001
    I have a 3TB drive named DATA. I want to share this drive with both other Linux systems and Windows. After following the instructions found on another site, it still doesn't work (surprise, surprise). Neither the share nor the computer is showing up on the network.

    As per instructions I found, I added the following to the end of smb.conf

    [share]
    comment = Ubuntu File Server Share
    path = mnt/DATA
    browsable = yes
    guest ok = yes
    writable = yes
    create mask = 755

    Any help mucho appreciated. :)
     
  2. Frobozz

    Frobozz [H]ard|Gawd

    Messages:
    1,702
    Joined:
    Feb 15, 2002
    If the above is exactly what you have, then you're missing a leading / if it's mounted at /mnt/DATA
     
    auntjemima likes this.
  3. naib

    naib Gawd

    Messages:
    990
    Joined:
    Jul 26, 2013
    can you access it via IP address?
     
  4. Deadjasper

    Deadjasper [H]ard|Gawd

    Messages:
    1,491
    Joined:
    Oct 28, 2001
    I added the leading / but still no joy. But the box did show up on another Linux box but no share access. Also, I asume it's mounted at /mnt/DATA, how can I check?
     
  5. Deadjasper

    Deadjasper [H]ard|Gawd

    Messages:
    1,491
    Joined:
    Oct 28, 2001
    Yes, I can ping the box but it's the share I need to access. I suspect it's not properly shared.
     
  6. Frobozz

    Frobozz [H]ard|Gawd

    Messages:
    1,702
    Joined:
    Feb 15, 2002
    You could use the df command and look for your device. ex:
    Code:
    [user@hostname ~]$ df -h
    Filesystem               Size  Used Avail Use% Mounted on
    devtmpfs                 3.9G     0  3.9G   0% /dev
    tmpfs                    3.9G  136M  3.8G   4% /dev/shm
    tmpfs                    3.9G  2.2M  3.9G   1% /run
    tmpfs                    3.9G     0  3.9G   0% /sys/fs/cgroup
    /dev/mapper/fedora-root   49G   19G   28G  41% /
    tmpfs                    3.9G  408K  3.9G   1% /tmp
    /dev/sda2                976M  184M  726M  21% /boot
    /dev/sda1                200M   18M  183M   9% /boot/efi
    /dev/mapper/fedora-home  107G  4.2G   97G   5% /home
    /dev/sdb1                  3T  500G  2.5G   16% /mnt/DATA
    
    Alternatively, you could browse to that location (gui, terminal, whatever) and see what if you can get there. if it's not mounted then /mnt will not contain DATA.

    Backing up a little bit.. is the 3TB an additional drive, or is your OS installed onto that as well?
     
  7. naib

    naib Gawd

    Messages:
    990
    Joined:
    Jul 26, 2013
    thats not what I asked...

    Can you access it via IP address?
     
  8. Deadjasper

    Deadjasper [H]ard|Gawd

    Messages:
    1,491
    Joined:
    Oct 28, 2001
    I found the mount point and it wasn't /mnt/DATA. I corrected smb.conf and still no joy. What I'm trying to accomplish here is to have DATA show up in Windows Explorer and Caja. Judging by this page -

    https://help.ubuntu.com/community/H...rminal) - Uncomplicated, Simple and Brief Way!

    At the bottom of the page where it tells how to access the share it lists what to me is a bunch of gibberish. To me, a network share should be accessible to any file browser.
     
  9. pendragon1

    pendragon1 [H]ardForum Junkie

    Messages:
    9,944
    Joined:
    Oct 7, 2000
  10. Frobozz

    Frobozz [H]ard|Gawd

    Messages:
    1,702
    Joined:
    Feb 15, 2002
    Fairly sure BulletDust is gone/done.
     
    auntjemima likes this.
  11. pendragon1

    pendragon1 [H]ardForum Junkie

    Messages:
    9,944
    Joined:
    Oct 7, 2000
    oh?! did not know....
    they're just the most vocal about Linux, thought they might help...
     
  12. Frobozz

    Frobozz [H]ard|Gawd

    Messages:
    1,702
    Joined:
    Feb 15, 2002
    Step 8 on that page is not overly relevant to what you're trying to do. It's just getting the samba client utilities installed and using them to connect to itself to prove the share is working.

    If samba is starting successfully, you should be able to see a "share" share from your windows box by going to explorer and punching in \\IPADDRESS_OF_LINUX_BOX\ and press enter. (I think where naib was going) If it doesn't then you need to work through it a layer at a time.
    Is the firewall on? Is it allowing smb traffic? (if on, try turning it off to see if you get a different experience)
    after that, you're digging into samba. Can you confirm it's running? Can you glean any information about what it's doing from the log files? 'systemctl status samba', journalctl, and log files in /var/log/samba/ could be useful here.
    with/after that, you'll be looking at your samba configuration and filesystem permissions. Does the directory you pointed to in the path= line exist and can the samba user access it?
     
  13. KarsusTG

    KarsusTG 2[H]4U

    Messages:
    3,857
    Joined:
    Aug 27, 2010
    Do you have the ports for Samba opened? What is the filesystem of the drive?
     
  14. auntjemima

    auntjemima 2[H]4U

    Messages:
    3,633
    Joined:
    Mar 1, 2014
    Sharing across the network is usually fairly easy with Linux. I haven't had any issues. I don't run a firewall, however and I generally search via IP.
     
  15. tbg

    tbg Limp Gawd

    Messages:
    139
    Joined:
    Jul 30, 2013
    are you running ubuntu?

    if you run testparm does it show any errors in the samba config?
    # testparm

    are both smbd and nmbd running?
    # systemctl status nmbd
    # systemctl status smbd

    is the firewall running, what ports are open?
    # sudo iptables -L

    does netstat show the ports open for smb/nmb?
    # netstat -an | egrep ":445|:139|:138"

    can you mount it by hand instead of browsing for the share
    sudo mount.cifs //<server ip>/games /mnt -o username=<your username>
     
  16. naib

    naib Gawd

    Messages:
    990
    Joined:
    Jul 26, 2013
    I see no reply to my query yet the OP still wants help...

    To determine whether this is a NetBIOS issue, workgroup issue or firewall issue Actually performing the test requested is not only useful but polite considering this is FREE support
     
    auntjemima and IdiotInCharge like this.
  17. B00nie

    B00nie [H]ardness Supreme

    Messages:
    7,250
    Joined:
    Nov 1, 2012
    Jasper should also specify if he actually installed Samba or just edited a configuration file :)

    And as per Bulletdust, I hear he got permbanned by Lord gracious Kyle. No idea why. I'm actually thinking of finding an another site myself.
     
  18. Deadjasper

    Deadjasper [H]ard|Gawd

    Messages:
    1,491
    Joined:
    Oct 28, 2001
    Sorry guys, I got fed up and gave it a break for the night. I'll jumping back in shortly. Yes, I did install Samba. Stand by, I'll report back shortly. Thanks to all.
     
  19. Deadjasper

    Deadjasper [H]ard|Gawd

    Messages:
    1,491
    Joined:
    Oct 28, 2001
    OK, I turned off the firewall and now I can access the shares from the other Ubuntu system but DATA isn't showing up.

    smb.conf -
    smbconf.jpg

    Mount Point?
    smbconf2.jpg

    Also, I have no idea where the /media/ came from.
     
  20. IdiotInCharge

    IdiotInCharge Not the Idiot YOU are Looking for

    Messages:
    6,076
    Joined:
    Jun 13, 2003
    No good place to do this, so I'll do it here:

    Bulletdust may have occasionally been an asshole- to me even!- but he was also very knowledgeable and helpful. I find myself disturbed at the idea that he might be permanently banned, rather than just be put on a short breather, of which I've had plenty myself...
     
  21. KarsusTG

    KarsusTG 2[H]4U

    Messages:
    3,857
    Joined:
    Aug 27, 2010
    You have it formatted in EXT4, which windows generally cannot read without a little help.

    edit: Also since they showed up after you turned the firewall off, it really shows you were having port issues and need to verify the ports are open.
     
    IdiotInCharge likes this.
  22. naib

    naib Gawd

    Messages:
    990
    Joined:
    Jul 26, 2013
    The filesystem is moot. Windows isn't directly accessing the raw device. It is communicating via CIFS.

    @OP
    Right so part of this is a port/firewall issue. This is easily solved by opening SMB ports (445 at least) but for now access is needed


    What is the permissions of as on the Linux system of /media/sparkey/DATA

    Use: stat, ls -l or a screenshot of permissions.
    What is the full SMB.conf file? This will show what user guest is mapped to. If the equivalent local Linux user does not have read let alone write to the media directory in question then they won't be able to access the share or write to it
     
  23. Deadjasper

    Deadjasper [H]ard|Gawd

    Messages:
    1,491
    Joined:
    Oct 28, 2001
    Well hell, I'm screwed. :mad: I installed Firefox-esr, rebooted and now all I get is a blinking cursor, no error messages, just a blinking cursor.
     
  24. auntjemima

    auntjemima 2[H]4U

    Messages:
    3,633
    Joined:
    Mar 1, 2014
    lol, there are tons of ways of getting into Linux and uninstalling Firefox.

    Either way, I am sick and cannot spend much time looking. I'm sure someone here can answer from memory lol
     
  25. B00nie

    B00nie [H]ardness Supreme

    Messages:
    7,250
    Joined:
    Nov 1, 2012
    If you ever get it back working again (hint: boot up a live cd and try fixing the grub and if all else fails just copy the content of /home and /etc to a backup media and reinstall), the problem may actually be on Windows side: https://ubuntuforums.org/showthread.php?t=2309833
     
  26. Deadjasper

    Deadjasper [H]ard|Gawd

    Messages:
    1,491
    Joined:
    Oct 28, 2001
    I was able to get back in using boot-repair and was able to install Firefox esr 52 which is what caused this mess.

    Some days are diamonds, some days are stones...... :(