Tuesday, August 11, 2009

How to create a large file in Ubuntu

Use the dd command

Here is the syntax of the dd command to create the file.
I will fill the file with NULL characters.
dd if=/dev/zero of=test.tst bs=1k count=4700000
if = input file
of = output file
bs = block size
count = file size in kb
the file size is given by multiplying bs and count

Example create a 1 GB file:
dd if=/dev/zero of=file_1GB.txt bs=1m count=1k

How to create a large file in windows command line

To create a large file of 1MB do this:
Run->cmd
fsutil file createnew c:\myfile.txt 1000000

To create a large file of 100MB do this:
Run->cmd
fsutil file createnew c:\myfile.txt 100000000

and so on.The number at the end tels you how big the file will be

Saturday, July 25, 2009

How to compact files and folders at the Comman Line

COMPACT [/C | /U] [/S[:dir]] [/A] [/I] [/F] [/Q] [filename [...]]

/C Compresses the specified files. Directories will be marked
so that files added afterward will be compressed.
/U Uncompresses the specified files. Directories will be marked
so that files added afterward will not be compressed.
/S Performs the specified operation on files in the given
directory and all subdirectories. Default "dir" is the
current directory.
/A Displays files with the hidden or system attributes. These
files are omitted by default.
/I Continues performing the specified operation even after errors
have occurred. By default, COMPACT stops when an error is
encountered.
/F Forces the compress operation on all specified files, even
those which are already compressed. Already-compressed files
are skipped by default.
/Q Reports only the most essential information.
filename Specifies a pattern, file, or directory.

Used without parameters, COMPACT displays the compression state of
the current directory and any files it contains. You may use multiple
filenames and wildcards. You must put spaces between multiple
parameters.

Saturday, July 11, 2009

User State Migration Tool-How to migrate user accounts and user settings

  1. Log on to the source computer as an administrator, and specify:

    scanstate \\fileserver\migration\mystore /i:miguser.xml /i:migapp.xml /o

  2. Log on to the destination computer as an administrator.

  3. Do one of the following:

    • If you are migrating domain accounts, specify:

      loadstate \\fileserver\migration\mystore /i:miguser.xml /i:migapp.xml

    • If you are migrating local accounts along with domain accounts, specify:

      loadstate \\fileserver\migration\mystore /i:miguser.xml /i:migapp.xml /lac /lae

Saturday, July 4, 2009

Can't Creat a Performance log alerter

Start the Performance Logs and Alerts service by using the Local System account instead of the Network Service account:
  1. Click Start, click Run, type services.msc in the Open box, and then click OK.
  2. In the Name list, double-click Performance Logs and Alerts.
  3. Click the Log On tab, click Local System account, click Apply, and then click OK.
  4. Quit the Services dialog box, and then restart the ISA Server performance counter log.

Friday, July 3, 2009

Changing System Restore Options in the Windows Registry

In most situations, the default System Restore operation is satisfactory. However
there might be situations in which you need to change how System Restore functions. There are four settings that you can change in the Windows Registry tha affect the intervals System Restore uses when creating automatic restore point and the disk space it uses.
Each of these settings is located in the HKEY_LOCAL_MACHINE\SOFT
WARE\Microsoft\Windows NT\CurrentVersion\SystemRestore subkey.
These settings include the following:
1.RPSessionInterval This setting specifies the intervals, in seconds between scheduled restore-point creations during an active user session. The default value is 0 seconds (disabled).
2.RPGlobalInterval This setting specifies the time interval, in seconds, a which scheduled restore points are created (regardless of whether or no there is an active user session). The default value is 86,400 seconds (24 hours).
3.RPLifeInterval This setting specifies the time interval, in seconds, for which restore points are kept. System Restore deletes restore points older than the specified value. The default value is 7,776,000 seconds (90 days).
4.DiskPercent This setting specifies the maximum amount of disk space on each drive that System Restore can use. This value is specified as a percentage of the total drive space. The default value is 12 percent.

Thursday, July 2, 2009

Group Policy Verification

