3

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

5
  • Duplicate of askubuntu.com/questions/198501/list-of-all-shared-folders ? You probably want simply to run smbstatus --shares
    – taifwa
    Apr 5, 2017 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 5, 2017 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? askubuntu.com/questions/405926/…
    – taifwa
    Apr 5, 2017 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 5, 2017 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 askubuntu.com/help/how-to-ask for future reference. Thank you for helping us help you!
    – Elder Geek
    Apr 7, 2017 at 16:58

3 Answers 3

6

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)

0

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.

3
  • smb.conf doesn't store the locations of my current shares.
    – Josh
    Apr 5, 2017 at 21:42
  • But seriously.. where is the information for a shared location stored? smb.conf doesn't list my shares.
    – Josh
    Apr 7, 2017 at 3: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
    – Elder Geek
    Apr 7, 2017 at 17:04
-1

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

1
  • smb.conf doesn't store the locations of my current shares.
    – Josh
    Apr 5, 2017 at 21:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.