Page 2 of 2 FirstFirst 12
Results 11 to 20 of 20

Thread: Network Sharing Stopped

  1. #11
    Join Date
    Dec 2009
    Beans
    6,312

    Re: Network Sharing Stopped

    OK, here goes. First the ping:
    HTML Code:

    ping 123.456.7.89PING 123.456.7.89 (123.456.7.89) 56(84) bytes of data.64 bytes from 192.168.1.50: icmp_seq=1 ttl=64 time=0.185 ms
    OK, I have no idea what's going on there. 192.168.1.50 is the local LAN and 123.456.7.89 is something outside your own network. Your server isn't in your own network?

  2. #12
    Join Date
    Sep 2009
    Location
    London
    Beans
    1,006

    Re: Network Sharing Stopped

    Quote Originally Posted by Morbius1 View Post
    OK, I have no idea what's going on there. xxx.xxx.x.xx is the local LAN and 123.456.7.89 is something outside your own network. Your server isn't in your own network?
    OOOHH, No, sorry, I changed all the IP addresses. Must have missed one. Will xxx it out.

  3. #13
    Join Date
    Dec 2009
    Beans
    6,312

    Re: Network Sharing Stopped

    Now I really don't know what's going on. I'm going to assume all of your machines are in your own home network behind your only router.

    We are going to start with the default smb.conf that came with your system:

    [1] Make sure the following file exists: /usr/share/samba/smb.conf

    [2] Make a backup of your current smb.conf
    Code:
    sudo mv /etc/samba/smb.conf /etc/samba/smb.conf.bak
    [3] Copy the reserved default to the working location:
    Code:
    sudo cp -a /usr/share/samba/smb.conf /etc/samba/
    Then we are going to make some additions to the new smb.conf:

    [4] Edit /etc/samba/smb.conf and right under the workgroup = WORKGROUP line add these:
    Code:
    name resolve order = bcast host lmhosts wins
    netbios name = STORE
    [5] Then at the bottom of the file add your share definition:
    Code:
    [Documents]
        path = /media/Documents/Documents
        force user = store
        guest ok = Yes
        locking = No
        read only = No
    [6] Save the file.

    [7] Restart samba in this order:
    Code:
    sudo service smbd restart
    Code:
    sudo service nmbd restart
    Now from the client machine access the server by its ip address:
    \\xxx.xxx.x.xxx in Windows Explorer
    smb://xxx.xxx.x.xxx in thunar

  4. #14
    Join Date
    Sep 2009
    Location
    London
    Beans
    1,006

    Re: Network Sharing Stopped

    Quote Originally Posted by Morbius1 View Post
    Now I really don't know what's going on.
    Quote Originally Posted by Morbius1 View Post
    I'm going to assume all of your machines are in your own home network behind your only router.
    Yes, that is correct. All are behind the Router.

    Quote Originally Posted by Morbius1 View Post
    We are going to start with the default smb.conf that came with your system
    Quote Originally Posted by Morbius1 View Post
    [1] Make sure the following file exists: /usr/share/samba/smb.conf[/CODE]

    Yes, it is.

    Quote Originally Posted by Morbius1 View Post
    [2] Make a backup of your current smb.conf
    Code:
    sudo mv /etc/samba/smb.conf /etc/samba/smb.conf.bak

    [3] Copy the reserved default to the working location:
    Code:
    sudo cp -a /usr/share/samba/smb.conf /etc/samba/
    2 & 3 completed, no issues

    Quote Originally Posted by Morbius1 View Post
    Then we are going to make some additions to the new smb.conf:

    [4] Edit /etc/samba/smb.conf and right under the workgroup = WORKGROUP line add these:
    Code:
    name resolve order = bcast host lmhosts wins
    Code:
    netbios name = STORE
    [5] Then at the bottom of the file add your share definition:
    Code:
    [Documents]
    Code:
    path = /media/Documents/Documents
    force user = store
    guest ok = Yes
    locking = No
    read only = No
    [6] Save the file.
    4, 5, and 6 done, though changed workgroup = to the one we use as well

    Quote Originally Posted by Morbius1 View Post
    [7] Restart samba in this order:
    Quote Originally Posted by Morbius1 View Post
    Code:
    sudo service smbd restart

    Code:
    sudo service nmbd restart
    Quote Originally Posted by Morbius1 View Post
    Done, no issues.

    Quote Originally Posted by Morbius1 View Post
    Now from the client machine access the server by its ip address:
    \\xxx.xxx.x.xxx in Windows Explorer
    smb://xxx.xxx.x.xxx in thunar


    Done and the file system appears on both Windows and Ubuntu
    Issue now is everything is listed as “root” and so I can not add or change anything.
    Last edited by Jonners59; 2 Weeks Ago at 08:40 PM.

  5. #15
    Join Date
    Dec 2009
    Beans
    6,312

    Re: Network Sharing Stopped

    Yes, it will show everything as owned by root ( or "unknown" depending on the file manager ). But you can still add / remove content. It's a gvfs thing.

  6. #16
    Join Date
    Sep 2009
    Location
    London
    Beans
    1,006

    Re: Network Sharing Stopped

    No, I can't. I have tried in Windows and Ubuntu. I can navigate, see stuff, but can not move it, change it, delete it anything.... Any thoughts how to corrcet this

  7. #17
    Join Date
    Dec 2009
    Beans
    6,312

    Re: Network Sharing Stopped

    No. I cannot reproduce your symptom.

    Your target on the server is owned by "store":
    ls -al /media/Documents
    total 23604
    drwxrwxrwx 6 store store 4096 Aug 25 08:26 .
    drwxr-xr-x 7 root root 4096 Jan 31 21:58 ..
    -rw-rw-r-- 1 root root 24133632 Jun 16 2019 core
    drwxrwxr-x 11 store root 4096 May 17 2019 Documents
    Your client user is coming across as store and is set to be writeable:
    path = /media/Documents/Documents
    force user = store
    guest ok = Yes
    locking = No
    read only = No
    What you see is what you get.

  8. #18
    Join Date
    Sep 2009
    Location
    London
    Beans
    1,006

    Re: Network Sharing Stopped

    SO what else could it be? Must be a setting in fstab or users, maybe???????

  9. #19
    Join Date
    Dec 2009
    Beans
    6,312

    Re: Network Sharing Stopped

    There aren't any ownership settings in fstab for an ext4 partition. You can post it if you want.

  10. #20
    Join Date
    Sep 2009
    Location
    London
    Beans
    1,006

    Re: Network Sharing Stopped

    OK, got the read-write to work by adding
    Code:
        directory mask = 0770
    to the Documents argument in smb.conf

    It now reads:
    Code:
    [Documents]
        path = /media/Documents/Documents
        force user = store
        guest ok = Yes
        locking = No
        read only = No
        directory mask = 0770
    On the "Store" fstab entry is...
    HTML Code:
    UUID=xxxxxxxxxxxxxxxxxxx  /media/Documents           ext4    relatime,noexec   1  2
    where UUID has been xxxx


    So next task is to get it to auto mount on the Ubuntu machine, so looking at fstab

    This worked:

    Code:
    //"IP address xxx.xxx.x.xxx"/"Directory"	/media/"Mount point folder"	cifs	guest,uid=1000,iocharset=utf8	0	0
    
    //"IP Address xxx.xxx.x.xxx"/"Directory"	             /media/"Mount point folder"	cifs	noauto,user,guest,uid=1000,iocharset=utf8	0	0
    What is also nice is, if the remote device is not working/on then it does not go into fail mode, it the PC/Laptop starts normally

    Also tried below, but that failed.
    # Samba
    # //server/share /media/samba cifs user=user,uid=1000,gid=100 0 0
    # "Server" = Samba server (by IP or name if you have an entry for the server in your hosts file
    # "share" = name of the shared directory
    # "user" = your samba user
    # This set up will ask for a password when mounting the samba share. If you do not want to enter a password, use a credentials file.
    # replace "user=user" with "cred entials=/etc/samba/credentials" In the credentials file put two lines
    # username=user
    # password=password
    # make the file owned by root and ro by root (sudo chown root.root /etc/samba/credentials && sudo chmod 400 /etc/samba/credentials)
    Last edited by Jonners59; 2 Weeks Ago at 11:37 AM.

Page 2 of 2 FirstFirst 12

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •