Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Samba -sharing home folders

  • 26-08-2005 10:46am
    #1
    Registered Users, Registered Users 2 Posts: 4,287 ✭✭✭


    I'm trying to set up samba and I want each user to be able to access their home folder but noone elses.

    This is what my smb.conf looks like:
    # Global parameters
    [global]
            workgroup = WORKGROUP
            server string = %h server (Samba %v)
            obey pam restrictions = Yes
            passdb backend = tdbsam, guest
            passwd program = /usr/bin/passwd %u
            passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n .
            username map = /etc/samba/smbusers
            syslog = 0
            log file = /var/log/samba/log.%m
            max log size = 1000
            dns proxy = No
            ldap ssl = no
            panic action = /usr/share/samba/panic-action %d
            invalid users = root
    
    [homes]
            comment = Home Directories
            read only = No
            create mask = 0700
            directory mask = 0700
            browseable = No
    
    

    At the moment any user can access files in everyones home directory... what am I doing wrong?


Comments

  • Registered Users, Registered Users 2 Posts: 354 ✭✭AndrewMc


    NotMe wrote:
    I'm trying to set up samba and I want each user to be able to access their home folder but noone elses.

    At the moment any user can access files in everyones home directory... what am I doing wrong?

    I think this is due to the (Unix) permissions on the home directories themselves - if they're globally readable under Unix they'll end up globally readable under Windows. Something I've just thought of (but can't try as it'd be too disruptive if it didn't work), is if you could use something like
    valid users = %S
    
    in the "homes" section. The %S would be expanded to the service name (like "joe"), thus limiting access to that user, since service name matches username.

    I'd be interested to know if that works, actually!


  • Registered Users, Registered Users 2 Posts: 1,419 ✭✭✭nadir


    yea,

    [pub]
    path = /cifs/pub
    guest ok = yes
    writeable = yes
    create mode = 0666
    directory mode = 0777

    [private]
    path = /cifs/private
    create mode = 0660
    directory mode = 0770
    read only = no
    guest ok = no

    [netlogon]
    path = /cifs/netlogon
    read only = yes
    guest ok = yes


    something like this, you want 755 or such.

    on another note, for a client, xfsamba is really great at leeching of windows shares XD


  • Registered Users, Registered Users 2 Posts: 4,287 ✭✭✭NotMe


    Ok it's not as bad as I thought.. if I log in as some user into another users share
    eg. smbclient //192.168.1.20/user1 -Uuser2
    I can't get the files or cd into any folders but I can see all the files and folders in the top level of the users home directory.



    *edit*
    ah I got it .. I need this line in the [homes] section
    path = /home/%u

    now if I do
    smbclient //192.168.1.20/user1 -Uuser2

    it just goes to /home/user2
    :)


Advertisement