Tuesday 9 January 2007

Sharing Windows environment with Linux using SAMBA:

Connecting LINUX box with Windows Box can be very handy while sharing documents from either side, and this can be achieved via SAMBA, there are some very good articles on the net on SAMBA, one of these articles is given below.

Learning the Samba
http://www.oreilly.de/catalog//samba/chapter/book/ch01.pdf

Today, i am going to show Mounting of Windows files on the Linux using SAMBA

1.On the Linux box, make sure under services, "SMB" is started. Go to start--Applications--system settngs---server settings--services--Check the SMB box and click start.

Usually, the script to start samba in a linux box is in one of the two following directories:

/etc/rc.d/init.d

or

/etc/init.d It might be called smb or samba.So, cd into the directory and: You start it with: ./samba start. or Just run ./samba Simply type:

]# service smb restart
]# service smb stop How to Configure Samba on RedHat Linux
8. Now lets mount the “windows shared folder” (File System) called download to the mount point (download) we created on the Linux box.. Here we are using “smbfs”, that is smb file system. Windows (download) > Mounted to > Linux (mount point called download) In this example: Windows shared folder is: 10.208.117.115/download Linux Mount Point is:/mnt/download Command: # mount -t smbfs -o username=administrator,password=2fudge, debug=4 //10.208.117.115/dwonload /mnt/download/ Output: mount.smbfs started (version 3.0.10-1.4E) added interface ip=1.1.1.10 bcast=1.255.255.255 nmask=255.0.0.0connecting to 10.208.117.115 at port 445 4044:session request okserverzone is -198004044: session sedtup ok 4044: tconx ok #

For more information on “Mounting File Systems (Linux)” see this article:
http://www.itc.virginia.edu/desktop/linux/mount.html
9.From the above example its very clear that mount was successful, as there were No errors. To check the contents of the Windows shared folder “download”, navigate to /mnt/download folder and do “ls” which means listing.

# cd /mnt/download/
# cd download/# ls

10. Now you should see all the shared windows files.

Possible Error: it is mandatory and we have disabled it. 252: protocol negotiation failedSMB connection failed

Resolution: In a nutshell, the cause of the problem is the default security policy on Windows 2003 Server being set to always encrypt network connections under all circumstances. Whilst this is fine for most clients (especially Windows clients, understandably), the version of SMB that Panther uses doesn’t support encrypted connections. Apparently this support exists in Samba 3, but not on the version Hoary uses. The solution is to change the security policy to use encryption when it’s available and not otherwise. Here’s how. A. From Administrative Tools, open Domain Controller Security Settings.Go to Local Policies then Security Options. B. Scroll down to find the entry Microsoft network server: Digitally sign communications (always). Set this to Disabled. The only thing left to do is to reload the security policy, as changes don’t otherwise take effect for some time. Open up a command window and type: gpupdat /force Now, we have cross-platform data sharing using SAMBA. To know more please see our Free Learning sites
Windows OS:

Before we learn or start to learn the Windows OS like XP, 2003, 2000 etc , its required to understand the basic difference between "Servers" and "Workstations".

You have to remember that, in the Linux world, there is little to no difference between a "workstation" and a "server". As a matter of fact, most Linux installation include a lot of software that make them, technically, a server. In the Windows world, there is quite a lot of difference between the Win2K "server" and "workstation" versions. With Linux, a workstation can act as a server and vice-versa. In Windows world "Workstations" means "Windows XP, ME, 98 , Windows 2k Professional", where as "Servers" means "Windows 2000" , "Windows 2003", "Windows Advanced" etc. It’s Operating System that determines whether it is a SERVER or WORKSTATION.

The only difference is the amount of software that gets installed on your machine -- For Linux, Red Hat "Server" can therefore turn your machine into a web server, an FTP server, etc. UNIX like OS : A "Unix-like" operating system is one that behaves in a manner similar to a UNIX system, while not necessarily conforming to or being certified to any version of the Single UNIX Specification. The term can include free software / open source operating systems inspired by Bell Labs' UNIX or designed to emulate its features, commercial and proprietary work-alikes, and even versions based on the licensed UNIX source code (which may be deemed so "Unix-like" that they are certified to bear the "UNIX" trademark). There is no formal standard for defining the term, and some difference of opinion is possible as to whether a certain OS is "Unix-like" or not. Unix-like systems often have Unix-like names such as AIX, IRIX, Linux, Minix, Ultrix, and XENIX. We are talking about Linux here: Having a Linux box on the VMWARE (Test Machine) can be very handy while writing on Products that deal with UNIX like OS. What is VMWARE: VMware Player lets you evaluate new or pre-release software contained in virtual machines, without any installation or configuration hassles. You can also share existing virtual machines with colleagues or friends—just use VMware Player to run any virtual machine. What is a virtual machine? A virtual machine is a computer defined in software. It's like running a PC on your PC. VMware Player runs any virtual machine created by VMware Workstation, GSX Server or ESX Server. VMware Player also supports Microsoft virtual machines and Symantec LiveState Recovery disk formats. Fore more details please see: http://www.vmware.com/ Linux on VMWARE: Having a Linux box on the VMWARE (Test Machine) can be very handy while writing on Products that deal with UNIX like OS. Setting up a Test Network with VMWARE Once the linux image is loaded on the Vmware application, one can proceed with the Steps to set the “STATIC IP” for the Linux box on test network. For complete steps with images please write to me at: mailto:ashwinpawar@rediffmail.com
How many Protocols does NetBIOS has ?

Netbios has three protocols using 4 (2 UDP + 2 TCP) Ports:
137/udp netbios-ns NetBIOS name service 138/udp netbios-dgm NetBIOS datagram service 139/tcp netbios-ssn NetBIOS session service (Windows NT)
445/tcp netbios-ssn NetBIOS session service (New Port used by Windows 2000, Windows XP and Windows Server 2003)

137/udp netbios-ns NetBIOS name service = Allows name resolution without using a WINS server.
138/udp netbios-dgm NetBIOS datagram service = Used by applications such as the Messenger service, the Browser service, and other applications that use the mailslots interface.
139 & 445/tcp netbios-ssn NetBIOS session service = Allowing file transfers, network printing, and remote applications such as Server Manager and User Manager to function. The session service a connection-oriented, sequenced, reliable communication between two machines. The datagram service is a connectionless, unsequenced, unreliable service. netbios-ssn compares to TCP as netbios-dgm compares to UDP. NetBIOS is one of those things that exists at various layers, depending on whose book you're reading. Since NetBIOS requires some type of network and transport, it isn't a layer 3 or 4 protocol again it depends which book your are reffering.
What is the Difference beteen UNIX and LINUX OS.

UNIX is a multiuser, multitasking operating system originally developed at Bell Laboratories in 1969 by Ken Thompson, Brian Kernighan and Dennis Richie. Linux was originally developed by Linus Torvalds as a small project while he was a student at the University of Helsinki in Finland. Its written from Scratch, based on the POSIX Standard (Portable Operating System Interface, the open operating interface standard accepted world-wide. It is produced by IEEE and recognized by ISO and ANSI), that defines the Way a UNIX-Like Operating System must work. All Unixes must be POSIX Compliant, no matter if it's Linux, BSD-s, HP-UX, AIX, Solaris, IRIX, etc.

UNIX is a Trademark that originally belonged to Bell Laboratories (AT&T), and has been sold to one company to another with the years (UNIX is what the owner wants it to be). Technically, Linux is not Unix but from the user's point of view, there is little difference between Linux and Unix as both systems follow roughly the same specifications.

How to read Permissions of a File or Directory in Linux :

There are 3 sets of permissions for every file or directory -- owner, group, and global. For each set, there are separate read, write, and execute permissions. The owner permissions are for the owner of the file or directory.

The group permissions are for everyone in the group. The global permissions are for anyone. To see the current permissions, owner, and group for a file or directory, type the following command: ls -l This will display the contents of the directory you are in in long format.

For example the list of a file called testfile and the directory testdir would look like the following: drwxr-xr-x 2 tchin users testdir -rw-r--r-- 1 tchin users testfile The permissions are listed in the first column. The first letter is whether the item is a directory or a file. If the first letter is a d, then the item is a directory as in the first item listed above, testdir. Notice, for the file testfile, the first letter is -. The third column (tchin) tells the owner of the file/directory, and the forth column (users) is the name of the group for the file/directory. The next three letters are the permissions for the owner of the file, the next three letters apply to everyone in the group, and the last three letters are for everyone else. The read, write, and execute permissions are referred to as r,w, and x respectively.Thus, for the directory testdir above, the owner tchin has read, write, and execute permissions to the directory testdir, everyone in the group users has read and execute permissions, and everyone else has read and execute permissions. The only one who can modify or delete any file in this directory is the owner tchin.

How do I determine what operating system I'm using from terminal or console ?

If you only have text on the computer or only a console to work with often you can determine what operating system you are using by using any of the below commands.

Note: On some systems the command to view what operating system and/or its version will be disabled for security reasons and not all operating systems will support all of the below commands.

1. "ver" for Dos/Windows
2. "winver" for Dos/Windows
3. "uname" for Unix/Linux Note: For all the switches always check out the help. For ex- In case of Unix/LInix type "uname --help". Additional information about the Linux version can also be found by using the below commands if the uname command is not available.

Type: cat /etc/issue Following is the example output: Red Hat Enterprise Linux AS release 3
How do I determine what operating system I'm using from terminal or console ?

If you only have text on the computer or only a console to work with often you can determine what operating system you are using by using any of the below commands.

