Use PAM to implement Samba access control for users and hosts
Source: Internet
Author: User
Use PAM to implement Samba access control for users and hosts-Linux Enterprise Application-Linux server application information. The following is a detailed description. PAM (Pluggable Authentication Module) is a very effective tool for host and user access control. samba3.0 has already been well integrated with PAM. with the powerful and flexible authentication mechanism of PAM, you can control access to users and hosts at the same time.
A Samba server has a shared directory/var/myAREA. You want st02 to access this shared segment on any host in the network segment 192.168.1.0/24, however, you cannot access the shared segment on any host in the network segment 192.168.1.0/24.
(1) edit the smb. conf configuration file to support PAM Authentication and configure the shared segment myAREA
[Global]
...
Obey restrictions = yes
[MyAREA]
Path =/var/myAREA
(2) edit the configuration file/etc/pad. d/samba to add an access control file.
Add the following statement before the first accout command:
(3) create a custom Samba access control file/etc/mysmblogin
Vi/etc/mysmblogin
The content is as follows:
+: St02: 192.168.1.
-: Update: 192.168.1.
Restart the samba service and test.
The above experiment was successfully passed under RedHatAS4 and AS5, hoping to help you in your practical work.
More highlights please follow my space http://273015666.qzone.qq.com
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