Tuesday 16 December 2008

How to Lock / UnLock (Enable / Disable) Linux User Account

Before you remove an account from a system, is a good idea lock it for one week to make sure that no one use it.

To lock, you can use the follow command:
# passwd -l username (where username is the login id).
This option is used to lock the specified account and it is available to root only. The locking is performed by rendering the encrypted password into an invalid string (by prefixing the encrypted string with an !).

After that, if someone try to loginusing this account, the system will return:
# su - username
This account is currently not available.

To Unlock the same account
Following command re-enables an account by changing the password back to its previous value i.e. to value before using -l option.
# passwd -u username
This removes the '!' in front of the encrypted password

Tuesday 2 December 2008

Quick and Simple Samba configuration

The first step is to create a share folder on your hard drive; for instance, /disk2/data. After that, you need to edit the smb.conf file, found in /etc/samba, and make it look something like this:

# Global parameters[global]
workgroup = HOME
netbios name = SAMBA
server string = Samba Server %v
map to guest = Bad User
log file = /var/log/samba/log.%m
max log size = 50
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
preferred master = No
local master = No
dns proxy = No
security = User

# Share[Data]
path = /disk2/data
valid users = nik
read only = No
create mask = 0777
directory mask = 0777

You can copy and paste this into your conf file or make changes to your existing one.

The workgroup name needs to be the workgroup of your Windows computers, or your domain name. The netbios name is what will appear when you access the Linux computer from Windows. I am currently running a Windows domain with this setup, so I have the preferred master and local master set to no to avoid both servers from attempting to be the master browser. This will eliminate network conflicts on your Windows computers that can cause network-related outages.

For the share details, specify the valid users, or set them up later. In that section you can allow users to create their own folder and files for all to access.

The next step is to add users by the following command:

# useradd -c “Sohail Shaikh” soh
# smbpasswd -a soh
New SMB password: secret
Reenter SMB password: secret
Added user soh

Next, run the testparm command to ensure that the conf file is valid.
If it returns no errors, restart Samba with the command /etc/rc.d/rc.samba restart

Now you’re ready to test Samba.

On a Windows computer, you can either map a drive to the Samba server or access the drive using the Start-Run command and typing \\Samba\data,
“Samba” being the server name and “data” being the shared folder.

One disclaimer: this setup serves a small network or a home network. 

Monday 1 December 2008

The Five Kinds of Computer Backup Storage