Note: On some systems the command to view what operating system and/or its version will be disabled for security reasons and not all operating systems will support all of the below commands.

1. "ver" for Dos/Windows
2. "winver" for Dos/Windows
3. "uname" for Unix/Linux Note: For all the switches always check out the help. For ex- In case of Unix/LInix type "uname --help". Additional information about the Linux version can also be found by using the below commands if the uname command is not available.

Type: cat /etc/issue Following is the example output: Red Hat Enterprise Linux AS release 3
How to create a "Batch File" which will delete "all the files" inside the specified folder after a Backup job. Batch file: (Can be used as post cmd)

1. Open a notepad and enter the following cmd given in step 2.

2. del C:\folder\*.* /s /q (You can specify any drive where the folder exists).

3. Save this file as a ".BAT" extension. Thats it, You can now place this file in the POST CMD section of Backup Software and delete all the files under the specified folder.
How to identify version of SQL Server2k:

Execute one of the following queries against an instance of the database engine by using isql, osql, or Query Analyzer. SELECT @@VERSION Find out your version of Database Components by means of the following table. SQL Server 2000 Version and Level @@VERSION Product Level SQL Server 2000 Original Release 8.00.194 RTM: Database Components SP1 8.00.384 SP1 Database Components SP2 8.00.534 SP2 Database Components SP3, SP3a or MSDE 2000 Release A. 8.00.760 SP3 Database Components SP4 8.00.2039 SP4 Note Your product version may be different than these values if you applied a hotfix after installing the product or after installing a previous service pack. For example, @@VERSION returns a value of 8.00.818 after you apply the security fix MS03-031 to SQL Server 2000 SP3a.
Tape Formats use by Backup Products:

1. Windows Backup =Microsoft Tape Format ( MTF)
2. Veritas Backup Exec = Microsoft Tape Format ( MTF)
3. EMC Legato = OpenTape Format (OTF)
4. Vertias Netbackup = Tape Archive format (TAR)
Step by Step guide for Disaster Recovery of Exchange 2003:

Warning: This is a practical guide for disaster recovery for exchange and administrator(s) should perform the steps at their own consent. Author is noway responsible for sucess or failure of the restore.

1. Reinstall Windows. Reinstall the same version of Windows by running Windows Setup with the following options: -- The hardware and software configuration should match the original Exchange server, including the same components, the same version of Windows, the same service packs and hot fixes, the same drive designations, and the same server name. -- You should not join the Windows domain. Configure Windows as a standalone server in a workgroup. The server will automatically rejoin the correct domain when you restore the System State from the backup media.

2. Restore the disk drives. You should restore the system drive and any other drives containing data or applications. Select Start Restore to begin recovering the drives.

3. Recover the system state. Select the System State check box. The System State backup includes Active Directory data, Windows registry data, and other data that are not usually backed up by file and drive backups. Select Start Restore to begin recovering the System State. Restart the server. You will receive an error dialog box informing you that at least one service could not be started. The failing services are the ones that require Exchange. Windows incorrectly believes these services are configured on this server because they are listed in the System State backup. This problem will be corrected automatically when Exchange is reinstalled in disaster recovery mode.

4. Reinstall Exchange in Disaster Recovery Mode. Insert the Exchange Server 2003 CD-ROM into your CD-ROM drive. Select Run from the Windows Start menu. As the command to run, enter x:\setup\i386\setup.exe/DisasterRecovery, where x is your CD-ROM drive. Select OK to start the setup program. You must install Exchange to the same drive and directory on which it was installed on the original server. Ensure that each component that was originally installed has an action of Disaster Recovery. If all of the originally installed components are not automatically set for Disaster Recovery, you must manually select them. Running Exchange Setup in Disaster Recovery mode restores the original Exchange system configuration and services. Once you have restored the Exchange configuration, you can recover the Exchange databases.

5. Restore Online Information Store databases.
What is "LSA" (Local System Account) ? How Powerful is this when compared to "User Account"?

Why most services and application runs under the privilege of "LSA" rather then "User Account" (Such as admin account)? Example: MSSQL$Applicationame ------This service always/should run under-----LSA Reason: One of the fundamental rules of the NT/2000/03 security model is that any entity that accesses a domain or machine resource must authenticate itself to a security authority. This rule applies to: 1)Users 2)Machines 3)Services. In the case of a domain, this authority is a domain controller (DC) In the case of a standalone machine, it's the Local Security Authority (LSA). When a service starts up, it authenticates to a security authority, which is why you must link an account to a service. Advantages of LSA: When you use regular user accounts to run an NT service, you must remember to change the password in the Service settings every time you change the account password. The alternative—running your service under the System account—has the key advantage that it never requires a password change. In NT/2000/03 the System account has no password. You all must have noticed ,when we go to ---services applet----double click on MSSQL$Applicationame ---we see two accounts. 1) LSA for which we don't insert any password. we just select the radio button. 2) User account for which we specify the user and password. LSA,Powerful? The Local System account (LSA) has the highest possible privileges on a local NT/2000/03 machine. However, although this account can access anything and do anything on the local machine, it has no permissions on any other machine. The System account's (LSA) lack of other permissions is a logical consequence of its not having a password. On the one hand, without a password, it can't authenticate to another machine. On the other hand, not having to deal with password changes is an advantage but at the same it can just expose the whole OS to the user.
BRUSH-UP WITH SQL DATABASE and File Groups ( Very Basic) :

