sharing folders over LAN

@ kab00
Did using the file from the live media work?

nope I was working full this weekend, I will be able to test it tomorrow!
thanks for asking!
:slight_smile:

Having similar issues I think… the GUI for Samba sharing is there - but it resets itself, or rather clicking in “Share with Samba” works but when you check it the next second it doesn’t.

Is there a Samba Config file to copy-paste?

Use the one from the live system ( /etc/samba/smb.conf)

If you use the corrections I made on page 2 of this thread to laszek’s original post you should have access to your windows share, just make sure you have an account set up with your name and password on the windows machine, or the username and password of an existing user so you can log in to that machine.

[hr]
Here is the modified version:

  1. Open up a terminal and type in the following
    sudo cp /etc/samba/smb.conf.default /etc/samba/smb.conf

  2. You will need to change these lines in smb.conf
    workgroup=MYGROUP > workgroup=WORKGROUP
    ; name resolve order = wins lmhosts bcast > name resolve order = lmhosts bcast host wins

  3. Next create the directory
    sudo mkdir -p /var/lib/samba/usershares

  4. We need to create a group for the usershares folder. Execute in terminal:
    sudo groupadd sambashare

  5. Usershares folder should have group owner set to this newly group. So execute:
    sudo chown root:sambashare /var/lib/samba/usershares

  6. Correct the permission of the usershares folder for all users to be able to create shares from GUI (which are magically linked in this folder basically). Execute:
    sudo chmod 1770 /var/lib/samba/usershares

  7. Add your current user to the sambashare group. Execute:
    sudo usermod -a -G sambashare YOUR_USERNAME_HERE

  8. Restart smbd and nmbd with the following command
    sudo systemctl restart smbd nmbd

  9. Relogin. (Logout and Login again) and configure your share again. You should now see your windows computers via samba.

If it asks for your user password on access and it does not login you need to set a smb password for your current user on the server by executing
Code:
sudo pdbedit -a -u YOUR_USERNAME_HERE
and entering the password.

PS. You can alternatively replace steps 1 & 2 by loading the live media and replacing the /etc/smb.conf file on your hard drive with the one from the live system.

AjSlye: Sadly that didn’t work - or rather it didn’t protest but when I tried to share a folder I got the same result: it reset itself as not-shared the second after.

Odd. But tbh perhaps I should try to avoid Samba all together? I just found it to be the easiest way to share folder over networks before and since I don’t have a windows machine, just linux ones maybe thats the wrong assumption.

Again this fix is NOT to enable you to share from Linux to your Windows box, but the other way around. See laszek’s post here: http://forums.netrunner-os.com/showthread.php?tid=12923

PS. Linux to Linux you would be better off just using NFS:
https://wiki.archlinux.org/index.php/NFS

Go well. my friend.
AJ

Another user Chief has made a nice PDF tutorial on samba sharing under Netrunner Rolling (Manjaro) and then posted it in this theread: http://forums.netrunner-os.com/showthread.php?tid=13603 it might be worth a look.

well then I’ll just have to look that guide.
thnx guys!

Here is another useful guide for you, very informative: https://www.youtube.com/watch?v=zCnfJGeWf3c

OK, To fix samba do the following in command line:

export USERSHARES_DIR="/var/lib/samba/usershare"
export USERSHARES_GROUP="sambashare"
sudo mkdir -p ${USERSHARES_DIR}
sudo groupadd ${USERSHARES_GROUP}
sudo chown root:${USERSHARES_GROUP} ${USERSHARES_DIR}
sudo chmod 1770 ${USERSHARES_DIR}

next edit /etc/samba/smb.conf and underneath [global] enter:

usershare path = /var/lib/samba/usershare
usershare max shares = 100
usershare allow guests = yes
usershare owner only = False

and finally add yourself to the group with the following:

usermod -a -G ${USERSHARES_GROUP} your_username

or use could just use Kuser:

Thanks to the Manjaro user evil5826 for this solution.
Here is his thread post:
https://forum.manjaro.org/index.php?topic=11361.msg135808#msg135808