There are five kinds of computer backup storage each with its own advantages and disadvantages you should consider. We’ll briefly describe each type of computer backup storage in this article so you can choose the best option for you. I have definitely learned the hard way, over the years, about the importance of backing up files. Many times I thought my files were safe and secure when they actually were not! I also sometimes just simply forgot to backup all the files and now have a list of the mostimportant computer files to backup.
Computer Backup Storage #1: No Backups
Even a few years ago, it would be crazy to suggest to people that they use computers without making regular backups, but today it’s a very real and very legitimate option. Thanks to the prevalence of “cloud” applications from Google and other companies, many users today store all of their files and applications entirely on the Web.
If you use hosted applications for everything, then you have nothing to worry about when your computer fails. You just need to stand up, walk to another computer, and log in to start working where you left off.
This option isn’t for everyone. Anyone who still needs an offline application or wants to keep their files private from Google still needs to store files locally and should make Easy Secure Backups using the methods described later in this article.
We expect a significant rise in the number of users who store all of their data in the cloud when Google releases its upcoming Chrome operating system for computers.
Computer Backup Storage #2: Same Disk Backups
At first, making a backup to the same disk doesn’t make any sense. If the disk fails, you lose both the original and the backup copies. Plus, making a same disk backup will run slowly—hard drives aren’t designed to quickly copy data from one part of the disk to another part of the same disk.
But a same disk backup can give you access to an important computer backup storage feature: the ability to save multiple versions of the same file. For example, you can make a new copy of your accounting Excel worksheet every time you save so that you can always restore an older version if you make a mistake. You probably also want to do this with important Word documents in case you accidentally delete a few paragraphs or pages, your Outlook email files in case you delete an important email, and many other applications.
Although a same disk can be useful, you should always remember that a disk failure will wipe out both original and backup copies, so this method is best used in combination with computer backup storage methods described later in this article.
Computer Backup Storage
Computer Backup Storage #3: External Backup Disks
External backup disks is one of the cheapest methods of computer backup storage and probably also the method that offers the best privacy for your files. Best of all, external backup disks are easy to use with Windows.
Most external disks these days use USB 2.0, although a few disks use Firewire or eSATA. In any case, all you need to do is plug in your external disk and wait for Windows to load it (also called mounting). After you disk mounts, go to the Windows Backup Wizard located in the System and Maintenance menu of the Control Panel. Set up a backup and start it right away.
You have so many choices when buying an external hard drive to use for computer backup storage.
Your first backup to an external drive will take a while, but your second and subsequent backups will go much faster because Windows transfers only the files that have changed.
After you make your backup, you need to safely remove your disk and then store it somewhere safe. It’s no use to you if the same natural disaster that destroys your computer also destroys your backup. You also need to keep the disk safe from attackers or your private files could fall into the wrong hands. For both purposes, we recommend storing your backup disk in a sturdy fire-proof safe.
Thanks to the low price of disk drives, an external backup can cost much less than any of the Internet-based computer backup storage methods mentioned later in this article.
Computer Backup Storage #4: Network Storage
At businesses and even in homes, more and more people are using Network-Attached Storage (NAS), which is simply disk drives accessible over your local network. NAS offers almost all of the benefits of external backup disks and also Internet-based backups for computer backup storage. Many devices made for small and home offices are also very easy to use.
Similar to external disks, a NAS plugs into your computer—but instead of plugging into your computer directly, in plugs into your network router. You can then create a folder on your computer that stores all the files on your NAS. You can backup files to this folder like normal and you can also share files with other people on your same local network.
Because the NAS is separate from your computer, there’s much less chance it will be destroyed by any calamity that strikes your computer. You can even store NASes in a safe place where they’re resist fire damage and thieves while still connected to the network, providing the ultimate in safety and convince.
Computer Backup Storage With RAID
Another great feature available in higher-end NASes is the ability to use a Redundant Array of Independent Disks (RAID) for extra safe backups. If you use your computer for business and worry about losing thousands of dollars of data to a disk drive crash, a NAS with RAID should be an important part of your computer backup storage plan.
RAID is also available for all full-sized PC computers using a special card called a RAID controller computer backup storage, but this method can require a lot of hassle and unskilled users can easily wipe out all their data by choosing the wrong option. With a RAID-enabled NAS, all you usually need to do put a second disk drive in your NAS, browse to a Web interface, and click a button to enable RAID computer backup storage protection.
Computer Backup Storage #5: Internet-Based Backup
The sudden popularity of Dropbox has brought increased attention to the already-established industry of Internet-based backups. Non-geeks will probably appreciate Internet-based backups the most, as very little setup is required. For example, to use Dropbox, all you need to do is install the Dropbox application, create a Dropbox account, and copy your files to a Dropbox folder. Dropbox will do all of the rest.
Dropbox and Mozy both offer free 2Gb storage and promise better security, but you’re still trusting someone else with all of your most important files.  You can get online easy secure backup that is guaranteed against data loss, however it costs an absolute fortune. Livedrive offer unlimited online storage.
The main disadvantage of Dropbox is that you trust the security of your data to Dropbox. Although Dropbox uses high-security technology, any hacker who ever figures out how to get around it will have access to the private files of millions of customers—and that’s an awfully tempting target. In contrast, if you keep your own computer backup storage, you only need to worry about direct threats against your computer.
Conclusion: You Can’t Avoid Computer Backup Storage
Whether you choose to keep your data in the cloud or store it on a high-end NAS, you should still make a clear choice about how you want to keep your computer backup storage before something goes wrong and your data is suddenly gone. If you organize your computer files neatly you will find that any kind of backup is a whole lot easier!!!

Saturday 1 November 2008

10 Best Internet Safety Tips to Keep Your Computer Secure

