Wednesday, March 1, 2017

CCcam cardsharing

  • Question: What is CCcam cardsharing?
Answer: Card sharing a is method of sharing a paid subscription card over the internet. Person 1 has a paid subscription to a tv package EG sky uk. Person 1 also receives Sky Italia from abroad but cannot watch them as it is not possible to subscribe to that particular package due to territorial boundries. Person 2 has a subscription to sky italia, he also receives sky uk on his satellite but cannot watch it as it is encrypted and he cannot subscribe due to territorial boundries. This is where card sharing come into effect. person 1 & 2 both own linux cardsharing boxes (ie dreambox VU Duo etc), so therefore they can create a newtwork for each other to join. Being connected to each other through the internet means that person 1 can use person 2`s card as if it was his own and can now decrypt the sky italia stations he could not before. Person 2 can now also watch sky uk in italy with person 1`s card.

Your dreambox needs a fixed ip. The setup of this is different for each router so it is recommended you consult you router documentation. Basically every time your box is switched on it MUST be assigned the same IP otherwise your peers will not find you (where the router assigns the ip this is known as DHCP)

Another way to do this is to assign a static ip from the box itself. Go to setup - system setting - network and turn DHCP off. Enter the ip you wish to use and this way the box will tell the router what ip it is taking rather than the router assigning an ip.

When you have this set up you will need to forward a port to the static address you have assigned to the dreambox
go to http://www.canyouseeme.org and enter the port number you selected into the box

Next you will want to get some shares and get started with your F & C Lines. To share you with a friend you need to create 2 lines. An Fline for your own box and a Cline to give to your client for his box. Your lines will look something like this
F: USER PASS 2 0 0 { 0:0:2 } 
C: 80.97.243.65 12000 USER PASS 

80.97.243.65 This is your ip address. To use Ip addresses for shares you need to have a static ip address (most broadband providors do not give static ip addresses and change your ip regularly). Check with them and see if you can get a static. If they dont do this or want to charge you extra you can set an DNS account instead and download dns updater. The dns updater will track your ip and will update as necessary. If you set up a dns you cline will change to comething like this: 
C: anyone.dyndns.org 12000 USER PASS 
You can join dyndns here http://www.dyndns.com
And download the dns updater here http://www.dyndns.com/support/clients/windows.html

When you have created your lines give your client the cline and put the fline in your cccam.cfg. this can be found on DCC by browsing to: FTP- VAR- ETC- cccam.cfg

http://xcccamx.blogspot.com.tr/2013/09/beginers-guide-to-cccam-cardsharing.html

  •  Satellite TV systems also require a landline phone connection for downloading periodic updates associated with the interactive on-screen program guide as well as pay-per-view service information
 A modem inside the satellite receiver makes a short duration toll-free call to the service provider computer system; 
 Satellite TV decoders de-scramble encrypted satellite TV signals and deliver them usable to satellite TV subscribers. For this purpose, satellite TV decoders incorporate a conditional access module (CAM) with a built-in card reader.
 satellite TV receivers with HD support, built-in hard-drive, and a full range of digital video recording (DVR) features to record movies and TV shows.

Friday, February 24, 2017

encryption tools


  • AxCrypt is a free, open source, GNU GPL-licensed encryption tool for Windows that prides itself on being simple, efficient, and easy to use.
It supports 128-bit AES encryption only, offers protection against brute force cracking attempts, and is exceptionally lightweight (less than 1MB.)

  • 7-Zip is actually a lightweight file archiver. It's completely free, even for commercial use, supports 256-bit AES encryption, and while the official download is Windows only, there are unofficial builds for Linux and OS X systems as well

  • VeraCrypt is a fork of and a successor to TrueCrypt, which ceased development last year.VeraCrypt supports AES (the most commonly used), TwoFish, and Serpent encryption ciphers, supports the creation of hidden, encrypted volumes within other volumes
http://lifehacker.com/five-best-file-encryption-tools-5677725


  • AES Crypt
Platforms: Windows, OSX, Linux (Crypt4All Lite for Android is compatible).This very easy to use Java based file encryption program integrates with the OS, providing simple file encryption using the right-click menu button (Windows and Linux, or drag and drop for OSX).

  • DiskCryptor
Encryption: AES_256, Twofish and Serpent.DiskCryptor is a full disk encryption program for Windows that allows you to encrypt hard drives (including CD’s USB sticks etc.), or individual partitions, including the ability to encrypt the partition and disk on which Windows is installed.

  • EncFS
EncFS creates an encrypted volume, which is typically stored in a cloud storage folder (e.g. Dropbox) for easy cloud synching. This folder can be mounted locally as virtual drive, from where files can be accessed unencrypted, just as if they were files in a regular folder.


  • dm-Crypt/LUKS
LUKS (Linux Unified Key Setup) is the standard for Linux hard disk encryption. It is built-in to most Linux distros, and can be used with the dm-crypt subsystem to provide transparent full disk encryption.

  • Secrecy
This promising new Android app lets you create password protected vaults in which you can store any kind of file (including local Google Docs). 
https://www.bestvpn.com/blog/10995/6-best-open-source-alternatives-to-truecrypt/

Forensic art

  • Age progression portraits
http://loisgibson.com/sketches.asp
  • Forensic art is any art used in law enforcement or legal proceedings. Within this field are such skills as composite drawing, crime scene sketching, image modification and image identification, courtroom drawings, demonstrative evidence, and postmortem and facial approximation aids
https://en.wikipedia.org/wiki/Forensic_arts

