Identify and remove duplicate files


In my pc I have lot of MP3 files where the possibility of duplicate files are high.  There are two tools are available which will overcome this problem.

http://www.clonespy.com/?Home

http://www.easyduplicatefinder.com/

 

Advertisements

Xcacls File and folder NTFS permissions in command prompt.


Xcacls.exe which allows user to view and set permission in command prompt, this tool will overcome the problem when you apply rights in GUI which will not propogate to the indepth level if you have more subfolders.

Ref : http://support.microsoft.com/kb/318754

Connecting Ubuntu to Windows Domain


Symtom:  You have a Linux client machine, and you want to authenticate to, and log into a Windows domain.

Solution:

1.  The commands needed to install the “likewise-open5” package, and join the domain, (assuming the FQDN of the domain is domaina.com and the user name you are using to join the domain is administrator).

$sudo apt-get install likewise-open5

$sudo domainjoin-cli join domaina.com administrator

$sudo reboot

2.  Then to allow users to logon from the Ubuntu welcome screen,

    $sudo nano /etc/samba/lwiauthd.conf

3. Add the following line (the file will probably be empty), to Save press CTRL+X, then Y, then {enter}.

    winbind use default domain = yes

4.  Then reboot.

      $sudo reboot

5. To allow sudo for the domain user(s)

      $sudo nano /etc/sudoers

Locate the line that reads “\\#Members of the Admin group may gain root privileges and do the following:”. Below that, type the following (assuming the domain name is domaina and the user is a member of the domain admins group, domain^users also works).

%domaina\\domain^admins ALL=(ALL) ALL

6. Save and close.

7. Log out

8. In the login prompt click other to Windows Domain login

9. type in the username : username@domain.com  and then type password.

10. It will allow you to login in the windows domain.

Ref: http://www.youtube.com/watch?feature=player_embedded&v=uwdlhrqy33Y

 

 

 

VMware Tips


 

1. To restart webaccess service on vmware
service vmware-webaccess restart – this will restart apache tomcat app

 

2. To restart ssh service on vmware
service sshd restart

 

3. To restart host agent(vmware-hostd) on vmware esx server
service mgmt-vmware restart

 

4. Path for the struts-config.xml
/usr/lib/vmware/webAccess/tomcat/apache-tomcat-5.5.17/webapps/ui/WEB-INF/

 

5. To start the scripted install the command is
    esx ks=nfs:111.222.333.444:/data/KS.config ksdevice=eth0
               location                                             device name

 

6. Virtual Network in Simple……………….

 

Virtual Nic(s) on Virtual Machine(s) —–> 

 

Physical Nic on the ESX Server (Virtual Switch – 56 Ports)  —–>

 

Physical Switch Port              Should be trunked with all the VLANS to which the VM’s need access  

 

All the ESX servers should be configured with Same number of Physical Nics (vSwitches) and Connectivity also should be same, So that vMotion succeeds
All the Virtual Machines are connected to one vSwitch with Different VLANS, this means the Physical Nic(vSwitch) needs to be trunked with the same VLANS on the Physical Switch Port

 

7 .What are the three port groups present in ESX server networking
   1. Virtual Machine Port Group – Used for Virtual Machine Network
   2. Service Console Port Group – Used for Service Console Communications
   3. VMKernel Port Group – Used for VMotion, iSCSI, NFS Communications

 

8. What is the use of a Port Group?
The port group segregates the type of communication.

 

9. What are the type of communications which requires an IP address for sure ?
   Service Console and VMKernel (VMotion and iSCSI), these communications does not happen without an ip address (Whether it is a single or dedicated)

 

10. In the ESX Server licensing features VMotion License is showing as Not used, why?
    Even though the license box is selected, it shows as “License Not Used” until, you enable the VMotion option for specific vSwitch  

 

11. How the Virtual Machine Port group communication works ?
     All the vm’s which are configured in VM Port Group are able to connect to the physical machines on the network. So this port group enables communication between vSwitch and Physical Switch to connect vm’s to Physical Machine’s

 

