Ubuntu Server Guide
Download 1.23 Mb. Pdf ko'rish
|
ubuntu-server-guide (1)
- Bu sahifa navigatsiya:
- Primary Domain Controller
As a Domain Controller
A Samba server can be configured to appear as a Windows NT4-style domain controller. A major advantage of this configuration is the ability to centralize user and machine credentials. Samba can also use multiple backends to store the user information. Primary Domain Controller This section covers configuring Samba as a Primary Domain Controller (PDC) using the default smbpasswd backend. First, install Samba, and libpam-winbind to sync the user accounts, by entering the following in a terminal prompt: sudo apt i n s t a l l samba libpam−winbind Next, configure Samba by editing /etc/samba/smb.conf. The security mode should be set to user, and the workgroup should relate to your organization: workgroup = EXAMPLE . . . s e c u r i t y = u s e r In the commented “Domains” section add or uncomment the following (the last line has been split to fit the format of this document): domain l o g o n s = y e s l o g o n path = \\%N\%U\ p r o f i l e l o g o n d r i v e = H: l o g o n home = \\%N\%U 138 l o g o n s c r i p t = l o g o n . cmd add machine s c r i p t = sudo / u s r / s b i n / u s e ra d d −N −g machines −c Machine −d / var / l i b /samba −s / b i n / f a l s e %u Note If you wish to not use Roaming Profiles leave the logon home and logon path options commented. • domain logons: provides the netlogon service causing Samba to act as a domain controller. • logon path: places the user’s Windows profile into their home directory. It is also possible to configure a [profiles] share placing all profiles under a single directory. • logon drive: specifies the home directory local path. • logon home: specifies the home directory location. • logon script: determines the script to be run locally once a user has logged in. The script needs to be placed in the [netlogon] share. • add machine script: a script that will automatically create the Machine Trust Account needed for a workstation to join the domain. In this example the machines group will need to be created using the addgroup utility see ??? for details. Uncomment the [homes] share to allow the logon home to be mapped: [ homes ] comment = Home D i r e c t o r i e s b r o w s e a b l e = no r e a d o n l y = no c r e a t e mask = 0700 d i r e c t o r y mask = 0700 v a l i d u s e r s = %S When configured as a domain controller a [netlogon] share needs to be configured. To enable the share, uncomment: [ n e t l o g o n ] comment = Network Logon S e r v i c e path = / s r v /samba/ n e t l o g o n g u e s t ok = y e s r e a d o n l y = y e s s h a r e modes = no Note The original netlogon share path is /home/samba/netlogon, but according to the Filesystem Hierarchy Standard (FHS), /srv is the correct location for site-specific data provided by the system. Now create the netlogon directory, and an empty (for now) logon.cmd script file: sudo mkdir −p / s r v /samba/ n e t l o g o n sudo touch / s r v /samba/ n e t l o g o n / l o g o n . cmd You can enter any normal Windows logon script commands in logon.cmd to customize the client’s environ- ment. Restart Samba to enable the new domain controller: 139 sudo s y s t e m c t l r e s t a r t smbd . s e r v i c e nmbd . s e r v i c e Lastly, there are a few additional commands needed to setup the appropriate rights. With root being disabled by default, in order to join a workstation to the domain, a system group needs to be mapped to the Windows Domain Admins group. Using the net utility, from a terminal enter: sudo n e t groupmap add ntgroup=”Domain Admins” unixgroup=sysadmin r i d =512 type= d Note Change sysadmin to whichever group you prefer. Also, the user used to join the domain needs to be a member of the sysadmin group, as well as a member of the system admin group. The admin group allows sudo use. If the user does not have Samba credentials yet, you can add them with the smbpasswd utility, change the sysadmin username appropriately: sudo smbpasswd −a sysadmin Also, rights need to be explicitly provided to the Domain Admins group to allow the add machine script (and other admin functions) to work. This is achieved by executing: n e t r p c r i g h t s g r a n t −U sysadmin ”EXAMPLE\Domain Admins” S e M a c h i n e A c c o u n t P r i v i l e g e \ S e P r i n t O p e r a t o r P r i v i l e g e S e A d d U s e r s P r i v i l e g e S e D i s k O p e r a t o r P r i v i l e g e \ SeRemoteShutdownPrivilege You should now be able to join Windows clients to the Domain in the same manner as joining them to an NT4 domain running on a Windows server. Download 1.23 Mb. Do'stlaringiz bilan baham: |
Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling
ma'muriyatiga murojaat qiling