Data Recovery

  • TestDisk
TestDisk is powerful free data recovery software! It was primarily designed to help recover lost partitions and/or make non-booting disks bootable again when these symptoms are caused by faulty software: certain types of viruses or human error (such as accidentally deleting a Partition Table). Partition table recovery using TestDisk is really easy. 
http://www.cgsecurity.org/wiki/TestDisk

  • ddrescue is frequently recommended for hard drive cloning, as it is a powerful, free data recovery utility and included by default in many Linux distributions
it doesn’t truncate files or write zeroes to its output file, it can be run successively to fill in bad sectors that were missed in earlier passes.
it is an effective option for restoring low-priority data from a failing hard disk.
ddrescue should not be used on hard drives that make excessive sounds or that show any other signs of permanent damage
Before starting this process, you will need a copy of ddrescue (preferably on a CD or DVD), a fully functional hard drive, and the damaged drive. 

To image from disk to disk:
root# ddrescue -f -n /dev/[baddrive] /dev/[gooddrive] /root/recovery.log


To image from disk to image file:
root# ddrescue -f -n /dev/[baddrive] /root/[imagefilename].img /root/recovery.log

https://datarecovery.com/rd/how-to-clone-hard-disks-with-ddrescue/

  • a system rescue disk for Linux that can be used as a bootable USB stick or CD.
http://www.system-rescue-cd.org/

  • Data recovery techniques are used to recover information that has been deleted or compromised
Data recovery techniques are often a major part of computer forensics.
When data is removed from a system it is either deleted or overwritten.
Just because a file is deleted that does not mean the data is gone. 
The Operating System simply removes the pointer from the file, but the data is still there

Data is recorded onto magnetic media by using ones and zeroes.
When the data is overwritten, the disk will only detect the new data leaving only remnants of the old data
The time to read the remnants would be very time consuming and all the old data would not be read correctly.
This would cause a very problematic and impossible puzzle to solve


Techniques
Perform a forensic analysis of the computer
Search for one file or a single file type
Attack encryption methods
Restore disk using an existing image
Examine data in RAM
Examine disk at the cluster or sector level
Analyze data using hex editor
Create hash of entire disk,Export for use in another tool

Types of Damage
Physical Damage
Logical Damage

Logical damage is primarily caused by power outages that does not allow the file to be completely written to the storage device.
Some Results are:
File is left in an inconsistent state
DATA totally lost
Cause the system to crash
Strange behavior
Partial storage

Methods exist than can make data recovery very difficult or impossible.
These methods should be used to secure financial information, medical records, or classified data

Techniques to Prevent Recovery
Write over deleted space with random data
1s and 0s
Make space appear random
Use a unique or uncommon algorithm
Some recovery tools can reverse the algorithm and recover the data

Use a tool to “wipe” data securely
Automates process of covering up deleted data
Tools are available to End User
Sometimes included with security software suites

Data Recovery Techniques
Florida State University
CIS 4360 – Computer Security
Fall 2006
https://www.google.com.tr/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0ahUKEwiar9OagYnXAhWjQZoKHeGKBmUQFggnMAA&url=http%3A%2F%2Fwww.cs.fsu.edu%2F~burmeste%2FCIS4360%2FFall2006%2FprojectPresentations%2FDataRecoveryTeq.ppt&usg=AOvVaw1TEZ2Rd2b52q0IQmvzgNxN

windows tools

  • Portqry.exe is a command-line utility that you can use to help troubleshoot TCP/IP connectivity issues. Portqry.exe runs on Windows 2000-based computers, on Windows XP-based computers, and on Windows Server 2003-based computers. The utility reports the port status of TCP and UDP ports on a computer that you select.
https://support.microsoft.com/en-us/help/310099/description-of-the-portqry.exe-command-line-utility

  • NBLookup is a command line diagnostic tool that uses the User Datagram Protocol (UDP) to send NetBIOS name queries to Microsoft Windows Internet Naming Service (WINS) servers. NBLookup requires TCP/IP version 4 to run. WINS servers accept name resolution requests on UDP port 137.
https://support.microsoft.com/en-us/help/830578/nblookup.exe-command-line-tool

Enabling and Managing the Active Directory Recycle Bin Using Active Directory Administrative Center

  • Capabilities
    The Windows Server 2012 Active Directory Administrative Center enables you to configure and manage the Active Directory Recycle Bin for any domain partition in a forest. There is no longer a requirement to use Windows PowerShell or Ldp.exe to enable the Active Directory Recycle Bin or restore objects in domain partitions.
    The Active Directory Administrative Center has advanced filtering criteria, making targeted restoration easier in large environments with many intentionally deleted objects. 
Limitations
    Because the Active Directory Administrative Center can only manage domain partitions, it cannot restore deleted objects from the Configuration, Domain DNS, or Forest DNS partitions (you cannot delete objects from the Schema partition). To restore objects from non-domain partitions, use Restore-ADObject.
    The Active Directory Administrative Center cannot restore sub-trees of objects in a single action. For example, if you delete an OU with nested OUs, users, groups, and computers, restoring the base OU does not restore the child objects. 
    https://technet.microsoft.com/windows-server-docs/identity/ad-ds/get-started/adac/advanced-ad-ds-management-using-active-directory-administrative-center--level-200-

Sunday, August 7, 2016

Flexible Single Master Operator (FSMOwi)


  • FSMO