12. What is a VLAN ?
     A VLAN is a logical configuration on the switch port to segment the IP Traffic. For this to happen, the port must be trunked with the correct VLAN ID.

 

13. Does the vSwitches support VLAN Tagging? Why? 
     Yes, The vSwitches support VLAN Tagging, otherwise if the virtual machines in an esx host are connected to different VLANS, we need to install a separate physical nic (vSwitch) for every VLAN. That is the reason vmware included the VLAN tagging for vSwitches. So every vSwitch supports upto 1016 ports, and BTW they can support 1016 VLANS if needed, but an ESX server doesn’t support that many VM’s. :)  

 

14. What is Promiscuous Mode on vSwitch ? What happens if it sets to Accept?
     If the promiscuous mode set to Accept, all the communication is visible to all the virtual machines, in other words all the packets are sent to all the ports on vSwitch
     If the promiscuous mode set to Reject, the packets are sent to inteded port, so that the intended virtual machine was able to see the communication.

 

15. What is MAC address Changes ? What happens if it is set to Accept ?
When we create a virtual machine the configuration wizard generates a MAC address for that machine, you can see it in the .vmx (VM Config) file. If it doesn’t matches with the MAC address in the OS this setting does not allow incoming traffic to the VM. So by setting Reject Option both MAC addresses will be remains same, and the incoming traffic will be allowed to the VM.

 

16. What is Forged Transmits ? What happens if it is set to Accept ?
When we create a virtual machine the configuration wizard generates a MAC address for that machine, you can see it in the .vmx (VM Config) file. If it doesn’t matches with the MAC address in the OS this setting does not allow outgoing traffic from the VM. So by setting Reject Option both MAC addresses will be remains same, and the outgoing traffic will be allowed from the VM.

 

17. What are the core services of VC ?
VM provisioning , Task Scheduling and Event Logging

 

18. Can we do vMotion between two datacenters ? If possible how it will be?
Yes we can do vMotion between two datacenters, but the mandatory requirement is the VM should be powered off.

 

19. What is VC agent? and what service it is corresponded to? What are the minimum req’s for VC agent installation ?
VC agent is an agent installed on ESX server which enables communication between VC and ESX server.
The daemon  associated with it is called vmware-hostd , and the service which corresponds to it is called as mgmt-vmware, in the event of VC agent failure just restart the service by typing the following command at the service console       

 

     ” service mgmt-vmware restart ”
VC agent installed on the ESX server when we add it to the VC, so at the time of installtion if you are getting an error like ” VC Agent service failed to install “, check the /Opt size whether it is sufficient or not.

 

20. How can you edit VI Client Settings and VC Server Settings ?
Click Edit Menu on VC and Select Client Settings to change VI settings
Click Administration Menu on VC and Select VC Management Server Configuration to Change VC Settings

 

21. What are the files that make a Virtual Machine  ?
     .vmx – Virtual Machine Configuration File
     .nvram – Virtual Machine BIOS
     .vmdk – Virtual Machine Disk file
     .vswp – Virtual Machine Swap File
     .vmsd – Virtual MAchine Snapshot Database
     .vmsn – Virtual Machine Snapshot file
     .vmss – Virtual Machine Suspended State file
     .vmware.log – Current Log File
     .vmware-#.log – Old Log file

 

22. What are the devices that can be added while the virtual Machine running
In VI 3.5 we can add Hard Disk and NIC’s while the machine running.

 

In vSphere 4.0 we can add Memory and Processor along with HDD and NIC’s while the machine running 

 

23. How to set the time delay for BIOS screen for a Virtual Machine?
Right Click on VM, select edit settings, choose options tab and select boot option, set the delay how much you want.

 

24. What is a template ?
We can convert a VM into Template, and it cannot be powered on once its changed to template. This is used to quick provisioning of VM’s.

 

