Google


ADBRITE ads links
You are here: CodeIdol.com > Unix > Linux® Quick Fix > Sharing Resources Using Samba > Creating Group Shares In Samba

SAVE
Digg
Shown on del.icio.us del.icio.us
See Whos Talking About This on Technorati Technorati
I've Reddit reddit

Creating Group Shares in Samba

On occasion, subgroups of a family need a share that is fully accessible by all members of the group. For example, parents working in a home office environment may need a place where they can share, distribute, or collaboratively work on documents. Here's how it's done.

Create the Directory and User Group

As with any group activity, the first step is to get organized.

1.
Create a new Linux group named parents:

[root@bigboy tmp]# /usr/sbin/groupadd parents

2.
Create a new directory for the group's files. If one user is designated as the leader, you might want to change the chown statement to make that person owner:

[root@bigboy tmp]# mkdir /home/parent-files
[root@bigboy tmp]# chgrp parents /home/parent-files
[root@bigboy tmp]# chmod 0770 /home/parent-files

3.
Add the group members to the new group. For instance, the command to add a user named father to the group is

[root@bigboy tmp]# /usr/sbin/usermod -G parents father

All your members are in the group; now they need to share.

Configure the Share in SWAT

Next, you need to create the share in Samba using SWAT.

1.
Click on the Shares button, then enter the name of the share you want to create, such as only-parents.

2.
Click on the Create Share button. Make sure the path maps to /home/parent-files, and make the valid users be @parents, where parents is the name of the Linux user group.

3.
Click on the Commit Changes button to create a new /etc/samba/smb.conf file.

4.
Click on the Status tab at the top of the screen and restart smbd and nmbd to restart Samba.

Your /etc/samba/smb.conf file should have an entry like this at the end

# Parents Shared Area
[only-parents]
         path = /home/parent-files
         valid users = @parents

If it does, all is well and you can move on. If not, double check your work in the last steps.

Map the Directory Using My Computer

Finally, let the user log into the domain from a remote PC:

1.
Right click on the My Computer icon on the desktop.

2.
Click on Map Network Drive.

3.
Select a drive letter.

4.
Browse to the HOMENET domain, then the Samba server, then the share named only-parents.

5.
Click on the check box Reconnect at Logon, to make the change permanent.

Now the files located in the Linux /home/parent-files directory will be accessible to the parents only and your job is complete!

    SAVE
    Digg
    Shown on del.icio.us del.icio.us
    See Whos Talking About This on Technorati Technorati
    I've Reddit reddit

    You are here: CodeIdol.com > Unix > Linux® Quick Fix > Sharing Resources Using Samba > Creating Group Shares In Samba
       
    Related tags







    Popular Categories
    Unix books and guides
    AJAX popular information
    C# language guides
    Windows books and cookbooks
    .......






    © CodeIdol Labs, 2007