1

I've got samba running on a computer running Arch Linux. I've gone through the wiki instructions to enable user defined samba shares.

[global]
  usershare path = /var/lib/samba/usershares
  usershare max shares = 100
  usershare allow guests = yes
  usershare owner only = yes
  ...

However, after that step, i get a bit unsure as to how to define such a folder share through terminal access.

The Arch Wiki mentions GUI (Thunar specifically), which the server does not have since there is no desktop on it, and only way to operate on it is by SSH login.

"Log out and log back in. You should now be able to configure your samba share using GUI. For example, in Thunar you can right click on any directory and share it on the network. If you want to share paths inside your home directory you must make it listable for the group others."

So, I'm wondering if someone could clarify a bit how these user defined shares could be set up by a (non-root) user through command line only?

E.g is it done by symlinks etc.? Is it done by chown'ing any folder in the home directory to group 'others' ?

1 Answer 1

0

Seems like samba user defined network shares are managed with the 'net' command:

From https://www.samba.org/samba/docs/current/man-html/smb.conf.5.html (In the case of Arch Linux wiki instructions, in guess group 'foo' would be group 'sambashare')

"Members of the group foo may then manipulate the user defined shares using the following commands.

net usershare add sharename path [comment] [acl] [guest_ok=[y|n]] To create or modify (overwrite) a user defined share.

net usershare delete sharename To delete a user defined share.

net usershare list wildcard-sharename To list user defined shares.

net usershare info wildcard-sharename To print information about user defined shares. "

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .