Jump to content

Vishal Megamart: Difference between revisions

From TetraWiki
Rahul (talk | contribs)
No edit summary
No edit summary
Line 1: Line 1:
[['''Installing Samba4 AD_DC for Vishal Megamrt''']]
 
== '''Installing Samba4 AD_DC for Vishal Megamrt''' ==
 


----
----
Line 9: Line 11:


https://wiki.samba.org/index.php/Samba_4/OS_Requirements#Red_Hat_Enterprise_Linux_or_CentOS
https://wiki.samba.org/index.php/Samba_4/OS_Requirements#Red_Hat_Enterprise_Linux_or_CentOS
[edit] Initial Requirement Fulfilment
 
== [edit] Initial Requirement Fulfilment ==
 


[root@ldap]# iptables -F
[root@ldap]# iptables -F
Line 17: Line 21:
[root@ldap]# chkconfig iptables off
[root@ldap]# chkconfig iptables off


Install following Dependencies


[root@ldap]# yum install libacl-devel libblkid-devel gnutls-devel readline-devel python-devel gdb pkgconfig krb5-workstation perl gcc zlib-devel setroubleshoot-server setroubleshoot-plugins policycoreutils-python libsemanage-python setools-libs-python setools-libs popt-devel libpcap-devel sqlite-devel libidn-devel libxml2-devel libacl-devel libsepol-devel libattr-devel keyutils-libs-devel cyrus-sasl-devel
== Install following Dependencies ==
 
 
[root@ldap]# yum install libacl-devel libblkid-devel gnutls-devel readline-devel python-devel gdb pkgconfig krb5-workstation perl gcc zlib-devel setroubleshoot-server setroubleshoot-plugins policycoreutils-python libsemanage-python setools-libs-python setools-libs popt-devel libpcap-devel sqlite-devel libidn-devel libxml2-devel libacl-devel libsepol-devel libattr-devel keyutils-libs-devel cyrus-sasl-devel
 
 
== Download Samba ==


Download Samba


http://ftp.samba.org/pub/samba/
http://ftp.samba.org/pub/samba/
Line 27: Line 35:


Untar Samba tar file
Untar Samba tar file
Compile Samba
 
 
== Compile Samba ==
 


To build Samba, run the following command in your samba-master directory:
To build Samba, run the following command in your samba-master directory:


cd samba-master
cd samba-master
./configure --enable-debug --enable-selftest
./configure --enable-debug --enable-selftest
make && make install
make && make install


This will take 1+ hour to complete
This will take 1+ hour to complete
Provision Samba
Provision Samba


Vishal Megamart Environment
Vishal Megamart Environment


Server IP - 10.10.16.61
Server IP - 10.10.16.61
Server FQDN - ldap.tpg.com
Server FQDN - ldap.tpg.com
Server Small name - ldap
Server Small name - ldap


Start By following command  
Start By following command  


How To Install & Configure Samba4


== How To Install & Configure Samba4 ==


[root@ldap]# /usr/local/samba/bin/samba-tool domain provision  
 
Realm [TPG.COM]:  
 
[root@ldap]# /usr/local/samba/bin/samba-tool domain provision  
Realm [TPG.COM]:  
  Domain [TPG]:  
  Domain [TPG]:  
  Server Role (dc, member, standalone) [dc]:  
  Server Role (dc, member, standalone) [dc]:  
  DNS backend (SAMBA_INTERNAL, BIND9_FLATFILE, BIND9_DLZ, NONE) [SAMBA_INTERNAL]:  
  DNS backend (SAMBA_INTERNAL, BIND9_FLATFILE, BIND9_DLZ, NONE) [SAMBA_INTERNAL]:  
  DNS forwarder IP address (write 'none' to disable forwarding) [10.10.16.30]:  
  DNS forwarder IP address (write 'none' to disable forwarding) [10.10.16.30]:  