Keeping your computer secure is essential to your online internet safety. It minimizes the risks of catching viruses and having spyware installed on your system. Computer security has to take a variety of paths and you should pay attention to all of them to maximize your own safety. With that in mind we’ve put together a list of internet safety tips dedicated to keeping your computer secure. The funny thing is, Internet safety tips are usually easy to implement but are often ignored.
10. Firewall
One of the best internet safety tips is to use your firewall to stop people entering your computer system from outside your location. It also stops programs accessing the internet from your computer if they shouldn’t be. A firewall is active as standard on most computers but you should regularly check that yours is active to avoid having your system compromised. Also your router should have its own firewall and you can enable this by entering the settings by finding the router IP address and logging in.
9. Passwords
Passwords are vital to all computer safety. You should have your computer access itself protected and you should have separate passwords for every online account you make. A strong passwords needs to be a mix of alpha numeric capitals such as 45Te9R7G7 to make it as hard as possible for anyone to break.
8. Encrypted files
Most people do not make use of this internet safety tip and do not realize that you can encrypt files on your home computer fairly easily. Simply right click the folder and choose properties. Here you can find a variety of protection options. This makes files harder to be read by third parties but for added security store important documents on a USB or other portable storage device that is not accessible from your home network.
How to Encryt a file
1. Go to the where the file is stored.
2. Right click on the file and choose properties from the menu.
3. On the General tab click on Advanced.
internet safety
4. Tick the box next to “Encrypt contents to secure data
5. Press OK.
internet safety
7. Update browser for internet safety
Over half of all internet users still use out dated browsers to access the internet. These browsers will not have been updated to the latest security threats and are subsequently much easier for hackers to compromise. It is a good idea to update your browser as soon as an update is made available to maximise your protection.
6. Update software
Out dated software is one of the most overlooked security threats to home computers. Much software accesses the internet and if it is doing so in an out dated way it too is easier to compromise. Hackers often created “back doors” into people’s systems that use out dated software so make sure everything you are using is regularly updated.
5. Protecting your internet connection
It is amazing how many people still use no network security despite the ease with which internet security can be set up and instantly help with internet safety. If you are using wireless broadband then you need make sure you have a security key for it. Simply run set up on your router and choose the security options you want to adjust. Choosing a strong password will stop people hijacking your internet and being able to track your internet use.
4. Updating your antivirus software
New viruses are found on an HOURLY basis and virus removal software is updated on average two or three times a week. If you are using antivirus software (which you should be) then you need to update it at least once a week to protect yourself from new threats. I personally use Avast as I cannot risk a virus infection because my computer is used for important business.
3. Virus scans
Along with the above it’s amazing how many people don’t actually scan there computers regularly. If you use the internet regularly then you need to virus scan regularly. We would recommend you run a full scan at least once a week if you use the internet for more than 5 hours a week.
2. Safe browsing
Safe browsing is essential to keeping your computer secure. If you regularly visit dodgy websites, click advertisements and stream content then you are exposing yourself to high risk. If you think a site doesn’t seem quite right then leave and browse elsewhere. Always search through a reputable search engine and be wary of clicking advertisements.
1. Avoiding downloads
The biggest source of viruses and spyware online comes from downloads both legal and illegal. Whenever you are presented with the option to download something you should make sure you scan it for viruses and also check that the website is reputable by researching it through a search engine. With file transfer and sharing sites you should be extremely vigilant and generally should avoid downloading anything that is illegal.
Computer Gym
The best way to keep secure is to treat your computer as if it is a plant!  Attend to it regularly and care for it, clean it (software and hardware/ inside and out), and feed it the best nourishment in secure updates to maintain your hard-drive health

Wednesday 1 October 2008

How to Disable Windows Logo Key

i was recently playing games and this nasty windos logo key keep annoying me , cause i often accidently clicked it , and i start to search a solution to solve my problem, and found the following article in microsfot website, and it did work, hope this helps, thanks!


CODE
http://support.microsoft.com/?kbid=181348




or in other articles, u can copy the following messages into ur notepad and save as *.reg, and use it..


Windows Registry Editor Version 5.00