Acronym for Flexible Single Master Operator. These are roles that are assigned only to designated domain controllers, either one in each domain, or one in the forest. The five FSMO roles are:

    Schema Master (one for the forest)
    Domain Naming Master (one for the forest)
    PDC Emulator (one for each domain)
    RID Master (one for each domain)
    Infrastructure Master (one for each domain)

Schema Master
The Schema Master role holder is the domain controller that can make changes to the Schema. One domain controller in the forest must hold this role. One of the five Flexible Single Master Operator roles (FSMO).

 
Infrastructure Master
The Infrastructure Master role holder is the domain controller that maintains references, called phantoms, to objects in other domains. One domain controller in each domain must hold this role. One of the five Flexible Single Master Operator (FSMO) roles.

RID Master
The RID Master role holder is the domain controller responsible for assigning pools of RID's to all domain controllers in the domain. A RID is required whenever a security principal is created in Active Directory. One domain controller in each domain must hold this role. One of the five Flexible Single Master Operator roles (FSMO).
Security Principal
An object in Active Directory to which security can be applied. A security principal must have the objectSID attribute, so it can be the trustee in an Access Control Entry (ACE).
RID
Acronym for Relative IDentifier. All security principals (users, computers, and groups) in Active Directory have a Security ID (SID). SID values include several components, including the RID. The SID without the RID is the same for all objects in a domain. The RID value uniquely identifies the object in the domain

PDC Emulator
The PDC Emulator role holder acts as the Windows NT Primary Domain Controller (PDC) for backward compatibility. It also is used to forward password changes immediately to other domain controllers and serves as the primary time source for the domain. The PDC Emulator is also targeted by most Group Policy tools. One domain controller in each domain must hold this role. One of the five Flexible Single Master Operator roles (FSMO).

Domain Naming Master
The Domain Naming Master role holder is the domain controller that controls changes to the forest-wide namespace. One of the five Flexible Single Master Operator (FSMO) roles. The domain controller with this role can add, remove, rename, or move domains in the forest. It is also required to create application partitions. One domain controller in the forest must hold this role.
http://social.technet.microsoft.com/wiki/contents/articles/16757.active-directory-glossary.aspx#FSMO



  • How to find out who has your FSMO Roles?


1-The easy way:
NetDOM /query FSMO

2-The Common way:
How to Determine the RID, PDC, and Infrastructure FSMO Holders of a Selected Domain
1. Click Start, click Run, type dsa.msc, and then click OK.
2. Right-click the selected Domain Object in the top left pane, and then click Operations Masters.
3. Click the PDC tab to view the server holding the PDC master role.
4. Click the Infrastructure tab to view the server holding the Infrastructure master role.
5. Click the RID Pool tab to view the server holding the RID master role.

How to Determine the Schema FSMO Holder in a Forest
1. Click Start, click Run, type mmc, and then click OK.
2. On the Console menu, click Add/Remove Snap-in, click Add, double-click Active Directory Schema, click Close, and then click OK.
3. Right-click Active Directory Schema in the top left pane, and then click Operations Masters to view the server holding the schema master role.
NOTE: For the Active Directory Schema snap-in to be available, you may have to register the Schmmgmt.dll file. To do this, click Start, click Run, type regsvr32 schmmgmt.dll in the Open box, and then click OK. A message is displayed that states the registration was successful.

How to Determine the Domain Naming FSMO Holder in a Forest
1. Click Start, click Run, type mmc, and then click OK.
2. On the Console menu, click Add/Remove Snap-in, click Add, double-click Active Directory Domains and Trusts, click Close, and then click OK.
3. In the left pane, click Active Directory Domains and Trusts.
4. Right-click Active Directory Domains and Trust, and then click Operations Master to view the server holding the domain naming master role in the Forest.


https://blogs.technet.microsoft.com/mempson/2007/11/08/how-to-find-out-who-has-your-fsmo-roles



  • How To Find Servers That Hold Flexible Single Master Operations Roles

    How to Determine the RID, PDC, and Infrastructure FSMO Holders of a Selected Domain
    How to Determine the Schema FSMO Holder in a Forest
    How to Determine the Domain Naming FSMO Holder in a Forest
    Using the Windows 2000 Server Resource Kit
    Using the NTDSUTIL Tool
    Using DCDIAG
https://support.microsoft.com/en-us/kb/234790



  • the domain controller that actually performs a single master operation is the

domain controller that currently holds the operation’s token, or the “role holder.”
An operation token, and thus the role, can be transferred easily to another domain
controller without a reboot.

AD DS contains five operations master roles. Two roles are performed for the
entire forest, and two roles are performed by three roles for each domain.
Forest Roles (two roles):

    Domain naming
    Schema

Domain Roles (three roles):

    Relative identifier (RID)
    Infrastructure
    PDC Emulator


RID Master Role
Because any domain controller can create
accounts, and therefore, SIDs, a mechanism is necessary to ensure that the SIDs
generated by a DC are unique. Active Directory domain controllers generate SIDs
by assigning a unique RID to the domain SID. The RID master for the domain
allocates pools of unique RIDs to each domain controller in the domain. Thus,
each domain controller can be confident that the SIDs it generates are unique.
Note:

The RID master role is like DHCP for SIDs. If you are familiar with the concept that
you allocate a scope of IP addresses for the Dynamic Host Configuration Protocol (DHCP) server to assign to clients, you can draw a parallel to the RID master, which allocates pools of RIDs to domain controllers for the creation of SIDs

