[Samba] adding users and permissions to designated shared folders and home directories?

Phillip K phillipkuo at gmail.com
Sun Aug 22 18:27:32 GMT 2004


After successfully installing and configuring samba 3 on a test server
and adding the root and the machine to the /etc/passwd file, how do I
go about adding users such that when they login, they have access to
certain shared home directories on the linux box?  For instance, if I
have the users bill and earl, how do I add those users such that bill
has access to both /home/WATER and /home/Accounting shares and earl
only has access to the shared folder /home/Accounting?  I would also
like each user to have their own home directories as detailed in the
smb.conf file below.  By just using 'smbpasswd  <newuser>' doesn't
work because I'm using tdbsam.  Any suggestions?

thanks in advance 



[global]
        workgroup = MYWATER
        netbios name = MYserver01
        passdb backend = tdbsam
        os level = 33
        preferred master = yes
        domain master = yes
        local master = yes
        security = user
        domain logons = yes
        logon drive = H:
        logon script = logon.cmd
        logon path = \\%N\profiles\%u
        add machine script = /usr/sbin/useradd -d /dev/null -g 100  -s
/bin/false -M %u

[homes]
        comment = Home Directories
        valid users = %S
        read only = No
        browseable = No

[netlogon]
        path = /var/lib/samba/netlogon
        read only = yes
        admin users = root
        write list = ntadmin
[profiles]
        comment = Roaming Profile Share
        path = /var/lib/samba/profiles
        read only = no

[Misc]
        path = /home/Misc
        read only = No
        create mask = 0774
        directory mask = 0775

[WATER]
        path = /home/WATER
        valid users = @water
        read only = No
        create mask = 0774
        directory mask = 0775

[Accounting]
        path = /home/Accounting
        valid users = @accounting
        read only = No
        create mask = 0774
        directory mask = 0775


More information about the samba mailing list