Sunday, December 30, 2012

File and print sharing (LINUX)


When the PC first showed up around 1980, most of them were single-user devices, unconnected and basically on their own. Now, it's more than likely that the PC you use at work is connected to the other PCs around you. They are in turn connected to the PCs in the whole building. Which are more than likely connected to the internet and therefore the world. We've made the world a lot smaller, but there are pros and cons of this interconnectedness. Apart from information, we also may be sharing other things. The RIAA fears that we may be sharing music illegally. We may be sharing viruses, though this is unlikely on my end because I use Linux. But as an IBM engineer once said, if you want total security, shut the machine off and lock it in the closet. That's not practical, obviously. But we're going to look at taking advantage of the positive side of sharing. If you happen to have Windows machines in your office, the truth is that you don't really need a Windows server to share Windows files and printers. There's a tool that runs under Linux that can do it too. It's called Samba.


Samba

As with other major, popular Open Source tools we've seen here, Samba comes with most mainstream Linux distributions. It will be installed automatically if you request it and some basic configuration will be done for you. Again, I will reiterate my standard disclaimer. This section is considered a basic introduction to Samba. I just saw that one of Open Source luminary Bruce Perens' guides which is dedicated to Samba comes in at just under 700 pages, so you can imagine that there is a lot of ways to configure and use Samba. We'll try to deal with some of the more common configuration options here.


User accounts for Samba

If you're thinking about letting people using Windows machines store files on your Linux server, you'll need to create user accounts on the Linux machine. If you've gotten this far in the lessons, we'll assume that you know how to do this and skip the how-to part.

Next, you'll need to give them the same Samba password. There is a program to do this which is appropriately named smbpasswd. Let's say you wanted to add a user bsmith. You would type the following:
smbpasswd -a bsmith

This will ask you to type a password twice, as is the Unix custom. You should give the users the same password that they have on the Windows machine if you want the little Network Neighborhood icon to let them in "automagically".

Now, when user bsmith logs in to his Windows machine and clicks on the network icon, he should see our Linux machine running Samba. When he clicks on the machine's icon, he should then be able to see an icon for his Linux user directory. He can then begin leaving his files there - that is - if Samba is correctly configured. Let's look at Samba's configuration file, smb.conf.


smb.conf

The main Samba configuration file can normally be found in /etc/samba/ and it's called smb.conf. This file is placed here when you install Samba. The developers of Samba have done a great job commenting it to explain to you what every line means. The first one we'll need to do something with is this one:
workgroup = utopia

This is where you need to enter the name of your Windows workgroup. That's pretty self-explanatory. Let's move on to the next.
load printers = yes

printing = cups

printcap name = cups

These line are there to provide print services. CUPS (or Common Unix Printing System) is an extremely reliable and well supported protocol. This must installed and running in order for this to work, of course.

Now we need to make additions and modifications in our printers section so that Windows machines will use CUPS to print. Modify your [printer] section to this:
[printers]

path = /var/spool/samba

browsable = no

public = yes

guest ok = yes

writable = no

printable = yes

printer admin = root

And add this section:
[print$]

path = /etc/samba/drivers

browsable = yes

guest ok = no

read only = yes

write list = root

We now need to have CUPS put all of the drivers it has at the disposal of Samba. The CUPS software comes with a tool to do this. It's called cupsaddsmb. Type:
cupsaddsmb -a -U root

This will add all CUPS printer drivers to your Samba setup. Just a word of caution. Printing, in my experience, is a tricky thing. You may have the most ultra-new printer on the block and it may not work right away. You need to be fairly certain before hand that your printer has had some time on the market for the appropriate drivers to have been made available. Most printers from well-known manufacturers should work.

Once print services have been set up, we need to look at the file sharing configuration options. First, we need to look at how the /home directories of users are going to be handled.
   [homes]

   comment = Home Directories

   browseable = no

   writable = yes

   create mask = 0700

   directory mask = 0700

This will insure that other people will not be able to look around (browse) files and won't be able to create and/or overwrite files or create directories (notice the 00 given to group and others). Only the owner of the directory will be able to write to it.

We may want to configure a particular directory on our Linux box to contain files for everybody to see. For example, if your office is using Hylafax to send and receive faxes you could set up a Samba share so everyone can automatically look at received faxes.