Infrastructure Master Role
In a multidomain environment, it’s common for an object to reference objects in other domains. For example, a group can include members from another domain
You can think of the infrastructure master as a tracking device for group members from other domains. When those members are renamed or moved in the other domain, the infrastructure master identifies the change and makes appropriate changes to group memberships so that the memberships are kept up to date.

This role only pertains in a multi-domain forest. The infrastructure master if running on the same DC as a GC, will conflict and cause the infrastructure master role to fail its intended purpose


PDC Emulator Role
 Emulates a Primary Domain Controller (PDC) for backward compatibility

 Participates in special password update handling for the domain
  If a user attempts to log on immediately after
changing passwords, the domain controller responding to the user’s logon
request might not know about the new password. Before it rejects the logon
attempt, that domain controller forwards the authentication request to a PDC
emulator, which verifies that the new password is correct and instructs the
domain controller to accept the logon request

 Manages Group Policy updates within a domain
  When you open a GPO in
the Group Policy Management Editor (GPME), the GPME binds to the domain
controller performing the PDC emulator role. Therefore, all changes to GPOs
are made on the PDC emulator by default.

Provides a master time source for the domain
Active Directory, Kerberos, File Replication Service (FRS), and DFS-R each rely
on timestamps, so synchronizing the time across all systems in a domain is
crucial. The PDC emulator in the forest root domain is the time master for the
entire forest, by default. The PDC emulator in each domain synchronizes its
time with the forest root PDC emulator. Other domain controllers in the
domain synchronize their clocks against that domain’s PDC emulator. All
other domain members synchronize their time with their preferred domain
controller. This hierarchical structure of time synchronization, all implemented
through the Win32Time service, ensures consistency of time. Universal
Coordinated Time (UTC) is synchronized, and the time displayed to users is
adjusted based on the time zone setting of the computer.
 
http://blogs.msmvps.com/acefekay/2011/01/16/active-directory-fsmo-roles-explained



  • Depending on the FSMO role that you want to transfer, you can use one of the following three MMC snap-in tools:

Active Directory Schema snap-in
Active Directory Domains and Trusts snap-in
Active Directory Users and Computers snap-in
https://support.microsoft.com/en-us/kb/324801

Active Directory Migration from Windows Server 2008 R2 to Windows Server 2012 R2


  • Step-By-Step: Active Directory Migration from Windows Server 2008 R2 to Windows Server 2012 R2


With the end of support for Windows Server 2003
As mentioned, Windows Server 2012 R2 provides a great first step towards cloud adoption. In addition to this the ability to allow your organization to take advantage of capabilities such as Active Directory Recycle Bin improvements, DHCP failover, Dynamic Access Control, Hyper-V replication and much more.
Migrating Active Directory off your existing Windows 2008 R2 server and onto a new Windows 2012 R2


Prerequisites
    Download Windows Server 2012 R2. You also have the ability to complete this Step-By-Step in a virtual lab by downloading Hyper-V Server 2012 for free.
    As a precaution, complete a full backup of your existing server.
    Check the Schema version of AD DS (Before adprep) by running regedit, navigating to Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\NTDS\Parameters and noting the current Schema version.

Step 1: Preparing your existing forest via the adprep command
    Insert the Windows Server 2012 DVD into the DVD drive of the Windows Server 2008 R2 AD DS.
    Open command prompt, and type adprep /forestprep and press enter.
    Check the Schema version of AD DS (After adprep) by running regedit, navigating to Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\NTDS\Parameters and noting the current Schema version.
 
Step 2: Promoting the Windows Server 2012 Server domain controller

Step 3: Verify the new Windows Server 2012 Domain Controller
    Open Active Directory Users and Computers, expand <Your Domain> and click the Domain Controller OU to verify your server is listed.  
    Open DNS Manager, right-click on <Your Domain>, select Properties and then click Name Servers Tab. Verify that your server is listed in Name Servers: lists.  
    Open Active Directory Sites and Services; verify that your server is listed in Servers under Default-First-Site-Name.

Step 4: Transferring the Flexible Single Master Operations (FSMO) Role
    Open the Active Directory Users and Computers console on your new Windows Server 2012 computer.  
    Right click your domain and select Operations Masters in the sub menu.  
    In the Operations Masters window, ensure the RID tab is selected.  
    Select the Change button.
    Select Yes when asked about transferring the operations master role.
Once the operations master role has successfully transferred, click OK to continue.
Ensure the Operations Master box now shows your new 2012 Windows Server.
Repeat steps 4 to 6 for the PDC and Infrastructure tabs.
Once completed, click Close to close the Operations Masters window.
Close the Active Directory Users and Computers window.  

Step 5: Removing the Windows 2008 R2 domain controller
    On the Windows 2008 R2 server click Start, Click Run, type dcpromo, then click OK.  
    After the Welcome to the Active Directory Installation Wizard page, be sure to leave the Delete the domain because this server is the last domain controller in the domain unchecked.  
    On the Administrator Password Page, enter your password and click Next.  
    On the Summary page, click Next, wait for the process to end, then click Finish.  
    On the Completing the Active Directory Domain Services Installation Wizard, click Finish.  
    On the Active Directory Domain Services Installation Wizard page, click Restart Now to Restart the server.  
    After the reboot is completed, delete the Windows Server 2008 R2 server from the domain to a workgroup and remove any unnecessary record from Active Directory Sites and Services.


https://blogs.technet.microsoft.com/canitpro/2014/05/27/step-by-step-active-directory-migration-from-windows-server-2008-r2-to-windows-server-2012-r2/