[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,03,00,00,00,00,00,5b,e0,00,00,5c,e0,\
00,00,00,00

Monday 1 September 2008

How To Add Your Own Windows Tips

Are you sick of seeing the same tips again and again when you first logon to Windows? Now you can change them to whatever you want, whether it's quotes, jokes or a to-do list, anything is possible.

Open your registry and find the key below.

HKEY_LOCAL_MACHINE\ SOFTWARE\ Microsoft\ Windows\ CurrentVersion\ Explorer\ Tips

Create a new string valued named by incrementing the existing value names and set it to the required tip text.

eg. 32 - Dont forget to Visit http://techsohail.blogspot.in/

Monday 4 August 2008

How to Backup / Restore XP Activation

C:\WINDOWS\system32>dir wp*
Volume in drive C has no label.
Volume Serial Number is 8447-0571
Directory of C:\WINDOWS\system32
10/24/2001 08:28 PM 12,584 wpa.bak
01/14/2002 09:05 AM 12,642 wpa.dbl
After you reinstall XP, to restore the Windows Product Activation database files:  
  • Start XP to Minimal Safe mode
  • Change directory to the \%systemroot%\system32 folder
  • Rename the newly created wpa.dbl to wpa.nonactivated and wpa.bak, if it exists, to wpabak.nonactivated.
  • Copy your backed up wpa.dbl and wpb.bak files to the system32 folder
  • Reboot
This should work if you want to avoid activating XP after a reinstall or restore on the same or very similar hardware. It will not work if the hardware is significantly different from that in place when the Windows Product Activation database files were created. This is not a hack to avoid activating installations.

And if you are able to open then at the command Prompt type the following

oobe/msoobe /a or Start/All Programs/Accessories/System Tools/Activate Windows. 

Tuesday 1 July 2008

Set up could not detect hard disk drive

Have you ever encountered installing or Downgrading to a Fresh Windows Xp to your Laptop Hard Drive but it always turns to a Blue Screen of Death after booting up to you Xp installer.


Today a costumer came to our shop and with his Extensa 4230 and the problem is he always ends to a "Blue Screen of Death" or "set up could not detect hard disk drive".
This steps will gonna make it easier to understand.
Before Starting again to boot from your Xp installer,

Step 1: Enter the BIOS Setup
Step: Locate the Sata Mode.
Step 3: from SATA or AHCI Mode Change it to IDE Mode
Step 4: Save and Exit.

ANY Windows setup that you do where you want to install Windows to ANY mass storage controller that is not legacy IDE-compatible will require the F6 procedure and a manufacturer-specific driver. This includes AHCI, RAID, SCSI, Fibre Channel, some SATA, and most proprietary controllers. 

Common problems switching to AHCI under Windows
* Enabling AHCI in a system BIOS will cause a 0x7B Blue Screen of Death STOP error on installations of Windows XP where AHCI/RAID drivers for that system's chipset are not installed. Switching to AHCI mode requires installing new drivers before changing the BIOS settings.
* When attempting to install Microsoft Windows XP or a previous version on an AHCI-enabled system will cause the setup to fail with the error message 
"set up could not detect hard disk drive...". This problem can only be corrected by using a floppy disk with the appropriate drivers or by slipstreaming 
* Enabling AHCI in a system BIOS on installations of Windows XP or Windows Vista, will cause SATA Optical drives to disappear. A Hotfix for Windows Vista is available. SATA optical drives are not available after you start a Windows Vista-based computer.
Vista fixes this by natively supporting AHCI. In other words you can smoothly install a Vista on the Hard drive without worrying anything.
Have Fun on installing Xp!!

Sunday 1 June 2008

Create Config.sys & Autoexec.bat


This is a simple but most forgotton command to create
files like config.sys and autoexec.bat files, well heres it...
Even if u dont have a dos boot disk u can work ur way
to some extent.

********************************************
At c:\ prompt
type
copy con config.sys
devicehigh=c:\dos\himem.sys
device=c:\dos\setver.exe
devicehigh=c:\dos\emm386.exe ram
dos=high,umb
last drive=z
then press CTRL + z
press enter
Config.sys file will be created.

********************************************
Similarly u can create autoexec.bat
@echo off
prompt=$P$G
path=c:\dos;c:\
lh mouse
lh doskey
Press CTRL + Z

Thursday 1 May 2008

Auto End Tasks to Enable a Proper Shutdown



Tuesday 1 April 2008

Change The Default Location For Programe Files

As the size of hard drives increase, more people are using partitions to separate and store groups of files.

XP uses the C:\Program Files directory as the default base directory into which new programs are installed. However, you can change the default installation drive and/ or directory by using a Registry hack.

Go to :-

- Start > Run
- Type “regedit” (without “” NOOBS!)
- Go to this directory…
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion

- Look for the value named ProgramFilesDir. by default,this value will be C:\Program Files
Edit the value to any valid drive or folder and XP will use that new location as the default installation directory for new programs.

Monday 31 March 2008

How to recover damaged Superblock in Linux

If a filesystem check fails and returns the error message “Damaged Superblock”
Solution:

There are backups of the superblock located on several positions and we can restore them with a simple command. 

Backup locations are: 8193, 32768, 98304, 163840, 229376 and 294912. 
( 8193 in many cases only on older systems, 32768 is the most current position for the first backup )

Now, suppose you get a ¨Damaged Superblock¨ error message at filesystem check ( after a power failure ) and you get a root-prompt in a recovery console,
then you give the command:
# e2fsck -b 32768 /dev/hda5

System will then check the filesystem with the information stored in that backup superblock and if the check was successful it will restore the backup to position 0.

If this is not working try using the other copy of Superblock located at the above mention location in your HD.

Tuesday 18 March 2008

How to crash Linux?

As root, you can do whatever you want.
Try this command, as root (reconsider if you really want to crash):
# cp /dev/zero /dev/men
As root, you can even erase all the files on your system with a similarly innocuously looking one-liner (don’t do it):
# rm -rf /

This is not to say that Linux is easy to crash, but that the system administrator (”root”) has the complete power over the system so think before when working on Linux as “root” user.

Monday 17 March 2008

Create Linux Filesystem From An Ordinary File

Under Linux, you can create a regular file, format it as an ext2, ext3, or reiser filesystem, and then mount it just like a physical drive. It's then possible to read and write files to this newly-mounted device. You can also copy the complete filesystem, since it is just a file, to another computer.

First, you want to create a 20MB file or any size you want by executing the following command:
      $ dd if=/dev/zero of=disk-image count=40960
     40960+0 records in
     40960+0 records out
Next, to format this as an ext3 filesystem, you just execute the following command:
      $ /sbin/mkfs -t ext3 -q disk-image
     mke2fs 1.32 (09-Nov-2002)
     disk-image is not a block special device.
     Proceed anyway? (y,n) y
You are asked whether to proceed because this is a file, and not a block device. That is OK.

Next, you need to create a directory that will serve as a mount point for the loopback device.
      $ mkdir fs
You must do the next command as root, or with an account that has superuser privileges.
      # mount -o loop=/dev/loop0 disk-image fs
You can now create new files, write to them, read them, and do everything you normally would do on a disk drive. To make normal user to use this filesystem you need to give valid permission to the directory holding this filesystem.

Sunday 16 March 2008

Mounting an ISO Image as a Filesystem in Linux

This is great, if you don’t have the DVD hardware, but need to get the data.
The following show an example of mounting the Fedora core 7 DVD as a file.

# mkdir /iso
# mount -o loop -t iso9660 /FC7-i386-DVD.iso /iso

Or to mount automatically at boot, add the following to “/etc/fstab

/FC7-i386-DVD.iso /iso iso9660 ro,loop 0 0

Saturday 15 March 2008

Repair a Corrupt MBR and boot into Linux (fedora)

There are times when you inadvertently overwrite your Master Boot Record. The end result being that you are unable to boot into Linux. This is especially true when you are dual booting between windows and Linux OSes. Once when I was working in Windows XP, I accidentally clicked the hibernate button instead of shutdown. And windows somehow overwrote my MBR which housed the GRUB boot loader. At such times, it pays to have this cool tip at hand.

This is what you do to restore the GRUB boot loader when faced with the above problem. First you need a Linux distribution CD. If you are using Fedora (RedHat) then the first CD is sufficient. But you may also use any of the live CDs like Knoppix, Ubuntu Live CD and so on.
With Fedora CD
Boot your computer with the first CD of Fedora in your CD drive (You have to enable your PC to boot from the cdrom, which you can set in the BIOS settings). At the installation boot prompt that you get, enter the following command:
boot: linux rescue

… and press Enter. The installer will ask you a few questions like the language you would like to use, the type of keyboard etc. Then, if you have linux previously installed on your machine, the Fedora installer will automatically detect it and mount it in the /mnt/sysimage directory. Once the linux partition is mounted, you are dropped into the command shell prompt. The next step is to make your newly mounted directory the root (or parent) directory. This you do by running the chroot command as follows:
# chroot /mnt/sysimage

Now you are in the shell with respect to the parent directory which is the linux partition on your harddisk.
From here, the steps needed depends on which bootloader you are using. You have to have a fair idea what is the device node of your harddisk partition housing your MBR. In most cases, it is /dev/hda if you have an IDE harddisk. But if you have a SCSI harddisk, it will be /dev/sda.

Restoring GRUB
Execute the following command :
# grub-install /dev/hda

… to install GRUB boot loader on to your MBR. And then type exit to reboot the machine. Now your GRUB boot loader is fixed.

Friday 14 March 2008

Repair Corrupt RPM Database in Linux

Strange things sometimes happen, 
one of them is a corrupt rpm database. 
This means that the computer tells you something is installed and it really is not.

Here is how to solve this problem.

First backup and then delete by doing the following command:
$ su
# cp /var/lib/rpm/__db.001 /home/nikesh
# rm /var/lib/rpm/__db.001
# cp /var/lib/rpm/__db.002 /home/nikesh
# rm /var/lib/rpm/ __db.002
# rpm –rebuilddb

Thursday 13 March 2008

Erase the Content of Disk Drive in Linux

After unmounting the disk drive’s partitions, issue the following command (while logged in as root): 

# badblocks -ws
 
This will absolutely erase the drive and no tool can retrieve the data after.

Wednesday 12 March 2008

How to scan a host in Linux

You can use nmap to determine all the TCP/IP ports on which a remote server is listening. It isn’t usually an important tool in the home environment, but it can be used in a corporate environment to detect vulnerabilities in your network, such as servers running unauthorized network applications. It is a favorite tool of malicious surfers and therefore should be used to test external as well as internal servers under your control.

Here is an example of trying to do a scan using valid TCP connections (-sT) in the extremely slow “insane” mode (-T 5) from ports 1 to 5000.

# nmap -sT -T 5 -p 1-5000 192.168.1.153

Tuesday 11 March 2008

Setup Quotas in Linux

1) Enter Single user Mode:
# init 1

