Use Samba in Linux to build a virtual NT domain Server

Source: Internet
Author: User
Tags domain server
Article Title: Use Samba in Linux to build a virtual NT domain 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. modify the configuration file:
Workgroup = ccgd.com // # domain name constructed
  
Netbios name = ccgd
  
Security = user // # shared security level
  
Encrypt passwords = yes // # Use the encrypted password
  
Smb passwd file =/etc/samba/smbpasswd // # location where the encrypted password is stored;
  
Domain logons = yes // # enable domain login;
  
Domain master = yes // # Set SAMBA to the domain master browser (that is, the primary domain controller)
  
Perferred master = yes
  
Local master = yes // # provides local browsing
  
OS level = 64 // # Set the operating system level to enable the SAMBA domain to become a domain controller
  
Logo script = scripts \ % U. bat // # Enable User Logon script
  
Wins support = yes // # Set SAMBA to a WINS Server
  
   2. Set netlogon sharing
Netlogon sharing is a shared directory that is required to log on to the Domain Server. The netlogon shared directory is set as follows:
  
[Netlogon]
Path =/usr/local/samba/netlogon
  
Read only = yes
Browseable = no
Share modes = no
  
   3. Establish trust relationships between machines and establish users (NT/2000/XP)
Because the domain authentication of NT is based on the machine Trusted Account. Therefore, the Machine Account adduser-d/dev/null-r qcy $-s/bin/flase must be created on the Samba server, in the create SAMBA Machine Account smbpasswd-a-m qcy, where-a is to add-m is to create a machine trust account,
  
Because administrator intervention is required to join the NT domain, we have to add the ROOT account to SAMBA users. After the trust relationship between computers is established, we can add our WINDOWS2000/NT machines to linux..
  
Now we add SAMBA users:
  
Useradd test1 (add a system user and create its home directory)
  
Passwd test1
  
Smbpasswd-a test1 OR smbadduser test1: test1 (create a SAMBA user)
  
4. After the system and SAMBA users are added, A. profile. tpfolder is created in the home directory of the new user. It is used to store the user's configuration files. When creating this file, it is best to use SU to switch to this user (su test1). The advantage of this creation is that it directly owns the folder, this allows you to create and store configuration files during user logon.
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.