Verify the schema version
Note - You can verify the schema version using dsquery * cn=schema,cn=configuration,dc=sivarajan,dc=com -scope base -attr objectVersion command. The following table lists the Active Directory Schema and the corresponding Object Version:

Active Directory Object Version
Windows 2000 13
Windows 2003 30
Windows 2003 R2 31
Windows 2008 44
Windows 2008 R2 47
Windows 8 Beta 52
Windows 2012 56
Windows 2012 R2 69

Check the Schema version of AD DS (After adprep) by running regedit, navigating to Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\NTDS\Parameters and noting the current Schema version.




  • View Active Directory schema version


1-You can use registry too:
HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Parame ters\SchemaVersion

2-the objectVersion in ADSIEdit.

3-"dsquery * cn=schema,cn=configuration,dc=domainname,dc=local -scope base -attr objectVersion"

https://social.technet.microsoft.com/Forums/windowsserver/en-US/45f8e9b9-07b9-4af7-9eba-d87169dccc22/view-active-directory-schema-version?forum=winserverDS



  • Active Directory: Active Directory Upgrade - High Level Steps


Upgrade schema
Upgrade the schema using correct version of OS – Adprep

Verify the schema version

Add additional DC
New server
Install a new server with correct version of OS and join this server to the existing domain

Promote DC
Perform DCPRMO on this server and select Additional Domain Controller for an existing Domain option.

Transfer Roles
If you are planning to decommission the old servers, you need transfer FSMO roles, DHCP etc to the new server.
You can identify the FSMO role DC information using Netdom /Query FSMO command.

Decommission old DC
You can remove (demote) a domain controller using DCPROMO command and again
http://social.technet.microsoft.com/wiki/contents/articles/2903.active-directory-active-directory-upgrade-high-level-steps.aspx

Active Directory Migration from Windows Server 2008 R2 to Windows Server 2012 R2


  • Step-By-Step: Active Directory Migration from Windows Server 2008 R2 to Windows Server 2012 R2


With the end of support for Windows Server 2003
As mentioned, Windows Server 2012 R2 provides a great first step towards cloud adoption. In addition to this the ability to allow your organization to take advantage of capabilities such as Active Directory Recycle Bin improvements, DHCP failover, Dynamic Access Control, Hyper-V replication and much more.
Migrating Active Directory off your existing Windows 2008 R2 server and onto a new Windows 2012 R2


Prerequisites
    Download Windows Server 2012 R2. You also have the ability to complete this Step-By-Step in a virtual lab by downloading Hyper-V Server 2012 for free.
    As a precaution, complete a full backup of your existing server.
    Check the Schema version of AD DS (Before adprep) by running regedit, navigating to Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\NTDS\Parameters and noting the current Schema version.

Step 1: Preparing your existing forest via the adprep command
    Insert the Windows Server 2012 DVD into the DVD drive of the Windows Server 2008 R2 AD DS.
    Open command prompt, and type adprep /forestprep and press enter.
    Check the Schema version of AD DS (After adprep) by running regedit, navigating to Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\NTDS\Parameters and noting the current Schema version.
 
Step 2: Promoting the Windows Server 2012 Server domain controller

Step 3: Verify the new Windows Server 2012 Domain Controller
    Open Active Directory Users and Computers, expand <Your Domain> and click the Domain Controller OU to verify your server is listed.  
    Open DNS Manager, right-click on <Your Domain>, select Properties and then click Name Servers Tab. Verify that your server is listed in Name Servers: lists.  
    Open Active Directory Sites and Services; verify that your server is listed in Servers under Default-First-Site-Name.

Step 4: Transferring the Flexible Single Master Operations (FSMO) Role
    Open the Active Directory Users and Computers console on your new Windows Server 2012 computer.  
    Right click your domain and select Operations Masters in the sub menu.  
    In the Operations Masters window, ensure the RID tab is selected.  
    Select the Change button.
    Select Yes when asked about transferring the operations master role.
Once the operations master role has successfully transferred, click OK to continue.
Ensure the Operations Master box now shows your new 2012 Windows Server.
Repeat steps 4 to 6 for the PDC and Infrastructure tabs.
Once completed, click Close to close the Operations Masters window.
Close the Active Directory Users and Computers window.  

Step 5: Removing the Windows 2008 R2 domain controller
    On the Windows 2008 R2 server click Start, Click Run, type dcpromo, then click OK.  
    After the Welcome to the Active Directory Installation Wizard page, be sure to leave the Delete the domain because this server is the last domain controller in the domain unchecked.  
    On the Administrator Password Page, enter your password and click Next.  
    On the Summary page, click Next, wait for the process to end, then click Finish.  
    On the Completing the Active Directory Domain Services Installation Wizard, click Finish.  
    On the Active Directory Domain Services Installation Wizard page, click Restart Now to Restart the server.  
    After the reboot is completed, delete the Windows Server 2008 R2 server from the domain to a workgroup and remove any unnecessary record from Active Directory Sites and Services.


https://blogs.technet.microsoft.com/canitpro/2014/05/27/step-by-step-active-directory-migration-from-windows-server-2008-r2-to-windows-server-2012-r2/


Verify the schema version
Note - You can verify the schema version using dsquery * cn=schema,cn=configuration,dc=sivarajan,dc=com -scope base -attr objectVersion command. The following table lists the Active Directory Schema and the corresponding Object Version:

Active Directory Object Version
Windows 2000 13
Windows 2003 30
Windows 2003 R2 31
Windows 2008 44
Windows 2008 R2 47
Windows 8 Beta 52
Windows 2012 56
Windows 2012 R2 69

