Use SAMBA to create a file server in OpenSUSE

Source: Internet
Author: User
Tags pkill
Article Title: Use SAMBA in OpenSUSE to create a file server. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

1. Configure samba in three steps:

First, install samba; second, edit the/etc/samba/smb. conf file to start smbd; third, create system users and samba users, create passwords, and create user operation directories.

The contents of the Global segment are modified as follows:

        
         [global]workgroup = infoprinting = cupsnetbios name = data_sharedserver string = Info File Serverhosts allow = 0.0.0.0guest account = nobodyguest ok = yessecurity = sharedldap suffix =passdb backend = smbpasswdpassword server = *
        

Add the following content:

        
         
[Zhrmghl] comment = private directory path =/users/zmrhglcreate mask = 0664 directory mask = 0775 writeable = yesvalid users = @ userbrowseable = yesguest OK = yesinherit acls = Yes
        

As shown above, add other user-related content respectively.

The preceding zhrmghl user is added as follows:

Useradd-g user-d/users/-s/bin/false zhrmgl

Then add the smb password:

Smbpasswd-a zhrmghl

If the password is empty

Smbpasswd-n zhrmghl

Create a directory for it

Mkdir zhrmghl

Chown zhrmghl: user zhrmghl

Chmod 700 zhrmghl

Start smb, I use

Pkill smbd

Pkill nmbd

Smbd

Nmbd

Use netstat-an to view the listening status of the Service port.

Smbstatus view samba user usage and logon status

Testparm check whether smb. conf is correctly configured

2. disk configuration

Use yast for quota installation.

Set the file system for the user/group Disk Quota

Edit the/etc/fstab file, restrict the user, add usrquota, restrict the group, and add the maid.

Reload the file system with the disk quota enabled:

Mount-o remount/users

Create a quota file for a file system with the disk quota enabled

Quotacheck-guvm/users

Then, two files, aquota. user and aquota. group, are automatically generated under the root directory of the/xjdzj_users file system.

Create a quota file for a file system with the disk quota enabled:

Quotaon-augv

View User quota

Quota-u User Name

View A system quota

Repquota-ugv/users

After the completion of the test, WIN's machine testing will allow normal access, and the disk quota has also reached the expected goal.

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.