25. What to do to customize the windows virtual machine clone,?
copy the sysprep files to Virtual center directory on the server, so that the wizard will take the advantage of it.

 

26. What to do to customize the linux/unix virtual machine clone,?
VC itself includes the customization tools, as these operating systems are available as open source.

 

27. Does cloning from template happens between two datacenters ?
Yes.. it can, if the template in one datacenter, we can deploy the vm from that template in another datacenter without any problem.

 

28. What are the common issues with snapshots? What stops from taking a snapshot and how to fix it ?
If you configure the VM with Mapped LUN’s, then the snapshot failed. If it is mapped as virtual then we can take a snapshot of it.
If you configure the VM with Mapped LUN’s as physical, you need to remove it to take a snapshot.

 

29. What are the settings that are taken into to consideration when we initiate a snapshot ?
Virtual Machine Configuration (What hardware is attached to it)
State of the Virtual Machine Hard Disk file ( To revert back if needed)
State of the Virtual Machine Memory (if it is powered on)

 

30. What are the requirements for Converting a Physical machine to VM ?
An agent needs to be installed on the Physical machine
VI client needs to be installed with Converter Plug-in
A server to import/export virtual machines

 

31. What is VMWare consolidated backup ?
It is a backup framework, that supports 3rd party utilities to take backups of ESX servers and Virtual Machines. Its not a backup service.

 

32. To open the guided consolidation tool, what are the user requirements ?
The user must be member of administrator, The user should have “Logon as service” privileges – To give a user these privileges, open local sec policy, select Logon as service policy and add the user the user should have read access to AD to send queries

 

 

 

 

 

Shortcut commands in Windows


•&& – Command Chaining

•%SYSTEMROOT%\System32\rcimlby.exe -LaunchRA – Remote Assistance (Windows XP)

•appwiz.cpl – Programs and Features (Formerly Known as “Add or Remove Programs”)

•appwiz.cpl @,2 – Turn Windows Features On and Off (Add/Remove Windows Components pane)

•arp – Displays and modifies the IP-to-Physical address translation tables used by address resolution protocol (ARP)

•at – Schedule tasks either locally or remotely without using Scheduled Tasks

•bootsect.exe – Updates the master boot code for hard disk partitions to switch between BOOTMGR and NTLDR

•cacls – Change Access Control List (ACL) permissions on a directory, its subcontents, or files

•calc – Calculator

•chkdsk – Check/Fix the disk surface for physical errors or bad sectors

•cipher – Displays or alters the encryption of directories [files] on NTFS partitions

•cleanmgr.exe – Disk Cleanup

•clip – Redirects output of command line tools to the Windows clipboard

•cls – clear the command line screen

•cmd /k – Run command with command extensions enabled

•color – Sets the default console foreground and background colors in console

•command.com – Default Operating System Shell

•compmgmt.msc – Computer Management

•control.exe /name Microsoft.NetworkAndSharingCenter – Network and Sharing Center

•control keyboard – Keyboard Properties

•control mouse(or main.cpl) – Mouse Properties

•control sysdm.cpl,@0,3 – Advanced Tab of the System Properties dialog

•control userpasswords2 – Opens the classic User Accounts dialog

•desk.cpl – opens the display properties

•devmgmt.msc – Device Manager

•diskmgmt.msc – Disk Management

•diskpart – Disk management from the command line

•dsa.msc – Opens active directory users and computers

•dsquery – Finds any objects in the directory according to criteria

•dxdiag – DirectX Diagnostic Tool

•eventvwr – Windows Event Log (Event Viewer)

•explorer . – Open explorer with the current folder selected.

•explorer /e, . – Open explorer, with folder tree, with current folder selected.

•F7 – View command history

•find – Searches for a text string in a file or files

•findstr – Find a string in a file

•firewall.cpl – Opens the Windows Firewall settings

•fsmgmt.msc – Shared Folders

•fsutil – Perform tasks related to FAT and NTFS file systems

•ftp – Transfers files to and from a computer running an FTP server service