1.Type in Run--> rsop.msc and press enter.This will launch the Resultant Set of Policy wich will show you what group and security policyes are in efect on your PC.
2.Or you can run it from a Run-->>mmc from File menu add/remove snap-in select Resultant Set of Policy snap-in and ok. Right click on Resultant Set of Policy to generate the policy data for local or remote computer(folow the wizard).
3.Windows XP Professional also supplies a tool named Group Policy Result Tool,which is a command-line utility that helps you determine which policies are actually applied to a computer. You can start this tool by typing Gpresult.exe at the command prompt(run-->cmd).

Wednesday, July 1, 2009

Repair a network connection

1.See if the cable is pluged in or if is not broken someware.
2. ping your domain controller,your dns server and your gateway(if you have them if not skip this step). ex: cmd -->ping 192.168.1.1(dns ip adress)
3. Attempts to renew the connections DHCP lease:
ipconfig /renew command at the command prompt.
4. Flushes the Address Resolution Protocol (ARP) cache,
arp -d command at the command prompt.
5. Reloads the NetBIOS name cache:
nbstat -R command at the command prompt.
A NetBIOS name update is also needed, which is using the nbtstat –RR command.
6. Flushes the Domain Name System (DNS) cache:
ipconfig /flushdns command at the command prompt.
7. Registers the computer’s DNS name:
ipconfig /registerdns command at the command prompt.
8.If non of this works you shoud see if the network card drivers are ok or the network adapter is ok.

Tuesday, June 30, 2009

list the file and print shares on the computer

The Net View command is a command that you can use to test TCP/IP connec-
tions. To use the command, log on with the proper credentials that are required to
view shares on a remote or local computer, open a command prompt, and type
net view \\ComputerName or net view \\IP Address.
The resulting report lists the file and print shares on the computer. If there are no file or print shares on the computer, you see the message There Are No Entries In The List.

Monday, June 29, 2009

File Encription with Cipher

The Cipher command provides the capability to encrypt and decrypt files and folders
from a command prompt. The following example shows the available switches for the
Cipher command:

cipher [/e | /d] [/s:folder_name] [/a] [/i] [/f] [/q] [/h] [/k] [file_name [...]]

/e Encrypts the specified folders. Folders are marked so any files that are added later are encrypted.
/d Decrypts the specified folders. Folders are marked so any files that are added later are not encrypted.
/s Performs the specified operation on files in the given folder and all subfolders.
/a Performs the specified operation on files as well as folders. Encrypted files could be decrypted when modified if the parent folder is not encrypted. Encrypt the file and the parent folder to avoid problems.
/i Continues performing the specified operation even after errors have occurred. By default, Cipher stops when an error is encountered.
/f Forces the encryption operation on all specified files, even those that are already encrypted. Files that are already encrypted are skipped by default.
/q Reports only the most essential information.
/h Displays files with the hidden or system attributes, which are not shown by
default.
/k Creates a new file encryption key for the user running the Cipher command. Using this option causes the Cipher command to ignore all other options.
file_name specifies a pattern, file, or folder.

Saturday, June 27, 2009

Create a Run Shortcut

You can create a shortcut to the Run command. Simply select the Run command on the Start menu, and drag it to the Quick Launch toolbar or to Desktop. The new shortcut uses the same icon, so it's easy to identify.

Friday, June 26, 2009

Hot to use Run As in Comman Prompt

About runas

Enables a user to execute a program on another computer as yourself or as another user.

syntax

RUNAS [/profile] [/env] [/netonly] /user: program

/profile if the user's profile needs to be loaded
/env to use current environment instead of user's.
/netonly use if the credentials specified are for remote access only.
/user should be in form USER@DOMAIN or DOMAIN\USER
program command line for EXE. See below for examples

Examples:
runas /profile /user:mymachinename\administrator cmd
runas /profile /env /user:mydomain\admin "mmc %windir%\system32\gpedit.msc"
runas /env /user:user@domain.microsoft.com "notepad \"my file.txt\""

How to permit restricted users to creat shared folders

Create permanent shared objects

This user right determines which accounts can be used by processes to create a directory object in the Windows 2000 Server, Windows 2000 Professional, Windows XP Professional, and Windows Server 2003 family object manager.

