Use SAMBA to create a file server in SUSE

Source: Internet
Author: User
Tags pkill
Article Title: Use SAMBA in SUSE 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.

The two days took a while and samba was used to create a file server under SUSE10. A separate hard disk is used to provide file services for users, and the disk quota is set for each user.

1. Three Steps for samba configuration: Install samba and edit/etc/samba/smb. conf file to start smbd. The third is to 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 = info
Printing = cups
Netbios name = data_shared
Server string = Info File Server
Hosts allow = 0.0.0.0
Guest account = nobody
Guest OK = yes
Security = shared
Ldap suffix =
Passdb backend = smbpasswd
Password server = *

Add the following content:
[Zhrmghl]
Comment = private directory
Path =/users/zmrhgl
Create mask = 0664
Directory mask = 0775
Writeable = yes
Valid users = @ user
Browseable = yes
Guest OK = yes
Inherit 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 samb, 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.