Article Title: Use SAMBA to create a file server under SUSELinux. 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. 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:
The content has been 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.