Administrator password: < p@$$W0RD >
Administrator password: < p@$$W0RD >
Retype password: < p@$$W0RD >
Retype password: < p@$$W0RD >
Looking up IPv4 addresses  
Looking up IPv4 addresses  
More than one IPv4 address found. Using 10.10.16.61
More than one IPv4 address found. Using 10.10.16.61
Looking up IPv6 addresses  
Looking up IPv6 addresses  
No IPv6 address will be assigned  
No IPv6 address will be assigned  
Setting up secrets.ldb  
Setting up secrets.ldb  
Setting up the registry  
Setting up the registry  
Setting up the privileges database  
Setting up the privileges database  
Setting up idmap db  
Setting up idmap db
Setting up SAM db  
Setting up SAM db  
Setting up sam.ldb partitions and settings  
Setting up sam.ldb partitions and settings  
Setting up sam.ldb rootDSE  
Setting up sam.ldb rootDSE  
Pre-loading the Samba 4 and AD schema  
Pre-loading the Samba 4 and AD schema  
Adding DomainDN: DC=tpg,DC=com  
Adding DomainDN: DC=tpg,DC=com  
Adding configuration container  
Adding configuration container  
Setting up sam.ldb schema  
Setting up sam.ldb schema  
Setting up sam.ldb configuration data  
Setting up sam.ldb configuration data  
Setting up display specifiers  
Setting up display specifiers  
Adding users container  
Adding users container  
Modifying users container  
Modifying users container  
Adding computers container  
Adding computers container  
Modifying computers container  
Modifying computers container  
Setting up sam.ldb data  
Setting up sam.ldb data  
Setting up well known security principals  
Setting up well known security principals  
Setting up sam.ldb users and groups  
Setting up sam.ldb users and groups  
Setting up self join  
Setting up self join  
Adding DNS accounts  
Adding DNS accounts  
Creating CN=MicrosoftDNS,CN=System,DC=tpg,DC=com  
Creating CN=MicrosoftDNS,CN=System,DC=tpg,DC=com  
Creating DomainDnsZones and ForestDnsZones partitions  
Creating DomainDnsZones and ForestDnsZones partitions  
Populating DomainDnsZones and ForestDnsZones partitions  
Populating DomainDnsZones and ForestDnsZones partitions  
Setting up sam.ldb rootDSE marking as synchronized  
Setting up sam.ldb rootDSE marking as synchronized  
Fixing provision GUIDs  
Fixing provision GUIDs  
 
A Kerberos configuration suitable for Samba 4 has been generated at /usr/local/samba/private/krb5.conf  
A Kerberos configuration suitable for Samba 4 has been generated at /usr/local/samba/private/krb5.conf  
Once the above files are installed, your Samba4 server will be ready to use  
Once the above files are installed, your Samba4 server will be ready to use  
Server Role:          active directory domain controller
Hostname:              ldap
NetBIOS Domain:        TPG
DNS Domain:            tpg.com
DOMAIN SID:            S-1-5-21-536971849-2238763039-3306137457


Server Role:          active directory domain controller
Hostname:              ldap
NetBIOS Domain:        TPG
DNS Domain:            tpg.com
DOMAIN SID:            S-1-5-21-536971849-2238763039-3306137457


[root@ldap]# /usr/local/samba/sbin/samba


[root@ldap]# /usr/local/samba/bin/smbclient --version
[root@ldap]# /usr/local/samba/sbin/samba
Version 4.0.0


[root@ldap]# /usr/local/samba/bin/smbclient -L localhost -U%
[root@ldap]# /usr/local/samba/bin/smbclient --version
Domain=[TPG] OS=[Unix] Server=[Samba 4.0.0]
Version 4.0.0  


[root@ldap]# /usr/local/samba/bin/smbclient -L localhost -U%
Domain=[TPG] OS=[Unix] Server=[Samba 4.0.0]
Sharename      Type      Comment  
Sharename      Type      Comment  
---------      ----      -------  
---------      ----      -------  
Line 110: Line 126:
sysvol          Disk       
sysvol          Disk       
IPC$            IPC      IPC Service (Samba 4.0.0)  
IPC$            IPC      IPC Service (Samba 4.0.0)  
Domain=[TPG] OS=[Unix] Server=[Samba 4.0.0]  
        Domain=[TPG] OS=[Unix] Server=[Samba 4.0.0]  
 
Server              Comment  
Server              Comment  
---------            -------  
---------            -------  
Workgroup            Master  
Workgroup            Master  
---------            -------  
---------            -------  


[root@ldap]# /usr/local/samba/bin/smbclient //localhost/netlogon -UAdministrator%'Pa$$w0rd' -c 'ls'  
 
Domain=[TPG] OS=[Unix] Server=[Samba 4.0.0]  
[root@ldap]# /usr/local/samba/bin/smbclient //localhost/netlogon -UAdministrator%'Pa$$w0rd' -c 'ls'  
Domain=[TPG] OS=[Unix] Server=[Samba 4.0.0]  
   .                                  D        0  Tue Jan  8 01:41:30 2013  
   .                                  D        0  Tue Jan  8 01:41:30 2013  
   ..                                  D        0  Tue Jan  8 01:41:40 2013  
   ..                                  D        0  Tue Jan  8 01:41:40 2013  