2) Edit your /etc/fstab file
The /etc/fstab file lists all the partitions that need to be auto-mounted when the system boots. Edit and add “usrquota” option to the partition that you want to have quota enable
LABEL=/home       /home          ext3    defaults,usrquota  1 2

3) Remount your partition
# mount -o remount /home

4) Come out of single user mode
# Exit

5) Create quota file
The uppermost directory of the filesystem needs to have an aquota.user file (defines quotas by user) and an aquota.group file (defines quotas by group), or both.
# touch /home/aquota.user
# chmod 600 /home/aquota.user

5) Initialize the user quota
# quotacheck -vagum

6) Edit the quota for a user
# edquota -u sohail
The command will invoke the vi editor.
Disk quotas for user sohail (uid 501):
 Filesystem  blocks       soft       hard     inodes     soft     hard
 /dev/hda3       24          0          0          7        0        0

Monday 10 March 2008

Recover lost root password

1) Reboot your system.
2) When GRUB comes up type e .
3) Now select entry that begins with kernel.
4) Add then end of the kernel entry type either s or single, now hit enter.
5) Type b, the box will boot up and now you can type in the cmd prompt passwd root.
This will reset the password to whatever you like.

Sunday 9 March 2008

What to do if Linux refuses to boot after a power failure?

SolutionThere are a few things that you can try to get Linux back on track..
1. While rebooting, Linux may print a message saying that there is a problem with the filesystem and it might force a check. It would do this for all Linux partitions. If the checks (they generally take around 30-60 seconds..also displays a rotating indicator) are successful then you are lucky. Linux should mostly continue booting and you should be back in business soon. If this is what happens then you may be under an impression that a direct switch off of a Linux machine leads to no problems. Please note that you were just lucky that you got away without any major problems.
2. While rebooting, Linux may not be successful in any of the filesystem checks. In this case the booting stops abruptly with a message stating that you should run fsck manually without a few parameters. Once you reach the bash prompt (#) then run the fsck command as mentioned (fsck -a -p /dev/hdaX). The fsck command requires the partition which it has to check. So if you have installed linux on /dev/hda1 then you have to run fsck as follows : fsck -a -p /dev/hda1 When you run fsck it would mostly find some inode problems and ask you whether you want to fix them, Select the default option (yes). It would do so for all the problems found. Once this is over you can restart the machine using either “Ctlr+Alt+Del” or “shutdown -r 0″, whichever works. Now this time your Linux machine should boot properly.
3. It has so happened that once when the power failed, Linux simple failed to boot on my machine. It gave no errors at all, but the init process would just not get initiated. It would find my partitions, mount the ext2 filesystem as read only and then would simply display a prompt. Even with this prompt I wasn’t able to do a lot. Also I noticed that a few of the default directories were missing on the native partition. The only solution that I found to this was to Reinstall Linux.

Note
: While reinstalling, the best and safest way for the above problem would be to insert the installation media (Redhat Linux 6.1 CD). And instead of selecting to install the OS once again, select to upgrade the existing installation. This would effectively replace all the damages areas of the OS and would also retain all your personal data and configurations in Linux (This should work in almost all cases).
Hence I would always advice an upgrade to the same version (If you originally had Redhat Linux 6.1 , insert the CD and once again select to upgrade to Redhat Linux 6.1 itself). If the upgrade option doesn’t fix the problem, then you would have to do a reinstall after a reformat of the Linux partitions.
4.
In one case when Linux refused to boot I noticed that a few of the main files / directories were missing. I found that the /sbin directory (which is a very important directory) wasn’t there in the root directory. I performed a search for this directory and found it to be within another directory. After some discussion I realised that my friend has accidently moved this directory within his GUI when he was working in superuser mode. As long as he was working a few commands didn’t work but he did not bother about finding out why they didn’t work. Once he rebooted his machine the abscence of this directory hung the booting process. So I suggest that you never work in superuser mode unless absolutely necessary. Even within the superuser mode prefer the shell, since you can hardly ever do anything accidently in the shell. In my friend’s case I simply moved that directory back within the root directory and Linux booted without any problems.

Saturday 8 March 2008

Installing Xfce on Ubuntu

Paste this command in terminal
sudo aptitude update && sudo aptitude install xubuntu-desktop

To use Xfce after you’ve installed it:
1) Log out
2) Under “Session”, select “Xfce”
3) Log back in again.

