Results 1 to 2 of 2

Thread: Problems with some users on some SAMBA shares

  1. #1
    Join Date
    Nov 2012
    Beans
    7

    Problems with some users on some SAMBA shares

    Hi All,

    Am building the 3rd generation of my home media server and making the big step from the point and shoot freenas, to the more capable Ubuntu server.

    Please keep in mind that I'm also trying to learn/do everything via the command line so I can get a deeper understanding of the Linux.

    So far I've successfully installed ubuntu 12.04 server (no GUI), can ssh in and have SAMBA running with some shares.

    My problem is that I've got SAMBA running and I can access the shares from my windows machine. But some shares cannot be accessed by some users when they should.

    Background:
    I've got three users:

    1. risto - admin made during setup
    2. leanne - user added afterwards
    3. xbmc - user added afterwards

    I've got 2 groups:

    1. mediagp - contains users risto, leanne and xbmc
    2. leannegp - contains users risto, leanne

    Shares with permissions

    risto@server:/zfs2$ ls -l
    total 10
    drwxrwx--- 2 risto leannegp 3 Nov 6 14:17 leanne
    drwxrwx--- 2 risto mediagp 5 Nov 5 23:43 media
    drwxr----- 2 risto mediagp 2 Nov 5 21:19 photos
    drwxr-xr-x 2 risto root 3 Nov 6 14:16 risto


    Samba config file
    risto@server:/etc/samba$ sudo nano /etc/samba/samba.config
    risto@server:/etc/samba$ ls -l
    total 24
    -rw-r--r-- 1 root root 0 Nov 6 17:08 dhcp.conf
    -rw-r--r-- 1 root root 8 Jun 8 23:14 gdbcommands
    -rw-r--r-- 1 root root 0 Nov 5 19:45 samba.conf
    -rw-rw-r-- 1 root adm 854 Nov 6 17:39 smb.conf
    -rw-r--r-- 1 root root 12464 Nov 5 19:44 smb.conf.bak
    risto@server:/etc/samba$ sudo nano smb.conf
    GNU nano 2.2.6 File: smb.conf

    #============ Global Settings ====================
    [global]
    workgroup = WORKGROUP
    server string = Samba Server %v on %l
    netbios name = server
    security = user
    map to guest = bad user
    dns proxy = no
    encrypt passwords = yes

    #============ Share Definitions ==================
    [Media]
    path = /zfs2/media
    comment = Tv shows and Movies
    browsable = yes
    writable = yes
    guest ok = no
    read only = no
    valid users = leanne, xbmc, risto

    [Photos]
    path = /zfs2/photos
    comment = Risto and Lea's photos
    browsable = yes
    writable = yes
    guest ok = no
    read only = no
    valid users = leanne, xbmc, risto

    [Risto]
    path = /zfs2/risto
    comment = Risto's share
    browsable = yes
    writable = yes
    guest ok = no
    read only = no
    valid users = risto

    [Leanne]
    path = /zfs2/leanne
    comment = Lea's share
    browsable = yes
    writable = yes
    guest ok = no
    read only = no
    valid users = leanne, risto


    What I want to do
    So I've got 4 shares and I want the following users to be able to access them and all files/directories under them:

    1. Leanne - rw by users leanne, risto and group leanegp
    2. risto - rw by user risto
    3. media - rw by users risto, xbmc and group mediagp. r by user leanne
    4. photos - rw by user risto. r by users leanne, xbmc and group mediagp


    What the problem is
    Now all users can see the server and the list the shares from a windows machine, but the problem I have is the following (this is all from a windows machine):
    User Leanne

    1. can access \\server\leanne (rw as expected)
    2. gets "windows cannot access \\server\media" (should have r)
    3. gets "windows cannot access \\server\photos" (should have r)
    4. requires user/password for \\server\risto" (as expected)

    User risto

    1. Can access everything (rw as expected)

    User xbmc

    1. Can access \\server\media
    2. gets "windows cannot access \\server\photos" (should have rw)
    3. requires user/password for \\server\risto & \\server\leanne (as expected)
    Any ideas on what to check?
    Last edited by LedFoot74; November 6th, 2012 at 10:09 AM. Reason: samba config file not correctly copied to thread

  2. #2
    Join Date
    Nov 2012
    Beans
    7

    Re: Problems with some users on some SAMBA shares

    Hi All,

    I finally managed to work it out, there seemed to be an issue with the password set for the two users leanne and xbmc. I reset that and everything started to come together. I've now been able to figure out how to force create modes etc and the shares are coming together nicely.

    I just wanted to also say a big thank you to everyone who replied to this thread. I was really struggling and you were an incredible help. I could not have resolved this without your incredible guidance, thoughts, tips, suggestions and quick replies!

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
  •