•getmac – Shows the mac address(es) of your network adapter(s)

•gpedit.msc – Group Policy Editor

•gpresult – Displays the Resultant Set of Policy (RSoP) information for a target user and computer

•httpcfg.exe – HTTP Configuration Utility

•iisreset – To restart IIS

•InetMgr.exe – Internet Information Services (IIS) Manager 7

•InetMgr6.exe – Internet Information Services (IIS) Manager 6

•intl.cpl – Regional and Language Options

•ipconfig – Internet protocol configuration

•lusrmgr.msc – Local Users and Groups Administrator

•msconfig – System Configuration

•notepad – Notepad? ;)

•mmsys.cpl – Sound/Recording/Playback properties

•mode – Configure system devices

•more – Displays one screen of output at a time

•mrt – Microsoft Windows Malicious Software Removal Tool

•mstsc.exe – Remote Desktop Connection

•nbstat – displays protocol statistics and current TCP/IP connections using NBT

•ncpa.cpl – Network Connections

•netsh – Display or modify the network configuration of a computer that is currently running

•netstat – Network Statistics

•net statistics – Check computer up time

•net stop – Stops a running service.

•net use – Connects a computer to or disconnects a computer from a shared resource, displays information about computer connections, or mounts a local share with different privileges (documentation)

•odbcad32.exe – ODBC Data Source Administrator

•pathping – A traceroute that collects detailed packet loss stats

•perfmon – Opens Reliability and Performance Monitor

•ping – Determine whether a remote computer is accessible over the network

•powercfg.cpl – Power management control panel applet

•qfecheck – Shows installed Hotfixes applied to the server/workstation.

•quser – Display information about user sessions on a terminal server

•qwinsta – See disconnected remote desktop sessions

•reg.exe – Console Registry Tool for Windows

•regedit – Registry Editor

•rasdial – Connects to a VPN or a dialup network

•robocopy – Backup/Restore/Copy large amounts of files reliably

•rsop.msc – Resultant Set of Policy (shows the combined effect of all group policies active on the current system/login)

•runas – Run specific tools and programs with different permissions than the user’s current logon provides

•sc – Manage anything you want to do with services.

•schtasks – Enables an administrator to create, delete, query, change, run and end scheduled tasks on a local or remote system.

•secpol.msc – Local Security Settings

•services.msc – Services control panel

•set – Displays, sets, or removes cmd.exe environment variables.

•set DIRCMD – Preset dir parameter in cmd.exe

•start – Starts a separate window to run a specified program or command

•start. – opens the current directory in the Windows Explorer.

•shutdown.exe – Shutdown or Reboot a local/remote machine

•subst.exe – Associates a path with a drive letter, including local drives

•systeminfo -Displays a comprehensive information about the system

•taskkill – terminate tasks by process id (PID) or image name

•tasklist.exe – List Processes on local or a remote machine

•taskmgr.exe – Task Manager

•telephon.cpl – Telephone and Modem properties

•timedate.cpl – Date and Time

•title – Change the title of the CMD window you have open

•tracert – Trace route

•whoami /all – Display Current User/Group/Privilege Information

•wmic – Windows Management Instrumentation Command-line

•winver.exe – Find Windows Version

•wscui.cpl – Windows Security Center

•wuauclt.exe – Windows Update AutoUpdate Client

Manually configuring IP addressing in Windows via Command Prompt


Configuring static IP address on an interface:

1. For IPv4: “netsh interface ip set address “Connection_Name” static IPaddress SubnetMask”

2. For IPv6: “netsh interface ipv6 set address “Connection_Name” IPv6address”

(e.g.)

c:\netsh interface ip set address “local area connection” static 192.168.1.100 255.255.255.0 192.168.1.254

Where 192.168.1.254 is the default gateway.

Configuring automatic obtaining of IP address (via DHCP):

(e.g.)

c:\netsh interface ip set address “local area connection” dhcp

Configuring DNS address staticly:

(e.g.)

