6

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
  • 125
  • Duplicate of https://askubuntu.com/questions/198501/list-of-all-shared-folders ? You probably want simply to run smbstatus --shares – tk-noodle 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 – tk-noodle 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. – tk-noodle 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:// and will be and will be on /run/user/$(id -u)/gvfs/... – Pablo Bianchi Apr 05 '23 at 17:55

3 Answers3

9

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
  • 451
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
  • 36,813
0

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

tk-noodle
  • 798