Line 125: Line 140:
60452 blocks of size 1048576. 49834 blocks available  
60452 blocks of size 1048576. 49834 blocks available  


[root@samba ~]# cat /etc/resolv.conf  
[root@samba ~]# cat /etc/resolv.conf  
# Generated by NetworkManager  
# Generated by NetworkManager  
domain tpg.com  
domain tpg.com  
nameserver 10.10.16.61
nameserver 10.10.16.61


[root@ldap ~]# host -t SRV _kerberos._udp.tpg.com.  
[root@ldap ~]# host -t SRV _kerberos._udp.tpg.com.  
_kerberos._udp.tpg.com has SRV record 0 100 88 samba.tpg.com.
_kerberos._udp.tpg.com has SRV record 0 100 88 samba.tpg.com.




[root@ldap ~]# host -t SRV _ldap._tcp.tpg.com  
[root@ldap ~]# host -t SRV _ldap._tcp.tpg.com  
_ldap._tcp.tpg.com has SRV record 0 100 389 samba.tpg.com.
_ldap._tcp.tpg.com has SRV record 0 100 389 samba.tpg.com.


[root@ldap ~]# cp -pvr /usr/local/samba/share/setup/krb5.conf /etc/  
[root@ldap ~]# cp -pvr /usr/local/samba/share/setup/krb5.conf /etc/  
`/usr/local/samba/share/setup/krb5.conf' -> `/etc/krb5.conf'
`/usr/local/samba/share/setup/krb5.conf' -> `/etc/krb5.conf'


[root@ldap ~]# cat /etc/krb5.conf  
[root@ldap ~]# cat /etc/krb5.conf  
[libdefaults]  
[libdefaults]  
default_realm = TPG.COM  
default_realm = TPG.COM  
dns_lookup_realm = false  
dns_lookup_realm = false  
Line 148: Line 163:




[root@ldap ~]# kinit administrator@TPG.COM  
[root@ldap ~]# kinit administrator@TPG.COM  
Password for administrator@TPG.COM:  
Password for administrator@TPG.COM:  
Warning: Your password will expire in 41 days on fri sep 19 22:48:02 2013
Warning: Your password will expire in 41 days on fri sep 19 22:48:02 2013
 
[root@ldap ~]# klist
Ticket cache: FILE:/tmp/krb5cc_0
Default principal: administrator@TPG.COM
Valid starting    Expires            Service principal
01/09/13 00:16:17  01/09/13 10:16:17  krbtgt/TPG.COM@TPG.COM
renew until 01/10/13 00:15:55
 
'''User creation Via Command Line'''


[root@ldap ~]# klist
[root@ldap samba-4.0.0]# /usr/local/samba/bin/samba-tool user add nitesh
Ticket cache: FILE:/tmp/krb5cc_0
New Password: < vrpl@123 >
Default principal: administrator@TPG.COM
Retype Password: < vrpl@123 >
User 'nitesh' created successfully


Valid starting    Expires            Service principal
01/09/13 00:16:17  01/09/13 10:16:17  krbtgt/TPG.COM@TPG.COM
renew until 01/10/13 00:15:55




[root@ldap samba-4.0.0]# /usr/local/samba/bin/samba-tool user add nitesh
New Password: < vrpl@123 >
Retype Password: < vrpl@123 >
User 'nitesh' created successfully


== '''Installing Windows Remote Administration Tools onto Windows''' ==


----
[['''Installing Windows Remote Administration Tools onto Windows''']]


Windows XP Pro
Windows XP Pro
Administration Tools Pack & Support Tools
Administration Tools Pack & Support Tools


    Download adminpak and supporttools from:
Download adminpak and supporttools from:
        http://www.microsoft.com/downloads/en/details.aspx?FamilyID=86b71a4f-4122-44af-be79-3f101e533d95
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=86b71a4f-4122-44af-be79-3f101e533d95
        http://download.microsoft.com/download/3/e/4/3e438f5e-24ef-4637-abd1-981341d349c7/WindowsServer2003-KB892777-SupportTools-x86-ENU.exe  
http://download.microsoft.com/download/3/e/4/3e438f5e-24ef-4637-abd1-981341d349c7/WindowsServer2003-KB892777-SupportTools-x86-ENU.exe  
 
If you installed an older version of the adminpak, you'll notice the dial-in tab
is missing from property pages. Just follow the link above to get SP2 which does
not have this issue.


If you installed an older version of the adminpak, you'll notice the dial-in tab
Run through the installation.
is missing from property pages. Just follow the link above to get SP2 which does
not have this issue.  


    Run through the installation.
Press start->run, type 'dsa.msc', if a window 'active directory users and computers' prompt up, it mean you had install adminpak it successfully. You can also find this at Start>Programs>Administrative Tools, which should have a lot more items now. Go to c:\Program Files\Support Tools to check whether the support tools were installed  correctly; if yes, then your XP workstation is ready to manage the Samba 4 Active Directory.  
    Press start->run, type 'dsa.msc', if a window 'active directory users and computers'
prompt up, it mean you had install adminpak it successfully. You can also find this at Start>Programs>Administrative Tools, which should have a lot more items now.
  Go to c:\Program Files\Support Tools to check whether the support tools were installed  
  correctly; if yes, then your XP workstation is ready to manage the Samba 4 Active Directory.  


Group Policy Management Console
Group Policy Management Console


    You may also find the Group Policy Management Console useful. You can download it from
You may also find the Group Policy Management Console useful. You can download it from
http://www.microsoft.com/downloads/details.aspx?FamilyId=0A6D4C24-8CBD-4B35-9272-DD3CBFC81887&displaylang=en  
http://www.microsoft.com/downloads/details.aspx?FamilyId=0A6D4C24-8CBD-4B35-9272-DD3CBFC81887&displaylang=en  


This is primarily useful when you have larger installs and are managing many machines.
This is primarily useful when you have larger installs and are managing many machines.
You may need to download the '''.NET Framework 1.1''' first.
You may need to download the '''.NET Framework 1.1''' first.

Revision as of 11:13, 25 May 2013

Installing Samba4 AD_DC for Vishal Megamrt


Reference Document

https://wiki.samba.org/index.php/Samba4/HOWTO

https://wiki.samba.org/index.php/Samba4/InitScript

https://wiki.samba.org/index.php/Samba_4/OS_Requirements#Red_Hat_Enterprise_Linux_or_CentOS

[edit] Initial Requirement Fulfilment

[root@ldap]# iptables -F

[root@ldap]# service iptables stop

[root@ldap]# chkconfig iptables off


Install following Dependencies

[root@ldap]# yum install libacl-devel libblkid-devel gnutls-devel readline-devel python-devel gdb pkgconfig krb5-workstation perl gcc zlib-devel setroubleshoot-server setroubleshoot-plugins policycoreutils-python libsemanage-python setools-libs-python setools-libs popt-devel libpcap-devel sqlite-devel libidn-devel libxml2-devel libacl-devel libsepol-devel libattr-devel keyutils-libs-devel cyrus-sasl-devel


Download Samba

http://ftp.samba.org/pub/samba/ Installation of Samba 4

Untar Samba tar file


Compile Samba

To build Samba, run the following command in your samba-master directory:

cd samba-master
./configure --enable-debug --enable-selftest
make && make install

This will take 1+ hour to complete

Provision Samba

Vishal Megamart Environment

Server IP - 10.10.16.61
Server FQDN - ldap.tpg.com
Server Small name - ldap

Start By following command


How To Install & Configure Samba4

[root@ldap]# /usr/local/samba/bin/samba-tool domain provision 
Realm [TPG.COM]: 
Domain [TPG]: 
Server Role (dc, member, standalone) [dc]: 
DNS backend (SAMBA_INTERNAL, BIND9_FLATFILE, BIND9_DLZ, NONE) [SAMBA_INTERNAL]: 
DNS forwarder IP address (write 'none' to disable forwarding) [10.10.16.30]: 
Administrator password: < p@$$W0RD >
Retype password: < p@$$W0RD >
Looking up IPv4 addresses 
More than one IPv4 address found. Using 10.10.16.61
Looking up IPv6 addresses 
No IPv6 address will be assigned 
Setting up secrets.ldb 
Setting up the registry 
Setting up the privileges database 
Setting up idmap db  
Setting up SAM db 
Setting up sam.ldb partitions and settings 
Setting up sam.ldb rootDSE 
Pre-loading the Samba 4 and AD schema 
Adding DomainDN: DC=tpg,DC=com 
Adding configuration container 
Setting up sam.ldb schema 
Setting up sam.ldb configuration data 
Setting up display specifiers 
Adding users container 
Modifying users container 
Adding computers container 
Modifying computers container 
Setting up sam.ldb data 
Setting up well known security principals 
Setting up sam.ldb users and groups 
Setting up self join 
Adding DNS accounts 
Creating CN=MicrosoftDNS,CN=System,DC=tpg,DC=com 
Creating DomainDnsZones and ForestDnsZones partitions 
Populating DomainDnsZones and ForestDnsZones partitions 
Setting up sam.ldb rootDSE marking as synchronized 
Fixing provision GUIDs 

A Kerberos configuration suitable for Samba 4 has been generated at /usr/local/samba/private/krb5.conf

Once the above files are installed, your Samba4 server will be ready to use

Server Role:           active directory domain controller 
Hostname:              ldap 
NetBIOS Domain:        TPG 
DNS Domain:            tpg.com 
DOMAIN SID:            S-1-5-21-536971849-2238763039-3306137457 


[root@ldap]# /usr/local/samba/sbin/samba 
[root@ldap]# /usr/local/samba/bin/smbclient --version 
Version 4.0.0 
[root@ldap]# /usr/local/samba/bin/smbclient -L localhost -U% 
Domain=[TPG] OS=[Unix] Server=[Samba 4.0.0] 

Sharename Type Comment --------- ---- ------- netlogon Disk sysvol Disk IPC$ IPC IPC Service (Samba 4.0.0)

       Domain=[TPG] OS=[Unix] Server=[Samba 4.0.0] 

Server Comment --------- ------- Workgroup Master --------- -------


[root@ldap]# /usr/local/samba/bin/smbclient //localhost/netlogon -UAdministrator%'Pa$$w0rd' -c 'ls' 
Domain=[TPG] OS=[Unix] Server=[Samba 4.0.0] 
 .                                   D        0  Tue Jan  8 01:41:30 2013 
 ..                                  D        0  Tue Jan  8 01:41:40 2013 

60452 blocks of size 1048576. 49834 blocks available

[root@samba ~]# cat /etc/resolv.conf 
# Generated by NetworkManager 
domain tpg.com 
nameserver 10.10.16.61
[root@ldap ~]# host -t SRV _kerberos._udp.tpg.com. 
_kerberos._udp.tpg.com has SRV record 0 100 88 samba.tpg.com.


[root@ldap ~]# host -t SRV _ldap._tcp.tpg.com 

_ldap._tcp.tpg.com has SRV record 0 100 389 samba.tpg.com.

[root@ldap ~]# cp -pvr /usr/local/samba/share/setup/krb5.conf /etc/ 
`/usr/local/samba/share/setup/krb5.conf' -> `/etc/krb5.conf'
[root@ldap ~]# cat /etc/krb5.conf 
[libdefaults] 

default_realm = TPG.COM dns_lookup_realm = false dns_lookup_kdc = true


[root@ldap ~]# kinit administrator@TPG.COM 
Password for administrator@TPG.COM: 
Warning: Your password will expire in 41 days on fri sep 19 22:48:02 2013
[root@ldap ~]# klist 
Ticket cache: FILE:/tmp/krb5cc_0 
Default principal: administrator@TPG.COM 
Valid starting     Expires            Service principal 
01/09/13 00:16:17  01/09/13 10:16:17  krbtgt/TPG.COM@TPG.COM 

renew until 01/10/13 00:15:55

User creation Via Command Line

[root@ldap samba-4.0.0]# /usr/local/samba/bin/samba-tool user add nitesh
New Password: < vrpl@123 >
Retype Password: < vrpl@123 >
User 'nitesh' created successfully 



Installing Windows Remote Administration Tools onto Windows

Windows XP Pro Administration Tools Pack & Support Tools

Download adminpak and supporttools from: http://www.microsoft.com/downloads/en/details.aspx?FamilyID=86b71a4f-4122-44af-be79-3f101e533d95 http://download.microsoft.com/download/3/e/4/3e438f5e-24ef-4637-abd1-981341d349c7/WindowsServer2003-KB892777-SupportTools-x86-ENU.exe

If you installed an older version of the adminpak, you'll notice the dial-in tab is missing from property pages. Just follow the link above to get SP2 which does not have this issue.

Run through the installation.

Press start->run, type 'dsa.msc', if a window 'active directory users and computers' prompt up, it mean you had install adminpak it successfully. You can also find this at Start>Programs>Administrative Tools, which should have a lot more items now. Go to c:\Program Files\Support Tools to check whether the support tools were installed correctly; if yes, then your XP workstation is ready to manage the Samba 4 Active Directory.

Group Policy Management Console

You may also find the Group Policy Management Console useful. You can download it from http://www.microsoft.com/downloads/details.aspx?FamilyId=0A6D4C24-8CBD-4B35-9272-DD3CBFC81887&displaylang=en

This is primarily useful when you have larger installs and are managing many machines. You may need to download the .NET Framework 1.1 first.