c:\netsh interface ip set dns “Local Area Connection” static 192.168.1.1

Ref: http://nj180degree.net/2011/04/08/manuallyconfiguringipaddressing/

 

How to manually undelete objects in a deleted object’s container by LDP command in Active directory.


To manually undelete objects in a deleted object’s container, follow these steps:

1. Click Start, click Run, and then type ldp.exe.
Note If the Ldp utility is not installed, install the support tools from the Windows Server 2003 installation CD.

2. Use the Connection menu in Ldp to perform the connect operations and the bind operations to a Windows Server 2003 domain controller.Specify domain administrator credentials during the bind operation.

3. On the Options menu, click Controls.

4. In the Load Predefined list, click Return Deleted Objects.

Note The 1.2.840.113556.1.4.417 control moves to the Active Controls window.

5. Under Control Type, click Server, and the click OK.

6. On the View menu, click Tree, type the distinguished name path of the deleted objects container in the domain where the deletion occurred, and then click OK.

Note The distinguished name path is also known as the DN path. For example, if the deletion occurred in the contoso.com domain, the DN path would be the following path:

cn=deleted Objects,dc=contoso,dc=com

7. In the left pane of the window, double click the Deleted Object Container.

Note As a search result of Idap query, only 1000 objects are returned by default. Fot example, if more than 1000 objects exist in the Deleted Objects container, not all objects appear in this container. If your target object does not appear, use ntdsutil, and then set the maximum number by using maxpagesize to get the search results .

8. Double-click the object that you want to undelete or to reanimate.

9. Right-click the object that you want to reanimate, and then click Modify.
Change the value for the isDeleted attribute and the DN path in a single Lightweight Directory Access Protocol (LDAP) modify operation. To configure the Modify dialog, follow these steps:

  1. In the Edit Entry Attribute box, type isDeleted.Leave the Value box blank.
  2. Click the Delete option button, and then click Enter to make the first of two entries in the Entry Listdialog.Important Do not click Run.
  3. In the Attribute box, type distinguishedName.
  4. In the Valuesbox, type the new DN path of the reanimated object.For example, to reanimate the JohnDoe user account to the Mayberry OU, use the following DN path:

cn=JohnDoe,ou=Mayberry,dc=contoso,dc=com

Note If you want to reanimate a deleted object to its original container, append the value of the deleted object’s lastKnownParent attribute to its CN value, and then paste the full DN path in the Values box.

  1. In the Operation box, click REPLACE.
  2. Click ENTER.
  3. Click to select the Synchronous check box.
  4. Click to select the Extended check box.
  5. Click RUN.
  1. After you reanimate the objects, click Controls on the Options menu, click the Check Out button to remove (1.2.840.113556.1.4.417) from the Active Controls box list.
  1. Reset user account passwords, profiles, home directories and group memberships for the deleted users.
    When the object was deleted, all the attribute values except SID, ObjectGUID, LastKnownParent and SAMAccountName were stripped.
  1. Enable the reanimated account in Active Directory Users and Computers.Note The reanimated object has the same primary SID as it had before the deletion, but the object must be added again to the same security groups to have the same level of access to resources. The first release of Windows Server 2003 does not preserve the sIDHistory attribute on reanimated user accounts, computer accounts, and security groups. Windows Server 2003 with Service Pack 1 does preserve the sIDHistory attribute on deleted objects.
  1. Remove Microsoft Exchange attributes and reconnect the user to the Exchange mailbox.Note The reanimation of deleted objects is supported when the deletion occurs on a Windows Server 2003 domain controller. The reanimation of deleted objects is not supported when the deletion occurs on a Windows 2000 domain controller that is subsequently upgraded to Windows Server 2003.

    Note If the deletion occurs on a Windows 2000 domain controller in the domain, the lastParentOf attribute is not populated on Windows Server 2003 domain controllers.

Ref sites :  1. http://www.youtube.com/watch?v=7Lm81JEarrU&feature=related

                     2. http://support.microsoft.com/kb/840001