Friday 7 March 2008

Tune your ext3 filesystem

All examples use /dev/sda1, but you can change it to whatever you want
tune2fs command can be run on mounted ext3 volumes.
Journals
Ext3 has 3 journal modes, Journal, Ordered, and Writeback (slowest to fastest)
All it takes is a command by tune2fs.
Example:
Code: tune2fs -o journal_data_writeback /dev/sda1
This added journal_data_writeback to the default ext3 mount options for that partition. So if ext3 is mounted without options saying otherwise, or specifically with the option ‘defaults’ (rebuildfstab adds this), it will use writeback.
To get rid of that option, just add ^ before the option
Code: tune2fs -o ^journal_data_writeback /dev/sda1
Just remember not to have two journal options as default.
Note: the writeback journal is not very reliable and you may lose important data in a power outage. Check the man page of tune2fs for more information.
Reserved blocks percentage
According to the manual, reserved blocks are designed to keep your system from failing when you run out of space. Its reserves space for privileged processes such as daemons that start during init 3 and the reserved space can also prevent the filesystem from fragmenting as it fills up. On large partitions such as 300gb, however, the default 5% reserved space can be 15gb, which is quite a lot of space.
You can use the following command to reduce it to 3%, which is a bit more logical on larger filesystems.
Code: tune2fs -m3 /dev/sda1
Remember, you don’t want to remove the reserved blocks entirely, just reduce it to gain back unused space for unprivileged data.
dir_index: Use hashed b-trees to speed up lookups in large directories.
You can enable it with this command.
Code: tune2fs -O dir_index /dev/sda1
Thats not enough however, you much run e2fsck on the partition with the -D parameter to optimize the directories for dir_index.
To do this, you must unmount it, or remount as read only. If you are using the partition and can’t unmount it, switch to init 1 and run
Code: umount /dev/sda1
This will remount it as read only. You can then proceed to running
Code: fsck -Df /dev/sda1
and then
Code: reboot
fsck timers
Ext3 disk checks are long and usually uneventful. By default ext3 is scheduled for a full disk check quite often (about 32 mounts or a few weeks).
Time dependent fsck flags generally are less reliable, you can reset your CMOS on your bios or a power outage might mess with it. Its just really easy to change the time.
To disable time dependent fscking, you would run something like this:
Code: tune2fs -i0 /dev/sda1
# of mounts is more accurate, so there is no need to change the defaults (32), but if you did, this would be an example for 100 mounts.
Code: tune2fs -c100 /dev/sda1