[Fax_Rec]

comment = Incoming Faxes

browseable = yes

writable = no

path = /var/spool/hylafax/recvq

public = yes

With a TIFF viewer, people at Windows workstations will be able to see the faxes that come in to the office.

Samba will also give you the ability to share CD drives as well. All you have to do is uncomment the lines pertaining to this in the smb.conf file and add a line like the following to your /etc/fstab
/dev/hdX  /mnt/cdrom  iso9660 defaults,noauto,ro,user   0 0
where 'X' is the letter corresponding to your IDE CD ROM drive.


Plenty of documentation

This shows how versatile Linux is. You can make a Windows NT out of a Linux box running Samba if, like many organizations, you have a number of Windows machines. Again, we have just scratched the surface of what Samba is capable of. Have a look at the documentation that comes with Samba and you'll find a wealth of information about it.

File Compression and Archiving

The following tips deal with the use of tar, gzip, bzip2 and zip

make a tarball of certain types of files
You can make a tarball of only certain types of files from a directory with the following one-liner:

find reports/ -name "*.txt" | xargs tar -zcpf reports.tar.gz


Change the compression type to bzip2 and you'll have a smaller file:
find reports/ -name "*.txt" | xargs tar -jcpf reports.tar.bz2



untar in a different directory
If you've got a gzipped tarball and you want to untar it in a directory other than the one you're in, do the following:
zcat file.tar.gz | ( cd ./otherdir; tar xvf - )


extract individual files from a tarball
If you need a file that you've put into a tarball and you don't want to extract the whole file, you can do the following.
First, get a list of the files and find the one you want
tar -zltf file.tar.gz

Then extract the one you want
tar zxvf file.tar.gz indiv.file



backup everything with tar
To make a backup of everything in a particular directory, first do this
ls -a > backup.all

If you don't really want *everything*, you can also edit backup.all and get rid of things you don't want
To make the tarball, just do this:
tar -cvf newtarfile.tar `cat filelist`

(remember, those are backtics)


incremental backups with tar
An incremental backup is one that includes the new files you've created each day. First you need create a tarball with everything, as we did in the previous example, or just by creating a tarball of the entire directory.
tar cvzf homedir-complete.tar.gz /home/homedir/

Then, you can run the following as a cron job every day. It will add the new files to the homedir-complete.tar.gz tarball
find /home/homedir -mtime -1 -print |  
tar cvzf homedir_complete.tar.gz -T -

