Create a group share file in Samba

Source: Internet
Author: User
Keywords Group Samba
Tags activity button click create directory example file files

Sometimes, the subgroup members of the family need a much easier sharing. For example: Parents working in a Home office need a place to share, distribute, and collaborate on documents, and here's the steps.

Create a new directory and a user group

As with any group activity, the first step is to set up an organization.

1. Create a new Linux parents group:

[Root@bigboy tmp]#/usr/sbin/groupadd Parents

2. Create a new directory to hold the files for this group. If a user is set as a leader, you may want to change the permissions to set their owner.

[Root@bigboy tmp]# Mkdir/home/parent-files

[Root@bigboy tmp]# chgrp parents/home/parent-files [Root@bigboy tmp]# chmod

3. Add members to this newly created group. For example, the following command can add a member named father to this group:

[Root@bigboy tmp]#/usr/sbin/usermod-g Parents father

&http://www.aliyun.com/zixun/aggregation/37954.html ">NBSP; all the members are in the group, now they need to share.

Configuring Shares in Swat

Next, you need SWAT to be shared in samba creation.

Click the Share button and enter the share name you want, such as "only parents". Click the "New Share" button, the path is/home/parent-files, determine the correct user name @parents,parents is the name of the Linux monthly group Click the "Submit Changes" button to create a new path for/etc/samba/smb.conf File Click on the tab at the top of the screen "Status (the word does not know how to translate)", and then restart "smbd and nmbd" to reboot Samba.


The end of your/etc/samba/smb.conf file should have an entry like the following:

# Parents Shared Area

[Only-parents]

Path =/home/parent-files

Valid users = @parents


If it is, everything is OK, you can continue, if not, check your work in the previous steps again.

With my computer.

Map Network Directory

Finally, let the user log on remotely.

Right-click the "My Computer" icon on the desktop click "Map Network Drive" Select a drive letter browse the HomeNet domain, then the Samba server, and finally the share named only-parents check the "Reconnect at logon" checkbox to make the setting always valid.

Now, the/home/parent-files directory on Linux can only be accessed by group parents, and your work is over!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.