Thursday 6 March 2008

Install Extra Applications in Fedora

Install Email Client (Mozilla Thunderbird)
yum -y install thunderbird
Applications -> Internet -> Thunderbird Mail Client

Install Newsreader (Pan)
yum -y install pan

Install CHM viewer (GnoCHM)
yum -y –enablerepo=dries install gnochm
Applications -> Accessories -> CHM Viewer

Install Web Authoring System (bluefish)
yum -y install bluefish
Applications –> Programming –> Bluefish Editor

Install CD/DVD Burning Application (GnomeBaker)
yum -y install gnomebaker
Applications -> Sound & Video -> GnomeBaker

Install Partition Editor (GParted)
yum -y install gparted
Applications -> System Tools -> GParted

Install Firewall (Firestarter)
yum -y install firestarter
Applications -> System Tools -> Firestarter

Install Extra Fonts
yum -y install xfonts-arabic
yum -y install xfonts-chinese
yum -y install xfonts-gujarati
yum -y install xfonts-hebrew
yum -y install xfonts-hindi
yum -y install xfonts-japanese
yum -y install xfonts-xorg-truetype
rpm -ivh msttcorefonts-1.3-4.noarch.rpm

Install Desktop Applets (gDesklets)
yum -y install gdesklets
Applications -> Accessories -> gDesklets

Install XFCE
yum -y groupinstall XFCE
/etc/init.d/xfs restart

Wednesday 5 March 2008

How to enable the root account in Ubuntu

As you have noticed during the Ubuntu installation there was no question about the root password, as you might have been used to see during other Linux distribution installation process. 
This is why the root account is inactive and can’t be used (no password configured) until we will setup a proper password for it. 

To do this, we simply need to run:
sudo passwd root
 
This will ask for a new root password and once you confirm it, you can start using the root account to login.

In case you will want to disable back the root account, 
just lock the root account by running:
sudo passwd -l root

Tuesday 4 March 2008

Install MP3 Support in Fedora 7

Follow these instructions to get mp3 support on your Fedora Core 7.

Open a terminal and become root, then run this command:
# wget http://rpm.livna.org/fedora/7/i386/livna-release-7-2.noarch.rpm
# rpm -ivh livna-release-7-2.noarch.rpm

Install all other plug ins..
# yum -y install gstreamer-plugins-bad gstreamer-plugins-ugly xine-lib-extras-nonfree

Monday 3 March 2008

Multimedia support in OpenSuse 10.3 (MP3, DiVX, etc.)

If you are using KDE - Download and run (execute) this
If you are using Gnome - Download and execute this
This will enable you to have:
  • Flash
  • Java
  • Latest Amarok (with MP3 Support) for KDE, or Helix-Banshee for GNOME users
  • Encrypted DVD (libdvdcss)
  • Extra XINE Codecs, for DivX/Xvid etc. (libxine1)
  • K3b with MP3 Support (k3b-codecs)
  • Win 32 Codecs (w32codec-all)

Sunday 2 March 2008

Protect yourself from getting hacked!!!!!!


Before writing more about hacking, i was thinking to let the innocent people know about hacking and how hackers perform their hacking operation to get your accounts. So that you can protect yourself from getting hacked!!!!!!



I am giving here Tips that ' what you should not to do' with explanation that ' why not to do'.





Tip 1. Use Strong Passwords: 


  • Always use passwords that hard to guess (Mix of digits + letters in Upper case and lower case both) for your all accounts. the longer your password, the better.
  •  Never use any common word, your name, spouse, parents, birthdate etc.