(don't forget that dash '-' at the end!)


zip syntax
Most Linux distributions come with zip, the most popular file compression format in the MS Windows world. The command line arguments are not the same as when you're creating a tar.gz, however. To create a zipped file on Linux, do this:
zip -b ./ file.zip *.png

This would create a zipped file of all the *.pngs in that particular directory. Keep in mind:

  • "./" means the directory you're in

  • As you can see, you can use wildcards and extension names



tar and untar over ssh
You can use tar combined with ssh to move files more easily over a local network or even the Internet. In the following example, we will take our 'development' web work and transfer them to the production server.
tar cf - *.png | ssh -l username production_server  
"( cd /home/website/html/images/ ; tar xf - ) "

The process can also be reversed to get remote files here.

ssh -l username production_server
"( cd /path/to/files; tar cf - *.png ) " | tar xf

Thursday, December 27, 2012

The Command Prompt in Windows 7

The Command Prompt in Windows 7 provides access to over 230 command line commands! The commands available in Windows 7 are used to automate processes, create batch files, and perform troubleshooting and diagnostic tasks.
Note: Many Windows 7 Command Prompt commands are similar to classic MS-DOS commands. However, the Command Prompt is not MS-DOS and the commands are not MS-DOS commands. If you are using MS-DOS, I do keep a list of DOS commands.
Not a Windows 7 User? Here are lists detailing all available Windows 8 commands, Windows Vista commands, and Windows XP commands.
If you're interested in why a command was removed or when it was first available, you can see every command from MS-DOS through Windows 8 in my list of Command Prompt commands or skip the details and see it all in my one-page table here.
Below is a complete list of commands, sometimes called CMD commands, available from the Command Prompt in Windows 7:
append - ktmutil | label - tasklist | tcmsetup - xwizard

Append

The append command can be used by programs to open files in another directory as if they were located in the current directory.
The append command is not available in 64-bit versions of Windows 7.

Arp

The arp command is used to display or change entries in the ARP cache.

Assoc

The assoc command is used to display or change the file type associated with a particular file extension.

At

The at command is used to schedule commands and other programs to run at a specific date and time.

Attrib

The attrib command is used to change the attributes of a single file or a directory.

Auditpol

The auditpol command is used to display or change audit policies.

Bcdboot

The bcdboot command is used to copy boot files to the system partition and to create a new system BCD store.

Bcdedit

The bcdedit command is used to view or make changes to Boot Configuration Data.

Bdehdcfg

The bdehdcfg command is used to prepare a hard drive for BitLocker Drive Encryption.

Bitsadmin

The bitsadmin command is used to create, manage, and monitor download and upload jobs.
While the bitsadmin command is available in Windows 7, you should know that it is being phased out. The BITS PowerShell cmdlets should be used instead.

Bootcfg

The bootcfg command is used to build, modify, or view the contents of the boot.ini file, a hidden file that is used to identify in what folder, on which partition, and on which hard drive Windows is located.
The bootcfg command was replaced by the bcdedit command beginning in Windows Vista. Bootcfg is still available in Windows 7 but it serves no real value since boot.ini is not used.

Bootsect

The bootsect command is used to configure the master boot code to one compatible with Windows 7 (BOOTMGR).
The bootsect command is only available from the Command Prompt in System Recovery Options.

Break

The break command sets or clears extended CTRL+C checking on DOS systems.
The break command is available in Windows 7 to provide compatibility with MS-DOS files but it has no effect in Windows 7 itself.

Cacls

The cacls command is used to display or change access control lists of files. Even though the cacls command is available in Windows 7, it's being phased out. Microsoft recommends that you use the icalcs command instead.

Call

The call command is used to run a script or batch program from within another script or batch program.
The call command has no effect outside of a script or batch file. In other words, running the call command at the Command Prompt will do nothing.

Cd

The Cd command is the shorthand version of the chdir command.

Certreq

The certreq command is used to perform various certification authority (CA) certificate functions.

Certutil

The certutil command is used to dump and display certification authority (CA) configuration information in addition to other CA functions.

Change

The change command changes various terminal server settings like install modes, COM port mappings, and logons.

Chcp

The chcp command displays or configures the active code page number.

Chdir

The chdir command is used to display the drive letter and folder that you are currently in. Chdir can also be used to change the drive and/or directory that you want to work in.

Chglogon

The chglogon command enables, disables, or drains terminal server session logins.
Executing the chglogon command is the same as executing change logon.

Chgport

The chgport command can be used to display or change COM port mappings for DOS compatibility.
Executing the chgport command is the same as executing change port.

Chgusr

The chgusr command is used to change the install mode for the terminal server.
Executing the chgusr command is the same as executing change user.

Chkdsk

The chkdsk command, often referred to as check disk, is used to identify and correct certain hard drive errors.

Chkntfs

The chkntfs command is used to configure or display the checking of the disk drive during the Windows boot process.

Choice

The choice command is used within a script or batch program to provide a list of choices and return of the value of that choice to the program.

Cipher

The cipher command shows or changes the encryption status of files and folders on NTFS partitions.
 

Clip

The clip command is used to redirect the output from any command to the clipboard in Windows.

Cls

The cls command clears the screen of all previously entered commands and other text.

Cmdkey

The cmdkey command is used to show, create, and remove stored user names and passwords.

Cmstp

The cmstp command installs or uninstalls a Connection Manager service profile.

Color

The color command is used to change the colors of the text and background within the Command Prompt window.

Command

The command command starts a new instance of the command.com command interpreter.
The command command is not available in 64-bit versions of Windows 7.

Comp

The comp command is used to compare the contents of two files or sets of files.

Compact

The compact command is used to show or change the compression state of files and directories on NTFS partitions.

Convert

The convert command is used to convert FAT or FAT32 formatted volumes to the NTFS format.
 

Copy

The copy command does simply that - it copies one or more files from one location to another.

Cscript

The cscript command is used to execute scripts via Microsoft Script Host.
The cscript command is most commonly used to manage printing from the command line with scripts like prncnfg.vbs, prndrvr.vbs, prnmngr.vbs, and others.
 
 
 
 
 

Find a Website's IP Address


Website IP Address - Command Prompt Tricks
Like to know the IP address of a website? There are a few different commands you can use to find it.
Let's use the nslookup command to find the IP address of About.com. Just execute nslookup about.com and view the result. Make sure you don't confuse any private IP addresses that also show up in the nslookup results alongside About.com's public IP address.
Another way to find a site's IP address is to use the ping command. Execute ping about.com and then look at the IP address between the brackets in the results shown.
Using either Command Prompt trick, the result is 207.241.148.80.

Map a Local Folder Just Like a Network Drive


Subst Command - Command Prompt Tricks
The net use command is used to assign shared drives on a network to your own computer as a drive letter, but did you know there's another command that can be used to do the same thing to any folder on any of your local hard drives?
There is and it's called the subst command. Just execute the subst command, followed by the path of the folder you wish to appear as a drive. For example, let's say you want your C:\Windows\Fonts folder to appear as the Q: drive. Just execute subst q: c:\windows\fonts and you're set!
This Command Prompt trick makes accessing a particular location from the Command Prompt much easier.

Shut Down or Restart Another Computer


Remote Shutdown Dialog - Command Prompt Tricks
System administrators in a business environment do this all the time for lots of reasons, but you can also shut down or restart another computer on your network, all from your computer's Command Prompt.
The easiest way to shut down a computer remotely is to execute shutdown /i from the Command Prompt which will open the Remote Shutdown Dialog, shown here. Just enter the name of the remote computer (which you can get by running the hostname command on the other PC), choose what you want to do (restart or shutdown), select some other options and then click OK.
So whether you're brushing up on your command skills or just scaring a family member, this Command Prompt trick is a fun one.
You can also shut down or restart another computer strictly from the Command Prompt with the shutdown command, without using the Remote Shutdown Dialog.

Open the Command Prompt From Any Location


Open Command Window Here - Command Prompt Tricks
If you've ever worked in the Command Prompt for very long, you know that it can be really frustrating executing the cd/chdir command over and over again to get to the right directory you want to work from.
Luckily, there's a super easy Command Prompt trick that will let you open a Command Prompt window from whatever folder you're viewing in Windows.
All you have to do is navigate, in Windows, to the folder you want to start working from in the Command Prompt. Once there, hold down your Shift key while you right-click anywhere in the folder. Once the menu pops up, you'll notice an entry that's not usually there: Open command window here.
Click it and you'll start a new instance of the Command Prompt, ready and waiting at the right location!
If you're a Command Prompt power user, you'll immediately recognize the value in this little trick.

Crazy Notpad trick to open notpad continuously




 
This is a simple notepad trick. This simple computer prank consists of a code below that will drive your friend crazy as it opens notepad continuously.
  • Open the notepad and just copy the code bellow.
@ECHO off
:top
START %SystemRoot%\system32\notepad.exe
GOTO top
  • And save the it as anyname.bat
  • Now send this to your friend.
Please Note -  If you want to try this on your computer.  Just double click on it. But beware your system will be slow down and you will be left with no other option than to restart, as this script opens 100’s of notepad window. So if you want to try this.  Save and close your all programmes.

Increase RAM speed using notepad.


 
Hi friends, In this post I'm gonna tell you a trick to speed up ram by using Notepad. You might have lot of problems sometimes that your computer not responding. You can use this trick and avoid that.  And it's an easy task to do.
Lets start,
  • At first open notepad.
  • Then type the code bellow.
FreeMem=Space(64000000)
  • Now save the file as cleanRam.vbs
  • That's it. Open the file (double click) and you are done.
 If any questions feel free to comment. 

Trick To Boost Torrent Speeds Using UTorrent Turbo Booster Plugin

uTorrent Turbo Booster is a recent plug-in designed to improve the functionality of probably the most popular P2P file sharing application around – uTorrent.
This tool comes equipped with modern technology that aims at getting your download speed way up so you can grab the files you want so badly much quicker than you’ve been used to. Movies, music, games, applications, you name it - uTorrent Turbo Booster will deliver at a fast pace. It will be there doing its job in the background without upsetting any other activity you might perform on your computer.

So Now Click On Given below Link For Download  UTorrent Turbo Booster Plugin

Click Here For Download

Wednesday, December 26, 2012

How to access multiple Gmail accounts in same browser


How many Gmail accounts do you have..? ?? 1 or 2 or more than that..! may be more than 1 and its quite logical because its very inconvenient to use same mail ID for personal and professional use..!
So we have to use different E-mail id's and Gmail is  most preferred one because of its exclusive features ..! Earlier gmail doesn't allow users to access multiple accounts at same time on same browser but In this post i'll show you how to access multiple gmail accounts on same browser without using any software..!

Follow steps below to access multiple gmail accounts on same browser:-


  • After logging in Open:- Account Setting (From sub-menu you get  clicking on image on Right top )
  • Now click on Account Overview  
    • then  in Security section Click Edit  in Multiple Sign-in option

  •  Now select On and tick all three check boxes and click on Save
  •  Now signout from your gmail account and login again.
  • And click on Your Google Profile Image (right top) and click on Switch Profile
  • Now click on:- Sign in to another account

  •  Now  simply log in to your second gmail account
  •  Now you have added two mail id's to your gmail account to switch your account just Click on Switch account by clicking on your mail id on top right  and then select one you want to access.

Note:- this trick will only work for gmail account .. it will not work on other Google accounts like blogger, adsense , picasa .
 thxx..! !! :-)Z