You can configure this security setting by opening the appropriate group policy object and expanding the console tree as such: Computer Configuration\Windows Settings\Security Settings\Local Policies\User Rights Assignment\Create Permanent Shared Objects (add users group or domain users group).Reboot PC done.

Tuesday, June 2, 2009

How to use 7 zip in ubuntu linux

Type: sudo aptitude install p7zip p7zip-full p7zip-rar
You can Right Click and Extract or in Shell .

How to extract files in Shell:

Extracting

Extracting is simple. From the shale, navigate to the folder where the arhive(rar,zip etc.) are located (type "cd /path/to/folder" for example without quotes). Then, type:

7z x YourFileName.rar

If your archive is split into multiple volumes, specify the lowest numbered volume.

7z x YourFileName.7z.001

If you want to extract to another location simply add "-o" follow by that location to the end of the command:

7z x FileName.7z -o/home/user/Desktop/foldername

Friday, January 23, 2009

I can't open my stick from my computer

Today I met a stick malware that stops your from accesing your USB from my computer.
This is a malware that is very annoing and is spreads very fast thru your stick.No antivirus i tried coul'd find it.The problem is that it spreads on the computer that you put your stick in and if another person puts his stick in the infected computer it infects that stick too.
I found a malware remover ComboFix.exe that removes it finnaly.Good luck

Thursday, July 24, 2008

Ubuntu Server Time Syncronization in command line

Can't sync the time in ubuntu server? try this
1 Open a terminal window
2 type this command: dpkg-reconfigure tzdata
3 Follow the directions in the terminal.

If you want to keep it in sync install a ntp server

1.open terminal
2.type sudo apt-get install ntp ntpdate
3. sudo nano /etc/ntp.conf and add the adresses of ntp servers

Thursday, July 17, 2008

Windows domain using a ntp time server how to

If you want your Domain Controllers to be in sync especially if you are in Eastern Europe Contry's windows 2000 server does not know when the time changes on the other hand the windows 2003 server knows and where i work they are primary and aditional DC.
So what to do make them bouth use the same external ntp time server.

Step 1

Run-->cmd

Step 2

Type net time /setsntp:1.ro.pool.ntp.org (ntp_server adress)

Step 3 restart the time service

net stop w32time
net start w32time


Step 4

Verify the ntp server was added to registry.Type:
net time /querysntp

If you want to stop using ntp server type:
net time /setsntp
and restart the time server like i showd you above.

According to posts in Usenet newsgroups, the following sequence of commands (entered at the command prompt) fixes timekeeping problems under Windows XP:
net stop w32time
w32tm /unregister [ignore error message]
w32tm /unregister [enter a second time]
w32tm /register
net start w32time

Change Microsoft Office 2007 License Key

Follow these steps:

1. Close all Microsoft Office applications.

2. Click Start, click Run, type regedit in the Open box, and then click OK.

3. Locate the following registry subkey:
HKEY_LOCAL_MACHINE\Software\Microsoft\Office\12.0\Registration

Note You may also find another subkey that resembles the following subkey:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\12.0\Registration\{91120000-0011-0000-0000-0000000FF1CE}

4. If you find additional subkeys that reference Microsoft 12.0 registration, open each subkey, and then identify the product by the ProductName entry.
For example: ProductName=Microsoft Office Professional Plus 2007

5. When you find the subkey for the product from which you want to remove the existing product license key, delete the following entries:
* DigitalProductID
* ProductID

6. Exit Registry Editor.

The next time that you try to run an Office application, you will be prompted for a new product license key. Then, you can enter the product license key.That's it.

Thursday, July 10, 2008

How to find open ports on a computer on windows machines

To find open ports on a computer, you can use netstat command line.

1. To display all open ports, open DOS command, type netstat and press Enter.
2. To list all listening ports, use netstat -an |find /i "listening" command.
3. To see what ports your computer actually communicates with, use netstat -an |find /i "established"
4. To find specified open port, use find switch. For example, to find if the port 445 is open or not, do netstat -an |find /i "445".
5. You can use PULIST from the Windows Resource Kit to find which process is using a specified port. For example, pulist |find /i "4125" may display