Check the Schema version of AD DS (After adprep) by running regedit, navigating to Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\NTDS\Parameters and noting the current Schema version.




  • View Active Directory schema version


1-You can use registry too:
HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Parame ters\SchemaVersion

2-the objectVersion in ADSIEdit.

3-"dsquery * cn=schema,cn=configuration,dc=domainname,dc=local -scope base -attr objectVersion"

https://social.technet.microsoft.com/Forums/windowsserver/en-US/45f8e9b9-07b9-4af7-9eba-d87169dccc22/view-active-directory-schema-version?forum=winserverDS



  • Active Directory: Active Directory Upgrade - High Level Steps


Upgrade schema
Upgrade the schema using correct version of OS – Adprep

Verify the schema version

Add additional DC
New server
Install a new server with correct version of OS and join this server to the existing domain

Promote DC
Perform DCPRMO on this server and select Additional Domain Controller for an existing Domain option.

Transfer Roles
If you are planning to decommission the old servers, you need transfer FSMO roles, DHCP etc to the new server.
You can identify the FSMO role DC information using Netdom /Query FSMO command.

Decommission old DC
You can remove (demote) a domain controller using DCPROMO command and again
http://social.technet.microsoft.com/wiki/contents/articles/2903.active-directory-active-directory-upgrade-high-level-steps.aspx

Read-only domain controllers (RODCs)


  • What Is an RODC?

Applies To: Windows Server 2008, Windows Server 2012

Read-only domain controllers (RODCs) are a new feature of Active Directory Domain Services (AD DS) in Windows Server 2008. RODCs are additional domain controllers for a domain that host complete, read-only copies of the partitions of the Active Directory database and a read-only copy of the SYSVOL folder contents. By selectively caching credentials, RODCs address some of the challenges that enterprises can encounter in branch offices and perimeter networks (also known as DMZs) that may lack the physical security that is commonly found in datacenters and hub sites. RODCs also offer a number of manageability improvements
https://technet.microsoft.com/en-us/library/cc771030(v=ws.10).aspx


  • Advantages That an RODC Can Provide to an Existing Deployment

Security
Unidirectional replication. Unidirectional replication refers to how RODCs can replicate changes inbound but outbound replication does not occur.
Special krbtgt account. Each RODC has a special krbtgt account that also helps to restrict malicious updates from affecting the rest of the forest
Password Replication Policy (PRP). Each RODC has a PRP that, by default, does not allow any passwords to be cached on the RODC
RODC filtered attribute set (FAS). You can also restrict which application data can replicate to RODCs in your forest by adding attributes to the RODC FAS and marking them as confidential.
https://technet.microsoft.com/en-us/library/cc770320(v=ws.10).aspx

Adprep


  • Adprep

Applies To: Windows Server 2003, Windows Server 2008, Windows Server 2003 R2, Windows Server 2012, Windows Server 2003 with SP1, Windows 8

Extends the Active Directory® schema and updates permissions as necessary to prepare a forest and domain for a domain controller that runs the Windows Server® 2008 operating system.

Adprep.exe is a command-line tool that is available on the Windows Server 2008 installation disc in the \sources\adprep folder, and it is available on the Windows Server 2008 R2 installation disk in the \support\adprep folder. You must run adprep from an elevated command prompt. To open an elevated command prompt, click Start, right-click Command Prompt, and then click Run as administrator.

In Windows Server 2008 R2, Adprep is available in a 32-bit version and a 64-bit version. The 64-bit version runs by default

https://technet.microsoft.com/en-us/library/cc731728(v=ws.11).aspx

Prepare your Domain for the Windows Server 2008 R2 Domain Controller

Prepare your Domain for the Windows Server 2008 R2 Domain Controller

Before installing the first Windows Server 2008 R2 domain controller (DC) into an existing Windows 2000, Windows Server 2003 or Windows Server 2008 domain, you must prepare the AD forest and domain. You do so by running a tool called ADPREP.

What does ADPREP do? ADPREP has parameters that perform a variety of operations that help prepare an existing Active Directory environment for a domain controller that runs Windows Server 2008 R2. Not all versions of ADPREP perform the same operations, but generally the different types of operations that ADPREP can perform include the following:

    Updating the Active Directory schema
    Updating security descriptors
    Modifying access control lists (ACLs) on Active Directory objects and on files in the SYSVOL shared folder
    Creating new objects, as needed
    Creating new containers, as needed
   
    To prepare the forest and domain for the installation of the first Windows Server 2008 R2 domain controller
    The following tasks are required ONLY before adding the first Windows Server 2008 R2 domain controller
   
    you cannot join a Windows Server 2008 R2 server to a Windows NT 4.0 domain
  If any domain controllers in the forest are running Windows 2000 Server, they must be running Service Pack 4 (SP4).
 
  You should test the ADPREP schema updates in a lab environment to ensure that they will not conflict with any applications that run in your environment.
  You must make a system state backup for your domain controllers, including the schema master and at least one other domain controller from each domain in the forest
  make sure that you can log on to the schema master with an account that has sufficient credentials to run adprep /forestprep.
  You must be a member of the Schema Admins group, the Enterprise Admins group, and the Domain Admins group of the domain that hosts the schema master, which is, by default, the forest root domain.
 
  Browse to the X:\support\adprep folder, where X: is the drive letter of your DVD drive. Find a file called adprep.exe or adprep32.exe.
  Windows Server 2008 R2 ADPREP is available in a 32-bit version and a 64-bit version
 
  In the Command Prompt window, type the following command:
    adprep /forestprep
 
  ADPREP will take several minutes to complete. During that time, several LDF files will be imported into the AD Schema, and messages will be displayed in the Command Prompt window. File sch47.ldf seems to be the largest one.
  ADPREP should only be run on an existing DC.
  Allow the operation to complete, and then allow the changes to replicate throughout the forest
 
  In the Command Prompt window, type the following command
  adprep /domainprep
 
  If you’re running a Windows 2008 Active Directory domain, that’s it, no additional tasks are needed.
 If you’re running a Windows 2000 Active Directory domain, you must also the following command:
    adprep /domainprep /gpprep
    If you’re running a Windows 2003 Active Directory domain, that’s it, no additional tasks are needed. However, if you’re planing to run Read Only Domain controllers (RODCs), you must also type the following command:
    adprep /rodcprep
 