How to Generate thousands of genuine email ids for free












Hi, here I am once again, with a new trick about How to generate 1000's of genuine e-mail id's with in 5 to 10 minutes , all you have to do is just follow these simple steps  . its up to you that how you want to use them . So be careful about it.  :-)
Requirements :-
LETS START GENERATING E-MAIL ID'S :-
  •  Go to http://www.google.com, click on "Search settings" in the top right corner and change the number of results to display "100" per page, now click on Save preferences.
  • Now in  the search bar type a keyword(s) and the e-mail extension in speech marks For example :- xyz"@gmail.com" What it will do is search for web-pages that contain Gmail e-mail adresses and that are also related  with your keyword. The speech marks around "@gmail.com" make sure that "@gmail.com" is on every web page that is a result of the search.
    • You can also search single websites for e-mail adresses as shown on the example :- site:twitter.com "@gmail.com" The  example shown above will search the whole of twitter.com for"@gmail.com" email adresses. 
  • Now With your results in focus, click the arrow at the side of the AutoPager icon as shown in the picture below. Then goto "Immediately load > All pages" .as shown in screenshot. With your search results still in focus, scroll all the way down and AutoPager should load the next page of results onto the same  page you are currently on. Keep scrolling till all pages have loaded onto the samepage.

  • Press "ctrl + a" to select all of the pages then press "ctrl + c" to copy the results. With the results still in the clipboard (Still copied) go to http://www.skymem.com/ or Click here  . Paste your results into the first box which says "1. Put text with email addresses here:" and just click on Start Extracting Emails Button on top of that box. The settings should already be correct with "unique emails" and "sortticked" So no need to Touch that option. 

  • The e-mail adresses should show in the Results box (3rd box)  almost instantly.
  • Now copy the results from the results box paste them into Notepad. Sometimes the e-mail address seem to end in ".com." instead of just".com" so in notepad go to "Edit > Replace" and in the "Find what" text-box type ".com." without the  speech marks("") in the "Replace with" textbox type".com" , without the speech marks.

Use Kaspersky internet security 2012 Lifetime without license key:-




HOW IT WORKS JUST  FOLLOW THESE 7 STEPS:-
  • First of all disconnect your internet connection and Remove modem or Disconnect that Ethernet Cable. it is very necessary that to get lifetime Key of Kasper sky internet security 2012 .(copy this post and save it to notepad)
  • Delete the existing key (If You Have)
  •  Now Open Kaspersky 2012 product Then Click on (Either KIS or KAV) settings
  • Un-check the “Enable protection” Check box
  • Go Then “Options’ In the settings window itself , And uncheck Below Line

    • a) “Enable Self-Defense”
    • ”Disable External service control”

  •  Goto Start>Run>Type “regedit”>
Now enter then find

HKEY_LOCAL_MACHINE>SOFTWARE>KasperskyLab>environment.

From Right list >> double click on “ProductStatus”

Then , in the “Value Data” Field . replace “Released” with “Beta” and click OK

  • Now again Open Kaspersky 2012 product And Go settings Now Check Below these check boxes :-
    • i)”Enable protection” (In “Protection” sub menu)
    • ii)”Enable Self-Defense” (In “Options” sub menu)
    • iii)”Disable External service control” (In “Options” sub menu)
    • Click on “OK”

  • Close the error message saying that “Protection is not running” .

Couse ot Error massage that, you have not installed any key and the product is not registered also
  •  Restart your PC !

NOTE:- You must Restart your PC Other then it will not work properly

Now , after restart , Open Your Kaspersky product .

Then click On License” (Somewhat in the middle in the bottom)

Click on “Activate new license”

then click on “Activate Beta License”

then click on “Next”

From Now You will Not Blacklist you will get 30 Days Genuine Key .Just click on Activate beta license and click on .Next . That's it The kaspersky server will give u an new 30 days genuine key . So Enjoy!!!

Cool keyboad trick



Keyboards usually have small LED's which indicates whether different types of locks(num lock, scroll lock, caps lock)  are activated or not. Here is a trick to use the lights of your keyboard in a more creative manner in Windows.

This trick uses a simple Visual basic script which when activated makes your scroll lock, caps lock and num locks LED's flash in a cool rhythmic way which gives the perception of a live disco on your keyboard.
 To make your own live disco, follow the steps given below:-

  • 1. Open Notepad.
  • 2. Copy paste the exact code given below:-


Set wshShell =wscript.CreateObject("WScript.Shell")
do
wscript.sleep 100
wshshell.sendkeys "{CAPSLOCK}"
wshshell.sendkeys "{NUMLOCK}"
wshshell.sendkeys "{SCROLLLOCK}"
loop
  • 3. Save the file as Disco.vbs or "*.vbs".
Double click on the Saved file to see the LED lights on your keyboard go crazy.
This trick has been tested on Windows XP, Windows Vista and Windows 7 and found to be working perfectly.

You can disable the keyboard disco by following these steps
  • Open Task Manager ( ctrl+alt+del )
  • go to process tab
  • select wscript.exe 
  • click on end process

how to remotely operate a computer or what is team viewer and how it works


click here to download team viewer
Lots of computer software and hardware companies using team viewer to assist  there clients to get rid of problems. Team viewer is a software through which you can remotely operate a computer system by sitting anywhere else on other computer system.You can use team viewer to remotely access your friend's computer system.Is it secure..?? yes it is.. because no one can access your pc till (S)he has your id and password. and password changes everytime you open team viewer.

What is team viewer:-
It is a Remote desktop utility. by using it u can remotely access any computer by sitting on your computer system.both parties connect to a server which sets up a session between both.



How team viewer works:-
  • One person opens up teamviewer and calls person B.  
  • Person A gives the ID and password to person B.  
  • Person B puts this information in teamviewer and hits connect.
  • now person B can access person A computer.


 Requirements to use team viewer:-



Directions to use team viewer :-
  • Open team viewer
  • Inform second party to open it too.
  • Ask them there team viewer id and password (password changes every time you open team viewer) if you want to acces there system or give them your password and id to allow them to access your computer system.
  • type in there id and password. if you want to access there computer system.
  • Click on " Connect To Partner "
  • now you are all set to access second party computer system.






click here to download .pdf file about team viewer

how to speed up your internet connection or how to boost up your internet connection without installing any software

how to speed up your internet connection or how to boost up your internet connection without installing any software




  • goto Start >> RunType gpedit.msc
  •  This opens the Policy Editor
  • Now, Local Computer Policy >> Computer Configuration
  •  Then, Administrative Templates >> Network
  • Now, click on QOS Packet Scheduler
  • Now, on Right hand side
  • Double Click Limit reservable bandwidth
  •  Now in Setting Tab
    • It says : Not Configure
      Reality : " The Explain Tab " says "By default, the Packet Scheduler limits the system to 20 percent of the bandwidth of a connection"

  •  So, on Setting Tab select Enabled
  • Now, change Bandwidth limit (%) to 0 (Zero)
  • Click apply and ok.

                   NOTE
Misconcept : This don't means that you won't be able to communicate with Microsoft or any its services !!!
Actually : This reserved Bandwidth is only to accelerate Microsoft internet connections more than other connections !!!