When a SQL database is created, two or more files are created to support that database. These files are the Primary Data File and the Transaction Log File. Primary Data Files have an extension of ".MDF" and Transaction Log Files have an extension of ".LDF". A database may also have Secondary Data Files, having an ".NDF" extension. (Note: You can actually use any extension for your files but these are recommended for consistency.)Every database must have a Primary Data File. This file contains the system tables for the database, pointers to any other files used by the database, and can also contain data. Secondary files contain any data that did not fit in the Primary. Databases do not necessarily have a secondary file, but may have one or more. The Transaction Log File contains all of the log information that may be used to recover a database. Each database has a Transaction Log File, though there may be more than one. File Group is a important segment of the SQL database and If you are wondering WHY ? Read below Imagine you have a database which is about 20 GB and its keeps growing, but there is only two tables that are getting updated frequently. Then, Instead of Backing the FULL DATABASE you can just put those tables on the file group and just backup the file group, because why should you backup the whole database when only TWO TABLE is getting updated. WHY? Save Time and Space.

Lets see how to create a File Group Creating FILE GROUP 1) Open Enterprise Manager. 2) Open your Local instance. 3) Right click on database ---Choose---create NEW. 4) Give a suitable Name---Click ok. 5) Right click on the database that you just created---Choose Properties. 6) From the Menu---Click on File Group TAB. 7) By default you will see Primary FILE GRP, Create a New FILE GRP underneath that and name it as ---SECONDARY. 8) Click on Ok....Secondary File GRP is now created. 9) Right click the database you created this time --click on ---- Data files. 10) Finally, Create a secondary file (.NDF) and give it a separate path and select SECONDARY under File Group. Now, go ahead and create tables, these tables will now be listed under secondary file group rather then Primary. That's it!

Monday 8 January 2007

ExMerge Exchange 2003:

Mailbox Merge Wizard (ExMerge) : Use the Mailbox Merge Program to extract data from mailboxes on a Microsoft Exchange Server and then merge this data into mailboxes on another Microsoft Exchange Server. The program copies data from the source server into Personal Folders (.PST files) and then merges the data, in the Personal Folders, into mailboxes on the destination server. The ability to merge data to and from an Exchange Server makes this program an invaluable tool with a variety of uses- especially during disaster recovery. The program can also replace existing data instead of merging new data if specified by the Administrator. Mailbox Merge has some limitations. Please read the tools documentation before using this program. This utility comes with the exchange CD otherwise you can also download using the link given below:

Download
http://www.microsoft.com/downloads/details.aspx?FamilyId=429163EC-DCDF-47DC-96DA-1C12D67327D5&displaylang=en
What is the Linux Operating System?

Linux is an open-source operating system published under the GNU Public License. Open source means that anyone is free to use and modify any of the actual source code. Companies and individuals can change the way the operating system works to suit their own personal or business needs. Linux was originally developed by Linus Torvalds while he was a student at the University of Helsinki in Finland. Torvalds, originally working with Minx, (a small UNIX system) decided to create an operating system which would exceed Minx standards. His development began in 1991 when he released version 0.02. Since then Linux has undergone drastic changes. There are now many different distributions of Linux (sometimes referred to as flavors) which all use the same Kernel. This Kernel is still being developed by Tornados and a group of programmers and releases are more and more frequent. The current Kernel version is 2.6 as of the writing of this document.The Linux operating system is touted for its speed, minimal hardware requirements, security and remote administration. Linux is a fully featured operating system which doesn't have to cost a dime. You download many different distributions directly from the Internet and the support community is huge. Because of Lenox's speed and stability it has become the operating system of choice for most types of servers and permeates the entire web market. In addition there is a plethora of software available free of charge for Linux.If graphics is your thing and the whole text based mode scares you a little then you should check out the X Window system. There are a few different interfaces available to choose from the two main ones being NOME and KED. Both of these have tons of features and are always being updated.On a side note, you may see the Linux around the web he's an overweight penguin who sits contentedly on whatever area he happens to be perched on. His name, for the record, is Tux. Tux was chosen by Tornados to represent the Linux operating system years ago and he seems to have done a good job of catching on.

For basic linux Commands please refer to the link given on the Right hand side.