How to set up 2 interfaces’ Samba to AD using Centrify
Applies to: Centrify-Enabled Samba
Question:
How to set up 2 instances of Samba using Centrify ?
Answer:
In order to setup 2 samba instances, separate Active Directory (AD) computer objects needed to be created for each instances.
In below example: 1. Interface eth0 will join to AD as "rh64" and second interface eth1 will join to AD as "rh64_2" 2. One instance will be started using interface eth0 and another instance will be started with eth1.
For the first instance using "eth0":
1. Join the machine normally with adjoin
2. Setup the first samba interface using Centrify adbindproxy.pl. Please find the detailed steps in Centrify Samba Administrator guide provided in the Centrify Samba package.
3. Once the setup has finished, please modify /etc/samba/smb.conf with adding below change.
6. Modify the netbios name in smb2.conf from rh64 to rh64_2 netbios name = rh64_2
7. Create the computer object and save the samba computer password by command:
[root@rh64 Desktop]# net ads join -U administrator -s /etc/samba/smb2.conf Enter administrator's password: Using short domain name -- ALBERT Joined 'RH64_2' to dns domain ‘albert.local'
8. Start the second instance manually by the below commands.
9. Verifying the result: a. First interface samba. Domain=[ALBERT] OS=[Unix] Server=[Samba 3.6.22-cdc-4.5.7-403]
Sharename Type Comment --------- ---- ------- samba-test Disk IPC$ IPC IPC Service (Samba 3.6.22-cdc-4.5.7-403) printer:1 Printer printer mobile Disk Home Directories Domain=[ALBERT] OS=[Unix] Server=[Samba 3.6.22-cdc-4.5.7-403]
Server Comment --------- ------- RH64 Samba 3.6.22-cdc-4.5.7-403
Sharename Type Comment --------- ---- ------- samba-test3 Disk IPC$ IPC IPC Service (Samba 3.6.22-cdc-4.5.7-403) printer:1 Printer printer mobile Disk Home Directories Domain=[ALBERT] OS=[Unix] Server=[Samba 3.6.22-cdc-4.5.7-403]
Server Comment --------- ------- RH64_2 Samba 3.6.22-cdc-4.5.7-403
Workgroup Master --------- ------- ALBERT RH64_2
10. Verifying from windows side.
a. First samba interface:
b. Second samba interface:
Note: 1. The above example is a proof-of-concept only. 2. Please make sure the firewall has been opened if accessing from Windows side has failed. (iptables command will help) 3. The above example was performed in RedHat Systems. The command may varies on different OS. 4. Startup script can be setup by referencing the following wiki page: