Jump to content

Vishal Megamart: Difference between revisions

From TetraWiki
No edit summary
 
Line 25: Line 25:




  [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
  [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 ==

Latest revision as of 11:14, 25 May 2013

Installing Samba4 AD_DC for Vishal Megamrt[edit]


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[edit]

[root@ldap]# iptables -F

[root@ldap]# service iptables stop

[root@ldap]# chkconfig iptables off


Install following Dependencies[edit]

[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[edit]

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

Untar Samba tar file


Compile Samba[edit]

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[edit]

[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[edit]

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.