To verify that adprep /forestprep completed successfully please perform these steps:

1. Log on to an administrative workstation that has ADSIEdit installed. ADSIEdit is installed by default on domain controllers that run Windows Server 2008 or Windows Server 2008 R2. On Windows Server 2003 you must install the Resource Kit Tools.

2. Click Start, click Run, type ADSIEdit.msc, and then click OK.

3. Click Action, and then click Connect to.

4. Click Select a well known Naming Context, select Configuration in the list of available naming contexts, and then click OK.

5. Double-click Configuration, and then double-click CN=Configuration,DC=forest_root_domain where forest_root_domain is the distinguished name of your forest root domain.

6. Double-click CN=ForestUpdates.

7. Right-click CN=ActiveDirectoryUpdate, and then click Properties.

8. If you ran adprep /forestprep for Windows Server 2008 R2, confirm that the Revision attribute value is 5, and then click OK.

9. Click ADSI Edit, click Action, and then click Connect to.

10. Click Select a Well known naming context, select Schema in the list of available naming contexts, and then click OK.

11. Double-click Schema.

12. Right-click CN=Schema,CN=Configuration,DC=forest_root_domain, and then click Properties.

13. If you ran adprep /forestprep for Windows Server 2008 R2, confirm that the objectVersion attribute value is set to 47, and then click OK.  
https://www.petri.com/prepare-for-server-2008-r2-domain-controller

Sunday, July 10, 2016

unix interview questions


  • The following command displays output only on the screen (stdout).

$ ls
The following command writes the output only to the file and not to the screen.
$ ls > file
The following command (with the help of tee command) writes the output both to the screen (stdout) and to the file.
$ ls | tee file
http://linux.101hacks.com/unix/tee-command-examples


  • Syntax To redirect all error to file

command-name 2> errors.txt

syntax to redirect both output (stdout) and errors (stderr) to same file
command1 > everything.txt 2>&1

Syntax to redirect errors (stderr) to null or zero devices
Data written to a null or zero special file is discarded by your system. This is useful to silence out errors (also know as ‘error spam’):
command1 2> /dev/null
command1 2> /dev/zero

http://www.cyberciti.biz/faq/linux-redirect-error-output-to-file/


  • /dev/null

On Unix/Linux system there is a special
file called /dev/null. It behaves like a black hole. Whatever is printed to that file will disappear without any trace. The main use of this is when there is a program and the user wants to throw away either the regular output or the error messages.
For example, you might have an application, one that you cannot change, that spit tons of messages to the standard error channel. If you don't want to see that on the screen you can redirect it to a file. But if you do that, it can fill your disk quickly. So instead, you would redirect the standard error to /dev/null and the operating system will help you disregard all the "garbage".
http://perlmaven.com/stdout-stderr-and-redirection


  • Every process in Linux is provided with three open filesusually called file descriptor). These files are the standard input, output and error files. By default :


    Standard Input is the keyboard, abstracted as a file to make it easier to write shell scripts.
    Standard Output is the shell window or the terminal from which the script runs, abstracted as a file to again make writing scripts & program easier
    Standard error is the same as standard output:the shell window or terminal from which the script runs.

A file descriptor is simply a number that refers to an open file. By default , file descriptor 0 (zero) refers to the standard input & often abbreviated as stdin. File descriptor 1 refers to standard output (stdout) and file descriptor 2 refers to standard error (stderr)
http://www.linuxtechi.com/standard-input-output-error-in-linux


  • BASH Shell: How To Redirect stderr To stdout redirect stderr to a File )

Bash and other modern shell provides I/O redirection facility. There are 3 default standard files (standard streams) open:
[a] stdin – Use to get input (keyboard) i.e. data going into a program.
[b] stdout – Use to write information (screen)
[c] stderr – Use to write error message (screen)

Understanding I/O streams numbers
The Unix / Linux standard I/O streams with numbers:

Handle Name Description
0 stdin Standard input
1 stdout Standard output
2 stderr Standard error

The following will redirect program error message to a file called error.log:
$ program-name 2> error.log

http://www.cyberciti.biz/faq/redirecting-stderr-to-stdout


  • 25 Linux Shell Scripting interview Questions & Answers


What is Shell Script and why it is required ?
Ans: A Shell Script is a text file that contains one or more commands. As a system administrator we often need to issue number of commands to accomplish the task, we can add these all commands together in a text file (Shell Script) to complete daily routine task.

Q:2 What is the default login shell and how to change default login shell for a specific user ?
# chsh <username> -s <new_default_shell>
# chsh linuxtechi -s /bin/sh

