4

Does anyone know the file in which the entries for the samba shares are stored? For instance the drives or folders I am sharing.

Josh
  • 85
  • 1
  • 6
  • Duplicate of https://askubuntu.com/questions/198501/list-of-all-shared-folders ? You probably want simply to run `smbstatus --shares` – taifwa Apr 05 '17 at 21:26
  • No, I'm actually looking to edit the entries with nano instead of commands. My samba is broken when adding a share with an error: 'net usershare' returned error 255: net usershare add: cannot convert name "Everyone" to a SID. Access denied. .. I have existing shares that work.. and I want to basically add new shares similar to how they're already added. Like editing a simple file – Josh Apr 05 '17 at 21:32
  • Sounds more like a configuration error, and I doubt manually editing files would be a safe path to resolution (edit - upon checking, I stand corrected). I don't suppose you've already tried checking against that error itself? https://askubuntu.com/questions/405926/samba-cannot-share-folder-cannot-convert-name-everyone-to-a-sid – taifwa Apr 05 '17 at 21:37
  • 1
    At this point you will need to flesh out your question. What's broken, when did it break, how did you set up the shares in the first place, what version of Ubuntu, etc. – taifwa Apr 05 '17 at 21:48
  • Please [edit] your question to include the output of `lsb_release -a` the content of `/etc/samba/smb.conf` and the output of `ll /var/lib/samba/usershares/..` as at this point it's unclear what you are asking. Please also review http://askubuntu.com/help/how-to-ask for future reference. Thank you for helping us help you! – Elder Geek Apr 07 '17 at 16:58
  • The ones someone else share will be mounted with [`gio mount smb://`](https://askubuntu.com/a/1392839/349837) and will be and will be on `/run/user/$(id -u)/gvfs/`... – Pablo Bianchi Apr 05 '23 at 17:55

3 Answers3

8

If not defined in /etc/samba/smb.conf try folder /var/lib/samba/usershares/ and you will find files for each share you setup via GUI. (Ubuntu 17.10)

MeSo2
  • 399
  • 1
  • 8
  • 23
1

If you insist, you can edit /etc/samba/smb.conf I recommend that you make a backup copy or use gedit which will make one (and only one) for you.

Further information regarding this file can be found here.

Elder Geek
  • 35,476
  • 25
  • 95
  • 181
  • smb.conf doesn't store the locations of my current shares. – Josh Apr 05 '17 at 21:42
  • But seriously.. where is the information for a shared location stored? smb.conf doesn't list my shares. – Josh Apr 07 '17 at 03:09
  • I'm quite certain we can help you provided you respond to the requests to [edit] your post with the information requested. For instance [this request](http://askubuntu.com/questions/900580/samba-file-location-where-share-entries-are-stored#comment1413820_900580) – Elder Geek Apr 07 '17 at 17:04
0

Try in /etc/samba/smb.conf as per https://help.ubuntu.com/community/Samba/SambaServerGuide

taifwa
  • 778
  • 3
  • 15