Process of adding NTADS to Linux

Source: Internet
Author: User
The process of adding NTADS to Linux-Linux Enterprise Application-Linux server application information. The following is a detailed description. 1. Configure the network.

Configure the IP address, DNS, and gateway.

2. Configure Kerberos.

Configure/etc/krb5.conf and change all example.com to your own domain name. Note that the uppercase and lowercase letters must be used. After the configuration is complete, synchronize the time with ADS (I heard that the error cannot be greater than 5 minutes ). Then perform kinit Administrator@EXAMPLE.COM for verification (note that the domain name should be capitalized), if correct, enter the password without prompting to exit.

3. Configure samba.

Below is an excerpt from my smb. conf.

[Global]
Dns proxy = no
Log file =/var/log/samba/% m. log
Netbios name = aaaa
Display charset = cp936
Cups options = raw
Netbios aliases = aaaa
Server string = aaaa
Wins server = 10.10.10.10
Dos charset = cp936
Guest OK = yes
Workgroup = AAA # case sensitive
Password server = SERVER. AAA. BBB. CCC # case sensitive
Realm = AAA. BBB. CCC # case sensitive
Domain logons = no
Encrypt passwords = yes
OS level = 20
Security = ads
Unix charset = cp936
Max log size = 50
# User-group ID ing parameters
Idmap uid = 10000-20000
Idmap gid = 10000-20000
# Winbind Parameters
Winbind separator = %
Winbind uid = 10000-20000
Winbind gid = 10000-20000
Winbind enum users = yes
Winbind enum groups = yes
Obey pam restrictions = yes
Winbind use default domain = true
Template shell =/bin/bash
Template homedir =/home/% D/% U #/home/% D needs to be created manually


Modify the following files under/etc/pam. d/
Make sure that login contains the following lines:
Auth include system-auth
Session include system-auth
Account include system-auth
Password include system-auth
My system-auth content is as follows:
Auth required pam_env.so
Auth sufficient pam_unix.so nullok try_first_pass
Auth requisite pam_succeed_if.so uid >=500 quiet
Auth sufficient pam_smb_auth.so use_first_pass nolocal
Auth sufficient pam_winbind.so use_first_pass
Auth required pam_deny.so

Account required pam_unix.so broken_shadow
Account sufficient pam_succeed_if.so uid <500 quiet
Account [default = bad success = OK user_unknown = ignore] pam_winbind.so
Account required pam_permit.so

Password requisite pam_cracklib.so try_first_pass retry = 3
Password sufficient pam_unix.so md5 shadow nullok try_first_pass use_authtok
Password sufficient pam_winbind.so use_authtok
Password required pam_deny.so

Session required pam_mkhomedir.so skel =/etc/skel umask = 0077
Session optional pam_keyinit.so revoke
Session required pam_limits.so
Session [success = 1 default = ignore] pam_succeed_if.so service in crond quiet use_uid
Session required pam_unix.so

Add the following to samba:
Session required pam_mkhomedir.so skel =/etc/skel umask = 0077


After the configuration is complete, restart the smb, winbind, and nscd services:
Service smb restart
Service winbind restart
Service nscd restart

Then execute net ads join and net rpc join to join the domain. Run wbinfo-u to check whether user information can be obtained from the domain, and run wbinfo-g to check whether the information of the Working Group can be obtained from the domain.

Note: In the preceding configuration, samba creates its own home directory for each user.

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.