Q:4 How to redirect both standard output and standard error to the same location ?
Ans: There two method to redirect std output and std error to the same location:
Method:1 2>&1 (# ls /usr/share/doc > out.txt 2>&1 )
Method:2 &> (# ls /usr/share/doc &> out.txt )

http://www.linuxtechi.com/linux-shell-scripting-interview-questions-answers/


  •  What is the system command to find the current environment variables of the shell you’re running?

 The command is “env”. The output will depend on which system you’re running:

 What is swapping and paging?
 Consider a reference book, for example. You only open the page you need- you don’t need to have all the pages open at once. That is both almost impossible and extremely inefficient. A book is comparable to a process in UNIX. At any given time, there are several books that UNIX is reading. However, UNIX only takes a few pages from a book at one time, as needed. Once it is done with the page, or if it becomes “old”, it is sent back to storage. This is known as paging. Sometimes UNIX sends the entire book, with all its pages, back to the memory- this is known as swapping. This happens when the work load is really heavy.

Paging is more efficient if UNIX is running a large number of processes at one time. Pages (memory segments) can be stored and retrieved as needed. Swapping is more demanding in terms of resources and memory, but it provides faster results, as UNIX doesn’t need to search and retrieve pages every single time while it is executing a process
 https://blog.udemy.com/unix-shell-scripting-interview-questions/

Specify the difference between absolute path and related path?
Absolute path refers to the exact path as defined from the root directory. Related path refers to the path related to the current locations.

What is the FIFO?
FIFO (First In First Out) is also called named pipes and it is a special file for date transient. Data is read-only in the written order. This is used to inter-process communications, where data write to one end and reads from another end of the pipe.

What is mean by Super User?
The user with access to all files and commands within the system is called a superuser. Generally, the superuser login is to root and the login is secured with the root password.

What is the process group?
A collection of one or more processes is called process group. There is a unique process id for each process group. The function “getpgrp” returns the process group ID for the calling process.

What are the different file types available with UNIX?
    Regular files
    Directory files
    Character special files
    Block special files
    FIFO
    Symbolic links
    Socket
   
https://www.softwaretestinghelp.com/unix-interview-questions/


  • The mkfifo command basically lets you create FIFOs (a.k.a named pipes)

You'd have seen commands that contain a vertical bar (|) in them. This bar is called a pipe. What it does is, it creates a channel of communication between the two processes (when the complete command is executed).

ls | grep .txt
The command mentioned above consists of two programs: ls and grep.
Both these programs are separated by a pipe (|)
So what pipe does here is, it creates a channel of communication between these programs
when the aforementioned command is executed, the output of ls is fed as input to grep.
So finally, the output that gets displayed on the terminal consists of only those entries that have '.txt' string in them.

mkfifo pipe2

So 'pipe2' is now a named pipe. Now comes the question how named pipes are more useful? Well, consider the case where you have a process running in a terminal and producing output, and what you want is to channelize that output on to a different terminal. So here, a named pipe could of great help.


https://www.howtoforge.com/linux-mkfifo-command/



  • Some of the frequently used shells in UNIX include the following:

    tcsh – enhanced C Shell
    zsh – Z SHell
    sh – Bourne shell
    csh – C SHell
    ksh – Korn SHell
    bash – Bourne Again Shell

Nohup is a distinctive command that is utilized to run the process in the background, yet it is marginally unique in relation to and which is typically utilized for putting a procedure in the background. A typical UNIX process that began with nohup will not stop regardless of whether the client has logged off from the framework. While the background process began with and will stop when the client logoff

https://www.onlineinterviewquestions.com/unix-interview-questions/   



  • Explain the difference between soft and hard links?

The most common difference between the soft and hard link is, a hard link is a direct reference to the file in UNIX. However, on the other hand, the soft link is the name refers to the file which means they point out files using their names.

Can you link directories to soft links?
Yes, you can link directories to the soft links as the file system structure supports them.

How do you know if you have the soft or hard link?
The soft link commonly known as the symbolic is the original copy of the file while the hard link is the perfect replica of the original file. So, if you delete the original copy from the system then the soft link won’t have any value but the case is right opposite in hard link.

How hard links are used in the UNIX?
What hard links do on an immediate basis is to break down the file system structure to process the information. Unlike soft links, hard links cannot be spanned across the file system.

Do hard and soft link shares the same Inode?
Yes, both hard link and soft link share the same inode.

Do hard link work even after deleting the soft link?
Yes, the hard will work even after you end up deleting the soft file. As they are a perfect mirror copy of soft link, you can access the file until the links to the file are do not end up on zero.

Can you link directories to hard links?
directories don’t fit into the system and essentially break it. So, in order to protect the file system structure, directories are avoided link with hard links.
https://www.gangboard.com/blog/unix-shell-scripting-interview-questions-and-answers/


  • Discuss the difference between swapping and paging?


Swapping – The complete process is moved to the main memory for execution. To provide the memory requirement, the process size must be less than the available main memory capacity. The implementation is easy but is an overhead to the system. Memory handling is not more flexible with swapping systems.
It the procedure of copying the entire process from main memory onto secondary memory.
For execution, the whole process is moved from swap device to the main memory.

Paging – Only the required memory pages are moved to the main memory for execution.

What do understand by Kernel?
Unix operating system is basically divided into three parts, namely, the kernel, the shell, and the commands and utilities

Explain Superblock in UNIX?
Each logical partitions in Unix are referred to as the File system and each file system contains, a ‘boot block’, a ‘superblock’, ‘inodes’, and data blocks’.
https://www.softwaretestinghelp.com/unix-interview-questions/