Explanation 1: 


  • Week Passwords and be easily  hacked using a Brute Force method which do combination of numbers and letters until the real password comes.
  • Common passwords containing name, birthdate can be easily guessed by your friends, any known to you.


Tip 2. Carefully Click on Links: 


  • Always Check the links carefully before clicking on that.
Explanation 2:
  •  To explain the this tip,I am taking to examples. Read the examples carefully. 
    • Ex. 1: Please verify your Account....login here "http://okrut.com
    • Ex. 2:" we are upgrading our system. please verify your name, mail id, password etc. etc. before date blah blah...  here "http://yahoo.com/"  
    • Ex. 3: check this image... this screen shot i hv taken from a forum in Orkut.

Did you get what is Wrong here in these 2 Examples.hmmmm??? Ok let me explain you.

  • In Ex. 1: check the spelling of Orkut carefully in that link. It can take you on a Fake Orkut Login page. that is called Phishing attack. As soon as you login through that fake login page the hacker get the login name, password or complete information of your account. 
  • In Ex. 2: is there anything wrong???? All the spellings are correct... dear ones, just click on the link, you will understand whats wrong. Don't afraid to click... you r safe... Its just a tutorial to let you learn the things. So click the link......
    • hmmm.... Got my Point in ex. 2, Its showing you the link of yahoo. but as you click on it, It redirect you to this site. So Always check the link carefully. I recommend you to use "link preview addon" for your browser. 
  • In Ex. 3: check the link carefully..... in last the extension is html... but just before html its written exe..... html is written here just to make you fool. so that you click on link. but as soon as you will click, an executable file will be installed into ur system. 



Tip 3: Never Open Email Attachments without scanning:
  • Don't open any email attachment from any unknown person. And if the person is known then also first scan the email attachment before open or download it.
Explanation 3:
  • Email Attachments can contain Executable Virus files, that can harm your system. These files usually comes with extension .vbs, .bat, .exe.
  • image files with extension .Jpeg or .gif can also contain virus. Beware, Virus can be integrated with those jpeg files that are also auto executable. As soon as you open the virus infected picture, the virus will be install into your system.
  • Sometimes the file extensions are hided to make you fool.you can get an attachment with .txt extension(as txt files never contain executables) But in actual extension could be .vbs, .exe, .bat etc... check here for eg:http://en.wikipedia.org/wiki/ILOVEYOU
  • Word files, Excel Files can also contail macro viruses, that are very harmfull.


Tip 4. Never  get Trapped into attractive ads....Download only from reputed Sites.  
  • Attractive ads like:
    • Jackpot...."You have won $100000" , "You are the lucky member today", "Free recharge",
    • Free screen-savers, Free wallpaper, Free Mouse Icons, Free Smiles
    • Free computer scan  
    • Free Software
  • Don't download Any software or anything else from just anywhere. Always check for reputed sites then download.
Explanation 4:
  • These ads are simply a  way to attract you to steal your identity and personal information. As soon as you click on it, the stealers get into your computer.
  •  Stealers are that which store all the matter you type including your username, password and send the information to the Hacker. The worst thing is these stealers are not come into notice by your antivirus.   

Tip 5: Surf Internet From a limited User Account.
  • Create a limited user account on your system that does not have administrator rights. and surf web only from that limited account.
Explanation 5: 
  • As limited Account does not have administrators right. So if anything does get into your system, will cannot change any main functions of your system.  

Tip 6: Don't tell Your IP to unknowns.

Explanation 6: 
  • If you tell your IP to anyone then there may be chance that they can see Files in your system.


Tip 7: Turn off all java and java scripting by default
  • Turn of java scripting for your browser by default and only enable it for sites that you know you can trust.
Explanation 7:
  • This can change your account details, passwords, and can simply hack you.
  • Recently "Free Recharge Trick" on orkut is an Example of java script. It changes the victims complete profile, join unnecessary communities, leave scrap and comments on pictures of friends, and start a new community topic in forums congaing the Free Recharge trick's link, to get more people into this trap.  See Profile of my one friend on orkut after using java script...... 


Tip 8: Never read an unsolicited e-mail
  •  Do spam unsolicited emails immediately without opening.
Explanation 9: 
  • Coz just by opening mail, the sender can know your IP and probably can hack u!!!


Tip 9: Always use different different passwords
  •  Keep Password different  for some important account like paypal or any online banking account, other then your social account's passwords 
  • Try to use different passwords for your all accounts.




Tip 10: Keep your Antivirus Up to date.

Explanation 5: 
  • Antivirus updates contains the definitions of Viruses till date. So if you don't  Update it regularly, then there can be chance to get infected your system from a latest coming Virus.


Be safe :)
Next previous home