Results 1 to 8 of 8

Thread: Help setting up a very simple samba share

  1. #1
    Join Date
    Nov 2004
    Beans
    117

    Help setting up a very simple samba share

    Hello

    I have partitioned and formatted a second hard drive connected to my Ubuntu Server, mounted it to /media/storage and have created a folder called "Share" (full path is /media/storage/Share), I have also taken ownership of that folder by running:

    Code:
    sudo chown ben:ben /media/storage/Share
    I now want to share this folder via Samba to my Windows 7 desktop and laptop, my Ubuntu Server username is ben and my Windows username is Ben, both have the same password, I also want to give my WDTV Live box read only access to the share, using the Windows username WDTVLive

    Can someone assist me in setting this up? I'd be very grateful, thanks

    Ben
    Last edited by vassie; September 26th, 2011 at 05:02 PM. Reason: typo

  2. #2
    Join Date
    Jul 2006
    Location
    Here
    Beans
    10,543

    Re: Help setting up a very simple samba share

    Right click on the folder & select share.
    You can fine tune the settings in /etc/samba.conf

  3. #3
    Join Date
    Nov 2004
    Beans
    117

    Re: Help setting up a very simple samba share

    Quote Originally Posted by kerry_s View Post
    Right click on the folder & select share.
    You can fine tune the settings in /etc/samba.conf
    I'm using Ubuntu Server, I need to create the share by editing my smb.conf file, but I not too sure what I need to do

  4. #4
    Join Date
    Dec 2009
    Beans
    5,820

    Re: Help setting up a very simple samba share

    Add this to the bottom of smb.conf:
    Code:
    [Share]
    path = /media/storage/Share
    read only = Yes
    write list = ben
    valid users = ben, wdtvlive
    Restart samba:
    Code:
    sudo service smb restart
    Only thing I'm not sure about ( well, there are many things I'm not sure about ... ) is the capitalization difference between "Ben" and "ben"

    You may need to edit the following file to make one the same as the other:
    Code:
    /etc/samba/smbusers
    and add:
    Code:
    ben = Ben
    And then make sure in your smb.conf you have a line in the [global] section:
    Code:
    username map = /etc/samba/smbusers

  5. #5
    Join Date
    Nov 2004
    Beans
    117

    Re: Help setting up a very simple samba share

    Quote Originally Posted by Morbius1 View Post
    Add this to the bottom of smb.conf:
    Code:
    [Share]
    path = /media/storage/Share
    read only = Yes
    write list = ben
    valid users = ben, wdtvlive
    Restart samba:
    Code:
    sudo service smb restart
    Only thing I'm not sure about ( well, there are many things I'm not sure about ... ) is the capitalization difference between "Ben" and "ben"

    You may need to edit the following file to make one the same as the other:
    Code:
    /etc/samba/smbusers
    and add:
    Code:
    ben = Ben
    And then make sure in your smb.conf you have a line in the [global] section:
    Code:
    username map = /etc/samba/smbusers
    Thanks, what about the wdtvlive user? That is a Windows only account

  6. #6
    Join Date
    Dec 2008
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Help setting up a very simple samba share

    Quote Originally Posted by vassie View Post
    I'm using Ubuntu Server, I need to create the share by editing my smb.conf file, but I not too sure what I need to do
    Ops; slow fingers this morning. Morbius1 has the right idea.
    Last edited by capscrew; September 26th, 2011 at 06:21 PM.

  7. #7
    Join Date
    Dec 2009
    Beans
    5,820

    Re: Help setting up a very simple samba share

    Thanks, what about the wdtvlive user? That is a Windows only account
    Not sure what you mean by that. If you don't have a local account for that user on the server create one:
    Code:
    sudo useradd -s /bin/true WDTVLive
    Then give him / it a samba password:
    Code:
    sudo smbpasswd -a WDTVLive
    EDIT: Sorry, doing too many things at once here.
    If you added a user WDTVLive then change the definition to this:
    [Share]
    path = /media/storage/Share
    read only = Yes
    write list = ben
    valid users = ben, WDTVlive
    I'm not used to doing things with caps in them and I lost focus.

    I'll be away for about an hour or so but luckily you have capscrew looking over things so you're in good hands.
    Last edited by Morbius1; September 26th, 2011 at 07:15 PM.

  8. #8
    Join Date
    Nov 2004
    Beans
    117

    Re: Help setting up a very simple samba share

    Thanks for your help, everything seems to be working fine now

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •