Friday, 22 January 2010

Sharepoint 2007 - UNC access - "You were not connected because a Duplicate Name exists on the Network"

Alright figured it out - you have to enable Webclient service on the server and restart the server.

I guess "You were not connected because a Duplicate Name exists on the Network"  is one of those Microsoft errors that doesn't help much.


 

 

Tuesday, 19 January 2010

VMware Workstation 7 and Slackware 13 (kernel 2.6.32)

Download the bundle file from VMware.com and install it.
When you got error message when compiling, go to http://communities.vmware.com/message/1401588#1401588 and download the two attached files.
Run the file patch-modules.sh

Sunday, 17 January 2010

xvnkb and slackware 13

Get xvnkb from here:
http://xvnkb.sourceforge.net/xvnkb-0.2.9a.tar.gz

compile as instructed:
# ./configure
# make && make install

Download unicode font from here:http://fontchu.com/unicode.htm

Change slackware default settings to support unicode (/etc/profile.d/lang.sh):
export LANG=en-US.UTF-8

Thursday, 14 January 2010

mount.ntfs consumes 100% CPU

have high cpu usage problem for your vmware application which runs on linux and the virtual machine files in NTFS partition,

you have to add:


mainMem.useNamedFile= FALSE"

to your .vmx file of you virtual machine.

this will solve the high cpu usage of mount.ntfs-3g.

Tuesday, 12 January 2010

install vmware server 2.0.2 on slackware 13 (kernel 2.6.32)

SOURCE:
http://risesecurity.org/2010/01/10/vmware-server-2-0-2-update-patch/

------------------------------

The following are instructions on how to apply the patch:

Download the VMware Server:

Download the VMware Server update patch:

$ wget -N http://risesecurity.org/~rcvalle/VMware-server-2.0.2-203138-update.patch

Extract VMware Server:

$ tar -xzf VMware-server-2.0.2-203138.i386.tar.gz

Extract VMware Server modules:

Change working directory to vmware-server-distrib/lib/modules/source/
$ tar -xf vmci.tar
$ tar -xf vmmon.tar
$ tar -xf vmnet.tar
$ tar -xf vsock.tar

Apply the patch:

Change working directory to vmware-server-distrib/
patch -p1 < ../VMware-server-2.0.2-203138-update.patch


Change working directory to vmware-server-distrib/lib/modules/source/
$ rm -f vmci.tar
$ rm -f vmmon.tar
$ rm -f vmnet.tar
$ rm -f vsock.tar

* cd vmnet-only
* vim vnetUserListener.c
* go to the last include line
* add this line #include “compat_sched.h”


Archive VMware Server modules again:
$ tar -cf vmci.tar vmci-only/
$ tar -cf vmmon.tar vmmon-only/
$ tar -cf vmnet.tar vmnet-only/
$ tar -cf vsock.tar vsock-only/

Run installer script as root:

Change working directory to vmware-server-distrib/
$ sudo ./vmware-install.pl


Note about VMware Remote Console Plug-in:

The VMware Remote Console Plug-in does not work properly on Ubuntu 9.10, Fedora 12 and other newer distributions. A workaround for this is to set the environment variable VMWARE_USE_SHIPPED_GTK before running the VMware Remote Console Plug-in. To set this environment variable at login time, add the following line to your ~/.profile:

export VMWARE_USE_SHIPPED_GTK=yes


install package linux-pam
rename the file /etc/pam.d/vmware-authd.slack to other
change the link to your lib folder where containing pam lib files (lib/security)

How to umount when the device is busy

It happens all the time doesn’t it? You need to unmount a CD or you want to pack away the external drive but when you try to umount it you get the dreaded “device is busy” message. Wouldn’t it be great if Linux actually told you what was keeping the drive busy? Here we are in 2008, I’m using Ubuntu Gutsy, and that message hasn’t changed in all the years I’ve used Linux.

# umount /media/disk/
umount: /media/disk: device is busy
umount: /media/disk: device is busy

First thing you’ll do will probably be to close down all your terminals and xterms but here’s a better way. You can use the fuser command to find out which process was keeping the device busy:

# fuser -m /dev/sdc1
/dev/sdc1: 538
# ps auxw|grep 538
donncha 538 0.4 2.7 219212 56792 ? SLl Feb11 11:25 rhythmbox

Rhythmbox is the culprit! Close that down and umount the drive. Problem solved!

---------
SOURCE: http://ocaoimh.ie/how-to-umount-when-the-device-is-busy/

Compile TrueCrypt 6.3a in Slackware 13 (kernel 2.6.32)

1. Download truecrypt source (6.3a) from www.truecrypt.org and expand it in a temporary folder. (/tmp)

2. Ftp the files below from ftp.rsasecurity.com/pub/pkcs/pkcs-11/v2-20 and copy them into the truecrypt source directory (/tmp/truecrypt-6.3a-source in my case)

cryptoki.h
ct-kip.h
opt-pkcs11.h
pkcs-11v2-20a3.h
pkcs-11v2-20a3d3.h
pkcs11.h
pkcs11f.h
pkcs11t-consolidated-d1.h
pkcs11t.h
pkcs11t.h.org

3. Download wxWidgets from: http://www.wxwidgets.org/downloads/ wxAll is what you want.

4. Unpack wxWidgets in the truecrypt source directory.

5. Run the following command from the truecrypt source directory
# make WX_ROOT=/tmp/truecrypt-6.3a-source/wxWidgets-2.8.10 wxbuild

Note: change directories to match your installation

6. Run the following command: make WXSTATIC=1
7. After the compiling is completed, copy the truecrypt file in the Main folder to /usr/bin

Sunday, 10 January 2010

2.6.32 kernel & vmware

For those who choose to try using the 2.6.32 kernel, there are two fixes to get the modules to compile. In each of

vmet-only/vnetUserListener.c
vmci-only/linux/vmciKernelIf.c



add an #include for compat_sched.h. Repackage the .tar files, and VMware will happily compile the modules.

Tuesday, 5 January 2010

http://www.notebookrepairguide.com/laptop-notebook-repair-service-manuals/

http://www.notebookrepairguide.com/laptop-notebook-repair-service-manuals/

 

 

 

Saturday, 2 January 2010

Bypassing Windows Unknown Publisher Verification For Web Downloaded Executables

SOURCE:
http://www.efblog.net/2009/12/bypassing-windows-unknown-publisher.html
I was in another day of jumping from a client to a client, securing another bank in Israel when my girlfriend called and said "Honey, I am at the office, I have absolutely nothing to do and I can't connect from here to our computer at home to continue my project". I said, O.K, let's see what we can do on a 5 minute phone call. Now just want to make it clear, my girlfriend is an Information System Instructor, she is no developer or hacker.

Me: "Honey, go to http://www.teamviewer.com, can you download it?"
Her: "yes, but when I run the setup.exe it says something weired like 'windows has blocked this software because it can't verify the publisher' and it won't let me install"












Me: "O.K, Open Start-Run, type notepad and space, now click on setup.exe and drag it to the text box at Start->Run. Now add ':Zone.Identifier' just before the last quotes. What do you see?"
Her: "I see something like ZoneId=3, now what?"
Me: "I can't talk, going into a meeting, try to change it to 1 or delete everything, bye bye bye"

After 10 minutes I get an SMS "thanks honey it worked!!!".
Well we found a bug, I wouldn't really call it a "Privilege Escalation" but I guess you don't have to be a hacker to bypass windows security restrictions :)

Thursday, 31 December 2009

Intel 5100 wifi - Kismet source settings

Just letting you know I have a wifi 5100 intel using the iwlagn driver.
I went into the kismet.conf file and changed the source to:

source=iwl4965,wlan0,wifiKis #instead of iwlagn,wlan,wifiKis

 

 

 

Thursday, 10 December 2009

connect wireless with slackware 13

WPA
- scan for wireless network and note for the wireless name
- edit rc.inet1.conf
- run: wpa_passphase "wireless name" "passphrase" and copy the result to /etc/wpa_supplicant.conf
- dhclient wlan0

Friday, 4 December 2009

Slackware root password reset

SOURCE:

http://linuxinw.blogspot.com/2009/11/slackware-root-password-reset.html



- boot from Live cd look like new installation.

- mount to root partition "/" if not sure try what device.
#fdisk -l
#mount /dev/sda1 /mnt

- Now edit /etc/shadow it the best way to backup this file first.
#vi /mnt/etc/shadow

root:[set to blank]:14550:0:99999:7:::

and save by :wq

- take off you cd and reboot
- when login prompt type username as root and blank password.
- change root password with
#passwd

 

 

Tuesday, 1 December 2009

OWA Updating view... or Loading...

If placeholder images appear where your toolbar buttons and icons typically appear, this behavior may be cause by either of the following scenarios:

  • The permissions for the Exchsrvr\Exchweb folder are incorrect.
  • The Exchweb virtual directory in Internet Services Manager is not configured correctly or is missing virtual directories such as the Img virtual directory and the Views virtual directory.
  • The Require secure channel (SSL) check box is selected on the Exchweb virtual directory in Microsoft Internet Information Services (IIS) on the back-end Exchange computer.

 

Monday, 9 November 2009

Akonadi server is not starting on new slackware 13 installation

#mysql_install_db
#chown -R mysql:mysql /var/lib/mysql

This gives mysql rights to use it’s own folder and files.

Now you can start mysql
/etc/rc.d/rc.mysqld start
# mysqladmin create akonadi -p

add "user=root" in the Akonadi local mysql configuration file (on my computer, it is /root/.local/share/akonadi//mysql.conf), and Akonadi server can be started successfully.
So root user can use KDE too.

Thursday, 29 October 2009

Mobilefone - SMS Locator

Gii thiu dch v SMS Locator


Dịch vụ SMS Locator là gì?
SMS Locator của MobiFone là dịch vụ đầu tiên tại Việt Nam cung cấp địa chỉ (ngân hàng, cơ sở y tế, ẩm thực, giải trí, mua sắm,...) gần với vị trí của bạn nhất thông qua tin nhắn. SMS Locator giúp bạn nhanh chóng và dễ dàng tìm kiếm các địa chỉ bất cứ lúc nào.

Phạm vi cung cấp và tính năng dịch vụ:
Trong thời gian đầu, dịch vụ SMS Locator đựoc cung cấp trong phạm vi 06 thành phố lớn nhất toàn quốc bao gồm: Hà Nội, Hồ Chí Minh, Đà Nẵng, Cần Thơ, Hải Phòng, Quảng Ninh.
Bạn có thể tìm kiếm địa chỉ của các dịch vụ sau:

  • Địa chỉ đặt máy ATM gần nhất
  • Địa chỉ các NGÂN HÀNG gần nhất
  • Địa chỉ các cơ sở Y TẾ gần nhất
  • Địa chỉ các quán CAFE gần nhất
  • Địa chỉ các NHÀ HÀNG gần nhất
  • Địa chỉ các KHÁCH SẠN gần nhất
  • Địa chỉ các RẠP CHIẾU PHIM gần nhất
  • Địa chỉ các SIÊU THỊ gần nhất
  • Địa chỉ các trạm XĂNG gần nhất

Dịch vụ sẽ nhanh chóng được mở rộng trên phạm vi toàn quốc và cung cấp thêm ngày càng nhiều các thông tin phong phú và đa dạng để phục vụ bạn tốt nhất.

Lý do để bạn lựa chọn dịch vụ
Bạn không thể nhớ hoặc không biết hết được danh sách các địa điểm đặt ATM, ngân hàng, cây xăng, nhà hàng…. bởi nó quá dài và nhất là khi bạn đi đến 1 địa điểm hoàn toàn không quen thuộc. Dịch vụ SMS Locator xác định được vị trí của bạn, và sẽ cung cấp cho bạn những địa chỉ hữu ích gần bạn nhất để giúp bạn tiết kiệm thời gian và thật chủ động trong mọi tình huống. Chỉ cần soạn tin nhắn và gửi đến 9249.

Hướng dẫn sử dụng dịch vụ
Để biết các địa chỉ dịch vụ bạn cần, soạn tin nhắn: < Tên dịch vụ > gửi 9249. Tên dịch vụ được qui định như sau:

STT

Địa điểm cần tìm

Tên dịch vụ

1

Máy ATM của ngân hàng bất kì gần nhất

ATM

2

Máy ATM của ngân hàng cụ thể gần nhất

ATM [mã Ngân hàng]

3

Ngân hàng bất kì gần nhất

NGANHANG

4

Ngân hàng cụ thể gần nhất

NGANHANG [mã Ngân hàng]

5

Cơ sở y tế gần nhất

BENHVIEN

6

Quán café gần nhất

CAFE

7

Nhà hàng, quán ăn gần nhất

NHAHANG

8

Khách sạn gần nhất

KHACHSAN

9

Rạp chiếu phim gần nhất

RAP

10

Siêu thị gần nhất

SIEUTHI

11

Trạm xăng gần nhất

XANG

12

Trợ giúp

TROGIUP



Mã Ngân hàng được quy định như sau:

STT

Tên ngân hàng

Mã ngân hàng

1

Ngân hàng Ngoại thương (Vietcombank)

VCB

2

Ngân hàng Nông nghiệp và Phát triển Nông thôn (Agribank)

AGB

3

Ngân hàng Kỹ thương (Techcombank)

TCB

4

Ngân hàng Á Châu

ACB

5

Ngân hàng HSBC

HSBC

6

Ngân hàng ANZ

ANZ

7

Ngân hàng Đông Á

DAB

8

Ngân hàng Quốc tế (VIB Bank)

VIB

9

Ngân hàng Đầu tư và Phát triển

BIDV

10

Ngân hàng Công thương

VIETIN

 

  • Với mỗi bản tin yêu cầu bạn sẽ nhận được tối đa 02 bản tin trả về là thông tin địa chỉ của các dịch vụ gần nhất bạn cần.
  • Để nhận thêm các địa chỉ dịch vụ bạn cần, soạn tin nhắn: < Tên dịch vụ > 1 gửi 9249.

Ví dụ:

  • Bạn đang ở phố Lý Nam Đế và muốn tìm quán CAFE gần nhất, soạn tin CAFE gửi 9249. Dịch vụ SMS Locator sẽ gửi về cho bạn 02 bản tin:
    • Bản tin 1: Cafe TRUNG NGUYEN: 8 Cua Dong, (04)39230988; Cafe HIEU: 23 Cua Dong; Cafe HUYEN: 33 Cua Dong, (04)38287768
    • Bản tin 2: Cafe QUEN: 54 Hang Gai, (04)037831359; Cua hang giai khat BAO LAM: 42 Bat Dan,(0438251800; Cafe internet SONGSINH: 49B Bat Dan, (04)39231329

 

  • Bạn muốn tìm thêm các quán CAFE gần nhất khác, soạn tin CAFE 1 gửi 9249 Dịch vụ SMS Locator gửi về cho bạn 2 bản tin với nội dung như sau:
    • Bản tin 1: Cafe Internet 71: 71 Hang Dieu, (04)38289172; Cafe THAI: 24 Duong Thanh, (04)39288084
    • Bản tin 2: DARLING Cafe: 33 Hang Quat; Cafe NUOI: 34 Luong Van Can. (04)37716275

Mức cước sử dụng dịch vụ: 2.000 đồng/tin nhắn (đã bao gồm thuế GTGT)

Wednesday, 28 October 2009

How to improve disk I/O performances with VMware Workstation

SOURCE: http://www.virtualization.info/2005/11/how-to-improve-disk-io-performances.html

--------------------------------

Even on a 2 GB RAM workstation (as mine) VMware virtual machines can run slowly. Too slowly sometimes.

This can depend on a large amount of factors but we can reduce the number to 4 critical issues:

  1. Antivirus real-time protection
    You probably run VMware Workstation on your everyday working computer, and you probably want to stay secure running an antivirus software.

    The most useful feature of any AV is the real-time protection, catching and monitoring I/O accesses of every process for suspicious activities. This feature can greatly impact on your VMs performances and should be fine-tuned for virtualization.

    So be sure to create an exclusion filter on your real-time protection settings for .vmdk (VMware virtual disk) and .vmem (VMware virtual memory) files. In this way countinous I/O operations on your virtual machines will not be hit by antivirus checking.

    Note: if you plan to run liveCD operating systems (like Knoppix) inside your VMs or simply often use CD images for installing new software, I highly recommend to exclude .iso files too from AV checking.
  2. HostOS disk fragmentation
    A really performance hitter for virtual machines is a fragmented host OS disk.

    VMs virtual disks are very large (4 GBs at minimum on the average) and are created by default as non preallocated. In other words your virtual disk grow as you install more software on the guest OS till reaching your defined disk limit.
    If you use only one physical disk for everyday work and VMs storing, you probably will use space around a growing virtual disk, obliging your host OS to fragment virtual machines more and more.

    So be sure to:
    • Create a dedicated partition for virtual machines only
    • Create guest OSes virtual disks with Allocate all disk space now option
    • Schedule a daily defragmentation for your virtual machines directories (maybe at launch time or during the night)
  3. Memory trimming
    Workstation checks which part of the guest OS virtual memory is not used and allocates it back to the host OS. This permits to have more concurrent virtual machines running but everytime the guest OS asks back for its memory it suffers a performance degradation.

    So, if you have enough free RAM for all planned concurrent VMs, be sure to disable memory trimming for guest OSes adding the following line to the virtual machine configuration (.vmx) file:

    MemTrimRate=0

    Note: Memory trimming can be disabled through GUI since Workstation 6.0.
  4. Page sharing (quoted from VMware documentation)
    VMware uses a page sharing technique to allow guest memory pages with identical contents to be stored as a single copy-on-write page. Page sharing decreases host memory usage, but consumes system resources, potentially including I/O bandwidth.

    You may want to avoid this overhead for guests for which host memory is plentiful and I/O latency is important. To disable page sharing, add the following line to the virtual machine configuration (.vmx) file:

    sched.mem.pshare.enable=FALSE option

These suggestions will work well for every VMware Workstation 5.x and Player 1.x since both share same engine.

 

Tuesday, 20 October 2009

How To: Hide/Remove the View All Site Content link in SharePoint

How To: Hide/Remove the View All Site Content link in SharePoint

by Mark Wagner
SOURCE: Article: http://www.crsw.com/mark/Lists/Posts/Post.aspx?ID=36

Summary
This article covers how to hide (remove) the View All Site Content link and/or the Recycle Bin link from the quick launch navigation without having to customize the master page.  Additionally, I cover how I accomplished along with other options, all using the standard functionality provided in Windows SharePoint Services 3.0.

Important:  This solution is not an answer for security.  The user will still have access to the View All Site Content page.  The View All Site Content link is simply removed or hidden from the page.

Applies To

- Windows SharePoint Services 3.0
- Microsoft Office SharePoint Server 2007

Licensing

  • There is no license required to use the Hide View All Site Content feature.
  • This is available to the public (business or personal) for free.
  • There is no support.
  • There is no implied or explicit warranty.
  • Use at your own risk.

Downloads

Hide View All Site Content - Solution Package
Hide View All Site Content - Solution Package and Source Code

Installation and Activation
(Very easy, no coding required)

For those interested in how to install this solution, it is very easy and does not require any coding, compiling, or editing.

Basic Install Steps:

Note: This command must be executed on the (only one) SharePoint web server, and you must be a local administrator.

  1. Add the solution using the STSADM command: stsadm -o addsolution -filename [path]\VASCSiteAction.wsp
  2. Deploy the solution using the STSADM command: stsadm -o deploysolution -name VASCSiteAction.wsp -allowgacdeployment -immediate -allcontenturls
  3. Optional - to restart IIS: iisreset /noforce

Using (Activating) the new feature:

  1. Navigate to the site you want to hide the View All Site Content link.
  2. Go to the Site Settings for that site (Site Actions > Site Settings).
  3. Click the Site Features (not the Site Collection Features) link under the Site Administration section.
  4. Activate the new feature named "Hide the View All Site Content link".

Your View All Site Content link should now be hidden and the View All Site Content link should now appear in the Site Actions menu.

For those only interested in using this solution, you do not need to read any further.  However, for those who are interested in how this is accomplished, the rest of this article discusses just that

 

Monday, 19 October 2009

Trying to put repository onto network drive for Visual SVN server

Source: http://www.experts-exchange.com/Software/Development/Management_Debug/Version_Control_CVS/Subversion/Q_23494919.html

----------------

In case anyone is still interested,  here's how I made it work:

 

How is it useful to someone.

 

Ray in Wisconsin

 

Question:

Can I install the VisualSVN Server software on a local server but have the repositories on a network share?

 

Answer:

Yes.

 

Heres how to do it:

During the installation of VisualSVN Server, simply type in the URL of the network share that you want to house the repositories on.

 

Or after the install, right click on "VisualSVN Server", choose properties and then change the value od the "Repositories Root" .

 

IE:

I wanted to house the Repository on a netwrok server named "FileServerOne".

There was a share created on that server named "ShareData"

And I was able to create a folder named "Firmwide" inside of "ShareData".

So, I entered the following, into the Repositories Root dialog box during the installation of VisualSVN Server.

\\FileServerOne\ShareData\Firmwide\Repositories\

 

Thats it.

 

Things of note:

At the end of the VisualSVN Server installation process, the installation will attempt to start the VisualSVN Server service.

Depending on what permissions you may have, you may receive a message from the installation process that it was unable to start the VisualSVN Server service.

 

Heres why that is:

The VisualSVN Server installation process installs a service named VisualSVN Server.

By default, the Local System Account is chosen on the Log On tab.

 

Heres what I did to remedy that issue:

I left the dialog message that said the VisualSVN Server installation process was unable to start the VisualSVN Server service, on my desktop unanswered.

 

I opened the VisualSVN Server service to edit it. (see below.)

It was necessary for me to unselect the Local System Account and Select This Account instead.

Then I entered MY, Domain User ID and Password into the dialog boxes and  clicked on OK to save the newly edited service.

 

Then, I returned to the dialog message on my desktop and clicked on Retry.

 

At that point the VisualSVN Server installation process was able to start the VisualSVN Server service and all was well.

Accepted Solution

How to Sysprep Windows

Source: http://www.jameskovacs.com/blog/HowToSysprepWindows.aspx

-----------

How to Sysprep Windows

 

Every time I need to set up a bunch of virtual machines, I have to go back and look up where to find the Sysprep tool and how to use it. Here are the details so I can find it in the future...

 

In case you haven't encountered Sysprep before, it is a tool that allows you to create a base OS image (including Windows, Office, Visual Studio, or whatever other applications you want) and then re-package it. You can then create cloned disks (or just copy the whole thing) and when you boot the new disk, it is like booting Windows for the first time, except with all your software installed. You get to choose a new computer name, SIDs are regenerated, etc.

 

Each version of Windows requires the correct version of Sysprep. Where do you find the correct version of Sysprep? On your install disks in <DVD>:\Support\Tools\Deploy.cab. Although System Preparation tool for Windows Server 2003 Service Pack 2 Deployment claims to install the Sysprep tool, I've never been able to make it work on my system. So don't bother wasting your time. Go to your original install media and grab the file from there.

Creating the Sysprep Image

 

   1. Open <DVD>:\Support\Tools\Deploy.cab and extract setupcl.exe, setupmgr.exe, and sysprep.exe to C:\Sysprep. (N.B. C: is your system drive. If you installed Windows to another drive letter, use that drive letter rather than C:.)

   2. Run setupmgr.exe from C:\Sysprep.

   3. The Setup Manager wizard starts. Click Next...

   4. Create new... Next...

   5. Select "Sysprep setup". Next...

   6. Select the correct OS version... Next...

   7. Select "No, do not fully automate the installation"... Next...

   8. Enter Name and Organization, Time Zone, Product Key, and Workgroup or Domain. The other settings can remain defaulted. Note that you don't want to specify the computer name since you will be creating multiple computers from the base image and you don't want to specify the admin password, even encrypted. If the sysprep program can extract the password from the answer file, so can any hacker worth their salt. Click Next... through to the end.

   9. Finish... Save to C:\Sysprep\sysprep.inf. OK...

  10. Wait while Setup Manager finishes. Cancel... (Yes, odd way to exit a program that has completed successfully.)

  11. Run sysprep.exe.

  12. Click OK.

  13. Ensure that "Don't regenerate security identifiers" is UNCHECKED. You want to regenerate the SIDs when each new clone boots.

  14. Click Reseal, OK to confirm that you want to regenerate SIDs, and wait for the system to shut down.

 

Creating a Cloned Server

 

   1. If you're using VMWare Workstation, create a linked clone of your Sysprepped server. (You can also create a new linked disk using VirtualPC using File... Virtual Disk Wizard and then creating a new VM using the linked disk.)

   2. Change any VM settings such as memory. DO NOT change number of processors from 1 to 2 as the HAL (hardware abstraction layer) for uni-processor vs. multi-processor Windows is different. Your system will blue screen if you do this.

   3. Boot the cloned server.

   4. The Windows Setup wizard will appear. Next...

   5. Accept the license agreement. Next...

   6. Enter a new computer name and administrator password. Next...

   7. Windows will boot and you can log in with the administrator password you just entered.

   8. When prompted, click "Yes" to update your product activation.

   9. Select "Yes, let's activate Windows over the Internet now". Next...

  10. Select "No, I don't want to register now; let's just activate Windows". Next...

  11. OK...

  12. Update this server... to go to Microsoft Update.

  13. Once you're ensured that your patches are up-to-date, you can close the browser and click Finish... then Yes... on the dialog to start using Windows.

 

You should now have a fresh copy of Windows. You can create as many cloned servers as you need for your mini-network.

Tuesday, 6 October 2009

Restart application pool

Source: http://www.sharepoint-girl.com/2007/12/restart-application-pool.html

----

You can restart a specific Application Pool by using the IIS Manager GUI or using cscript.exe in the command prompt.

Restart Application Pool with IIS Manager:
1) Open IIS Manager.
2) Expand the Server node.
3) Expand the Application Pools folder.
3) Right-click on the application pool that you want to restart and then select Stop.
4) Right-click on the application pool again and then selct Start.

Restart Application Pool with cscript.exe in Command Prompt:
1) In the command prompt, type the following command:

cscript.exe c:\windows\system32\iisapp.vbs /a "DefaultAppPool"

 

Which w3wp.exe process belongs to which App Pool in IIS6

Which w3wp.exe process belongs to which App Pool in IIS6

Along with Windows Server 2003 and Internet Information Services 6.0 came a large number of benefits. For us IIS admins, it was a great welcome set of changes. But, one apparent difficultly is matching up the w3wp.exe processes displayed in Task Manager to the Application Pools in IIS.

Review of IIS5

In IIS5.0 (Windows 2000 Server), each site that is set to Out Of Process will spin up a new instance of dllhost.exe. Windows Task Manager lists them. Now, the trick is to find out which dllhost.exe matches which site. My favorite way is to use Component Services. To do so, open Component Services from Administrative Tools, drill down to Computers -> My Computer and select COM+ Applications. Now select View from the top menu and select Status. Beside each site that currently has a dllhost.exe process spun up is the Process ID (PID). Using Task Manager, you can tell the memory and CPU.

Note: If the Process ID doesn't display for you in Task Manager, select View -> Select Columns and add it.

What about IIS6?

But, that doesn't work anymore with IIS6.0. Now each site in IIS6 is placed in an Application Pool. Each Application Pool is completely separated from other App Pools by running in its own process called w3wp.exe. This make life SO much easier. Now, the trick is to match up the process shown in Task Manager with the Application Pool set up in IIS.

If there is a different user for each application pool, Windows Task Manager is the easiest way to find out which application pool belongs to which site since Task Manager will display the user the process runs as.

But, what happens if you have multiple application pools running as the same user? For example, if you keep to the default NETWORK SERVICE user but create multiple Application Pools, you may want to know which process belongs to which App Pool. Component Services doesn't work for this anymore.

Enough already, tell me how to do it!

Have no worries, Microsoft has given us the exact tool for the situation. IISApp.vbs lists all the applications, their PID and their App Pool name.

The script is already placed in systemroot\system32 on Windows Server 2003 so simply go to your Command Prompt and type in iisapp.vbs (the .vbs is optional) and you'll have an instant list of all the App Pool information you've always wanted to know. You may need to type cscript iisapp.vbs instead if CScript isn't your default WSH script host.

Let's see an example of the output:

Here is an example of the output.

W3WP.exe PID: 1468 AppPoolId: AppPoolForSite1.com
W3WP.exe PID: 3056 AppPoolId: AppPooForSite2.com
W3WP.exe PID: 1316 AppPoolId: AppPooForSite3.com

Direct from the horse's mouth, Microsoft documents this:

http://www.microsoft.com/resources/documentation/WindowsServ/2003/standard/proddocs/en-us/Default.asp?url=/resources/documentation/WindowsServ/2003/standard/proddocs/en-us/cl_as_viewapps.asp

Summary

We've seen here that using iisapp.vbs, you can painlessly match up the PID to the friendly name of the Application Pool.

all about 64bit

http://www.start64.com

Monday, 28 September 2009

Install grub on slackware 13

No menu.lst.
Run grubconfig

Thursday, 24 September 2009

Control Firefox via AD

http://www.frontmotion.com/Firefox/fmfirefox.htm
http://sourceforge.net/projects/firefoxadm

Tuesday, 25 August 2009

DHCP mac address filter

http://blogs.technet.com/teamdhcp/archive/2007/10/03/dhcp-server-callout-dll-for-mac-address-based-filtering.aspx

Tuesday, 11 August 2009

Restore Grub

If you have your Linux system in a second (or third...) hard disk this method will not work. Please check Super Grub
Disk's method that address this problem.
1. Boot from a Live CD, like Ubuntu Live, Knoppix, Mepis, or similar.
2. Open a Terminal. Open a root terminal (that is, type "su" in a non-Ubuntu distro, or "sudo -i" in Ubuntu). Enter root passwords
as necessary.
3. Type "grub" which makes a GRUB prompt appear.
4. Type "find /boot/grub/stage1". You'll get a response like "(hd0)" or in my case "(hd0,3)". Use whatever your computer spits out
for the following lines. Note that you should have mounted the partition which has your Linux system before typing this command.
(e.g. In Knoppix Live CD partitions are shown on the desktop but they're not mounted until you double-click on them or mount
them manually)
5. Type "root (hd0,3)".
6. Type "setup (hd0,3)". This is key. Other instructions say to use "(hd0)", and that's fine if you want to write GRUB to the MBR.
If you want to write it to your linux root partition, then you want the number after the comma, such as "(hd0,3)".
7. Type "quit".

Remove cfmon on Windows

Go to Control Panel > Add/Remove Program.
Choose your Mcft Office 2003 Installation and click “Change”.
Choose "advanced customization of applications” , then click Next.
Go to “Alternative User Input” and click on the tab, a dropdown list will appear.
Choose “Not Available” on the dropdown list.
Click Continue.
Ok, now go to Control Panel > Regional and Language Options.
Than choose “Language” tab, click “Details”.
Go to “Advanced” tab, n tick “Turn off advanced text services”.
Click Ok - thats it - you are free from this one!

 

 

 

 

Chong quay roi dien thoai

Trước tiên, bạn đến địa chỉ http://www.vinaphone.com.vn đđăng

ký một tài khoản. Quy trình đăng ký tài khoản ở trang web của

Vinaphone hơi khắt khe và phức tạp. Trước tiên, bạn phải khai

báo số SIM (được in trên mặt sau của SIM, bao gồm 4 dòng, mỗi

dòng 5 số). Khi đăng ký, bạn viết theo thứ tự từ trên xuống dưới, các số viết liền nhau tạo thành một

dòng duy nhất có 20 số SIM. Chẳng hạn, từ trên xuống dưới bạn có 4 dòng số 12348, 75678,

89012, 93456 thì bạn sẽ khai báo liền mạch số SIM là 12348756788901293456.

Sau khi đăng ký, trang web sẽ trả về cho bạn một tin nhắn thông báo mật khẩu để truy cập vào tài

khoản của bạn trên web của Vinaphone. Bạn hãy xóa tin nhắn hoặc cất tin nhắn này cẩn thận đ

không ai biết cả.

Lúc đăng nhập, mục NetID - bạn điền số điện thoại của mình, còn mật khẩu thì lấy trong tin nhắn vừa

nhận lúc nãy. Điểm đặc biệt khi truy cập trang web của Vinaphone là cho phép lưu mật khẩu vào

trình duyệt không giới hạn thời gian nên sau này bạn không mất công gõ lại mật khẩu đđăng nhập

nữa.

Nhưng điều này lại rất nguy hiểm vì người ngoài có thể dễ dàng lấy được mật khẩu sử dụng tài

khoản của bạn và sử dụng vào những mục đích không tốt (Mobile và Sfone thì refresh đăng nhập

sau mỗi 10 phút tài khoản không được active nên độ an toàn cao hơn rất nhiều). Để an toàn hơn,

bạn có thể chọn mục Warn me before logging me into other sites để trang web cảnh báo cho bạn

biết khi có ai đó sử dụng trái phép tài khoản của bạn trên web.

Vì mật khẩu cung cấp sẵn rất khó nhớ nên sau khi đăng ký xong dịch vụ, bạn nên bấm chuột lên liên

kết thay đổi mật khẩu rồi làm theo hướng dẫn để chọn cho mình một mật khẩu an toàn, dễ nhớ hơn.

Tiếp theo, bạn vào mục cài đặt dịch vụ để thiết lập chế độ chặn các cuộc gọi, tin nhắn từ những số

điện thoại bạn không thích bằng cách đánh chọn lên mục chặn cuộc gọi rồi bấm nút thực Hiện. Bây

giờ một tin nhắn sẽ được gửi đến điện thoại của bạn và bạn nhập mật mã xác nhận là xong. Trong

trường hợp không đăng ký được, bạn nên thực hiện lại trong một lúc khác vì có thể lúc đó tổng đài

đang bận.

Lưu ý là hệ thống chỉ cho phép bạn thực hiện thao tác kích hoạt/hủy bỏ mỗi dịch vụ này 1 lần trong

ngày (1 lần kích hoạt hoặc 1 lần hủy bỏ) mà thôi, nghĩa là hôm nay bạn kích hoạt thì ngày mai bạn

mới hủy bỏ được. Sau khi kích hoạt dịch vụ chặn cuộc gọi, mật khẩu ngầm định là 1234. Bạn có thể

tự thay đổi mật khẩu khi sử dụng dịch vụ này từ máy di động của mình.

MobiFone:

Các mạng di động đều cung cấp dịch vụ chặn cuộc gọi từ số điện thoại bạn không thích, nhưng chỉ

duy nhất MobiFone có thêm tính năng chặn tin nhắn từ số điện thoại lạ. Trước tiên, bạn đăng nhập

vào địa chỉ trang chủ của Mobifone tại http://www.mobifone.com.vn rồi chọn mục Gửi tin nhắn > Gửi

tin nhắn > Chặn spam SMS.

Bây giờ, trong khung thêm vào danh sách, bạn chỉ việc điền địa chỉ những số điện thoại không muốn

nhận tin nhắn vào bên trong rồi bấm nút Add. Từ bây giờ, tin nhắn từ số điện thoại kia sẽ không bao

giờ đến được với điện thoại của bạn. Những số điện thoại spam sẽ được đưa vào danh sách hiện ra

bên dưới.

Để chặn cuộc gọi, bạn liên lạc với tổng đài qua số điện thoại 18001090.

Sfone:

Bạn có thể liên lạc trực tiếp tổng đài thông qua số điện thoại 905.

Viettel:

Bạn cũng đăng ký với tổng đài Viettel qua số điện thoại 19008198 (cước phí là 200 đồng/phút),

hoặc 18008119 (miễn phí).

EVN Telecom:

Bạn đăng ký với tổng đài qua số điện thoại 18009096

map ftp server as network drive

How can I map to an FTP server as a drive?

 

A. Its possible to configure a machine to map to a FTP server as a drive (for instance the Microsoft site)

providing the machine runs both NetBEUI and TCP/IP. Perform the following:

Perform a NSLOOKUP for the FTP site, e.g.

nslookup ftp.microsoft.com

make a note of the IP address

1.

2. Edit the LMHOSTS file (in %systemroot%\system32\drivers\etc)

Add line

<ip address> MicrosoftFTP #PRE

e.g. 207.46.133.140 MicrosoftFTP #PRE

3.

4. Save the file

Open a CMD.EXE session. Enter command:

nbtstat -R

This purges and reloads the name table cache

5.

Type command:

net view \\MicrosoftFTP

You should see information on the site

6.

Now map a drive (to share data)

net use * \\MicrosoftFTP\data /user:anonymous

7.

8. All done. It will pass a drive letter for the connection

 

 

Friday, 7 August 2009

script to create users - home folders and ntfs permissions

Complete script to create users, home folders and ntfs permissions

Assuming that you have a file users.txt with this format:

Last_name First_name Group Password

This script automatically create groups in the specified ou Sales, add users to this ou and to the respective groups, give users specified passwords, assign a logon script, create and share home folders and give ntfs permissions on them....a lot of work isn't it?

I must say that the script uses the rmtshare tool for setting shares, available for download from Microsoft.

 

@setlocal

@set ou=OU=Sales,DC=test,DC=com

@set domain=test.com

@set domainadmins=CN=Domain Admins,CN=Users,DC=test,DC=com

@set domainusers=CN=Domain Users,CN=Users,DC=test,DC=com

@rem Creation of groups

for /f "tokens=1,2* delims= " %%a in (users.txt) do dsadd group "CN=%%c, %ou%"

@rem Creation of users

for /f "tokens=1,2* delims= " %%a in (users.txt) do dsadd user "CN=%%b %%a, %ou%" -upn "%%b %%a" -fn %%b -ln %%a -display "%%b %%a" -loscr Scripts\logon.bat -pwd %%d -memberof "CN=%%c, %ou%"

@rem Creation of personal folders (home folders)

for /f "tokens=1,2* delims= " %%a in (users.txt) do md "D:\Homes\%%b %%a"

@rem Make shares on home directories

for /f "tokens=1,2* delims= " %%a in (users.txt) do rmtshare \\%COMPUTERNAME%\"%%b %%a$" = "D:\Homes\%%b %%a"

@rem Grant share rights on home folders

for /f "tokens=1,2* delims= " %%a in (users.txt) do rmtshare \\%COMPUTERNAME%\"%%b %%a$" /grant "%domain%\%%b %%a":CHANGE /grant "%domain%\Domain Admins":"FULL CONTROL"

@rem Give NTFS rights on home folders

for /f "tokens=1,2* delims= " %%a in (users.txt) do cacls "D:\Homes\%%b %%a" /T /C /G "%domain%\%%b %%a":C "%domain%\Domain Admins":F

 

 

 

Friday, 31 July 2009

Understand DHCP superscope

What is Superscope?

A superscope is a collection of individual scopes that can be
managed as a single administrative unit. That's what the book
says, so it must make sense, right? Well if that doesn't make
much sense to you, join the club. Let's see if we can shed some
light on what superscopes are and what they can be used for.

A superscope is actually a collection of individual scopes. When
you group different scopes together into a single superscope, you
can do the following:

Place DHCP clients from multiple network IDs on the same
physical segment
Allow remote DCHP clients from multiple network IDs to
obtain an address from a DHCP Server
Place multiple DHCP Servers on the same physical segment,
with each DCHP Server being responsible for a different
scope.


The superscope will allow the DHCP Server to answer requests from
DHCP clients from different network IDs. Now, you might ask,
can't you just create multiple scopes on a DHCP Server and then
everything will be cool? Let's see what happens.


Multiple Scopes on a Single DHCP Server

Imagine that you have configured a DHCP Server with two scopes
serving the entire address range for the following network IDs:

192.168.1.0/24
192.168.2.0/24

The DHCP Server has a single network interface, and its IP
address is 192.168.1.5. You want the DHCP Server to answer
requests from clients on its locally attached network
192.168.1.0/24, and from the remote network, 192.168.2.0/24. The
remote DHCPRequest messages are forwarded through BOOTP Relay.
What will happen when a request from a client on the
192.168.2.0/24 makes a request to this DHCP Server?

The request is forwarded through the BOOTP Relay to the DHCP
Server. The DHCP Server checks the giaddr field in the
DHCPRequest or Discover message to see what network ID the
request is coming from. The DHCP Server compares this information
with the network ID assigned to its local interface. If the
network ID in the request and the network ID of the DHCP Server's
interface is the same, the DHCP Server will check to see if it
has a scope that can service the request. If it does have a
scope, it continues the DHCP negotiation.

However, if the request from a network ID that is different from
that of the DHCP Server, the DHCP Server will see if it has a
superscope that includes an address pool that can service that
network ID. If it does not have such a superscope, then it will
send a NACK packet, and the DHCP client must start all over
again.

How about adding multiple IP addresses to the DHCP Server's
Interface? In this way, the DHCP Server would be able to compare
the source network ID with the addresses on its interface, and
see that the source was on the name network ID as the DHCP
Server. Now it wouldn't need to look for a superscope.

This will not work! It will not work because when you bind
multiple IP address to a single adapter on the DHCP Server, the
DHCP Server service will only use the primary IP address to make
its assessments. It will not use any of the secondary IP
addresses bound to the adapter.

A solution to this problem could be to include a second NIC on
the DHCP Server and assign it a primary address on the
192.168.2.0/24 network ID. However, using a superscope is a lot
easier and a lot cheaper than adding new hardware.


What About Multinets?

A multinet is a single physical network segment that supports
multiple network IDs. A Windows 2000 DHCP Server can be used to
support multinet configurations. When would you want to configure
a multinet? Perhaps when you've used up all the IP addresses in
the scope that you've already configured on the physical segment,
and you want to add more hosts to that segment. In this case, a
multinet is your solution.

A multinet presents the same problems, and the same solutions as
our example above. You can either add multiple network interface
cards to the DHCP Server or assign an IP address on each card
dedicated to the required network IDs, or you can create a
superscope.


Multiple DHCP Servers on a Single Physical Segment

Perhaps you considered the possibility of placing multiple DHCP
Servers on the same physical segment to solve the problem of
issuing IP address for multiple network IDs. Let's take a look at
what might happen here.

We have two DHCP Servers, DHCP-1 and DHCP-2. The DHCP Servers
contain scopes that include all addresses for the following
network IDs:

DHCP-1 192.168.1.0/24
DCHP-2
192.168.2.0/24

Now imagine that a DHCP client with IP address 192.168.1.10 needs
to renew its IP address. When the client sends out its
DHCPRequest message to renew its address, that request is
broadcast to the entire segment. Therefore, either DHCP Server
can receive the message. If DHCP-2 receives the message, it will
check the network ID on the request and compare that with the
network ID on its local interface and find that the source
network ID is different from its own network ID. Since these are
different, DHCP-2 will look for a member scope in a superscope
that can service this request. Since there is no superscope to
service the request, DCHP-2 will send a NACK to the client.

After receiving the NACK, the DHCP client then has to begin the
discovery process from the beginning and send out a DHCPDiscovery
packet. Let's say that DHCP-2 is the first to respond to the
DHCPDiscover packet, and assigns the clients the IP address of
192.168.2.15. Hey look at that! The client is now a located on a
different network ID. And what's really rich is that the whole
thing could start all over again, and the DHCP client could end
up on network ID 192.168.1.0/24 again.


The Solution

The solution is to configure superscopes on both DHCP Servers,
and then exclude all the addresses on one of the scopes. For
example:

DHCP-1
Superscope
192.168.1.1-192.168.1.254
192.168.2.1-192.168.2.254
Exclude:
192.168.2.1-192.168.2.254

DHCP-2
Superscope
192.168.1.1-192.168.1.254
192.168.2.1-192.168.2.254
Exclude:
192.168.1.1-192.168.1.254

With this configuration, what happens to the DHCP client that
tries to renew its IP address, 192.168.1.10?

If DHCP-2 receives the DHCPRequest message, rather than sending a
NACK, it will just ignore the message, because it does have a
scope for the client's network ID, but just doesn't have any
addresses available because they've all been excluded. The client
will try again, and perhaps again, and sooner or later will
contact DHCP-1 and renew its IP address. The key here is that
when you configure the scope for network ID 192.168.1.0/24 and
then exclude all the addresses in the scope and make it part of
the superscope, DHCP-2 will ignore requests from clients from
that network ID.


Conclusion

If you didn't know about the utility of superscopes, you do now.
You now know that putting multiple scopes on a single DHCP Server
and letting 'er rip won't do the job, and so you have to consider
the network IDs of the clients that need to access the DHCP
Server, and the IP addresses and network interfaces on the DHCP
Server.

Superscopes allow you to not add extra network interfaces to your
DHCP and still be able to service DHCP clients from multiple
network IDs. They also allow you to place multiple DHCP Servers
on a single physical segment and prevent clients from obtaining
IP addresses on a different network ID as well as reducing the
number of NACKS send by the DHCP Server. This will help reduce
the number of NACK entries in your Event Log as well.

Wednesday, 29 July 2009

english links

Describe graphs
http://adw.hct.ac.ae/site_ilc/sites_ielts/graphsite/index.htm

Friday, 24 July 2009

howto-remotely-disconnect-a-terminal-services-session

Authenticate to the server you wish to manage. You can
easily accomplish this by mapping a network drive to a share on the
target server. Start a command prompt and type

/qwinsta /server:yourservername/

where /yourservername/ is the name or IP address of the server you wish
to manage.

In my case I ran /qwinsta /server:10.0.0.2/

<http://thebackroomtech.files.wordpress.com/2008/04/qwinsta1.jpg>

You can see the Administrator account is logged into session 0 and the
admin account is logged into session 1. To disconnect the admin session
with ID=1 I'll run the following from a command prompt:

/rwinsta ID /server:yourservername/

where /ID/ is the process ID of the sesstion you wish to terminate, and
/yourservername/ is the name or IP address of the server you wish to manage.

In my case I ran /rwinsta 1 /server:10.0.0.2/

<http://thebackroomtech.files.wordpress.com/2008/04/rwinsta.jpg>

I again ran /qwinsta /server:10.0.0.2 /which verified session 1 had been
disconnected. I confirmed that I was once again able to login to
Terminal Services.

Howto: enable remote desktop on a windows xp machine – remotely

Howto: enable remote desktop on a windows xp machine – remotely

May 18, 2007 — Julie

I've been configuring my LAN for spiceworks
<http://thebackroomtech.wordpress.com/2007/05/18/spiceworks-a-free-it-management-system/>
this afternoon. The Windows XP firewall is enabled on most of our PCs,
and I didn't want to visit each station to configure it to allow
spiceworks to inventory the machine. I'm also not big into group policy
here at the office (what the saying about the cobbler's son's shoes?) so
I didn't want to make the setting change that way.

My first idea was to use remote desktop to access the computers from my
machine. That worked fine, since I have local administrator access on
each machine… but I'd have to interrupt each user's work, log them off,
make my firewall adjustments, then tell them it's okay to log on now…
assuming that I could even get into their machines remotely.

I needed a solution for users with remote desktop disabled. If your
remote user has administrator access to their machine, have them click
on Start – Run and type:

netsh firewall set service remoteadmin enable

netsh firewall set service remotedesktop enable

[note: remoteadmin = remote administration, while remotedesktop = remote
assistance /and/ remote desktop]

You can also enable remote desktop over the network via regedit if you
have administrator rights to the remote machine:

1. Run *Regedit*
2. Select *File* –> *Connect Network registry*
3. Enter the *name* of the remote computer and select *Check Name*
4. At the bottom of the registry tree you will see *2 Hives* appear
*Hkey_Local_Machine* and
*Hkey_Users* (under the remote computer's name)
5. Goto *hklm\system\currentcontrolset\control\terminal
server\FdenyTSConnections=1*
6. Change the *FdenyTSConnections* to *0*
7. Attempt to *Re-Login*

This worked okay, but I like to implement the most elegant solution
possible.

So I fired up the command line on my local machine, and used psexec
<http://www.microsoft.com/technet/sysinternals/utilities/psexec.mspx> to
configure the firewall service on the remote machine via netsh. The
users never even knew I was working on their computer, which is fine by me.

To enable remote access to a machine via the command line, type:

psexec \\remotecomputername netsh firewall set service remoteadmin enable

psexec \\remotecomputername netsh firewall set service remotedesktop enable

If you aren't familiar with the PStools
<http://www.microsoft.com/technet/sysinternals/FileAndDisk/PsTools.mspx>
suite of utilities, and you like administration from the command line,
you need to check out the Sysinternals web site
<http://www.microsoft.com/technet/sysinternals/default.mspx>. Too bad
they were acquired by Microsoft in 2006.

Tuesday, 14 July 2009

Unix-Koans

very interesting!!

http://www.catb.org/~esr/writings/unix-koans/

Compiling the Linux Kernel

SOURCE: http://www.techenclave.com/printthread.php?t=5099
---------------
Compiling the Linux Kernel [Version 2]

Reasons to recompile your Linux kernel
1.You’ve bought some new hardware and want support for it in Linux.
2.You want to access features of Linux that have been turned off.
3.Something is fishy in your operating system.
4.You want to show off to all your friends and brag about how you are a (false) Linux guru.
5.You have nothing better to do.
6.You really want to.

Compiling the Linux kernel isn’t all that difficult really, but it is admittedly time consuming.
I will divide this tutorial into three parts:
1. Pre-configuration
2. Configuration
3. Post-Configuration

I have used kernel version 2.6.12. This tutorial is specific to 2.6.12 though other kernels in 2.6.x are probably similar. Download the latest version of the Linux kernel from www.kernel.org

I have tried this on two Linux distros :
1. A 32 bit PCQ Linux 2004 (Fedora core based)
2. FC3 – 64 bit. Sadly I was unsuccessful here as I will later explain.

Target Audience:
I have also assumed that the computer in question is a (possibly) dual boot home PC. This document is not really suitable for advanced users. Laptop users should also avoid messing around with their kernel too much – previous versions (2.4.x) have been known to irreparably damage laptops when not configured properly.

The configuration process depends a lot on the hardware you are using.
My setup is:
AMD 64 3200+
512 MB DDR 400 RAM
Nvidia nforce3 150 based motherboard.
Onboard sound Realtek ALC 658 (which, unfortunately is not easily configured in Linux)
ATI Radeon 9600 pro.
Silicon Image 3512A (SATALink)


(Some of you may have seen my previous guide over here. This one, I hope, is more accurate and comprehensive.)

Pre-Configuration

1. Visit www.kernel.org and download the latest stable kernel (at the time of writing it was 2.6.12).
2. Copy the downloaded kernel to /home/USERNAME
3. Uncompress the kernel
4. bunzip2 linux-2.6.12.tar.bz2 if you have the bzipped format
5. gunzip linux-2.6.12.tar.gz if you have downloaded the gzipped format
6. tar –xvf linux-2.6.12.tar
7. Change to the linux directory: cd linux-2.6.12
8. Make mrproper to remove any old configuration files or object files.
i. make mrproper
9. If you want to use an older configuration file then copy it over to .config. If you want a reference configuration file then you can use the config file in the appropriate subdirectory of ~/linux-2.6.12/arch. Actually, if you do nothing, the reference config file is read from the appropriate arch directory.
10. Issue one of four commands
make oldconfig (asks you to add new options as yes/no/module –not recommended)
make menuconfig (uses a terminal not unlike your bios screen)
make xconfig (uses GUI)
make config (first edit .config then run this command – very advanced users only)
Personally I go with make menuconfig. It simple in its design and easy to understand considering that there are well over a thousand options distributed under various subheadings.
If you run a system with KDE running, use make xconfig (issue it from xterm or any other terminal emulator, not the console). It looks quite attractive.
You may run in to problems with this in some cases, try make gconfig for GNOME based GUIs.

Post Configuration
In interests of not scaring the hell out of you, I will tell you the post-configuration section first. Firstly, check the dependencies (whether you have all the tools you need). Information on that can be found in ./Documents/changes.txt file. If you have a distro running any 2.6.x kernel it should be fine.

1. After running one of the make *config methods and saving the .config file you have to make the kernel (actual compilation process).
2. The command is: make.
3. Beware - the above command can take a little while. On my computer it took 6 or 7 minutes (on the 64 bit distro) and 18 minutes on the 32 bit PCQ Linux (there is some sort of bug in that, INIT keeps on restarting itself). It may take longer on slower computers. Don’t worry if it throws up warning messages. These are to do with the Linux source code and there is nothing you can do about them (unless, say, you are a Linux kernel developer).
4. change to root: su
5. Copy the image to /boot directory: cp /home/USERNAME/linux-2.6.12/arch/i386/boot/bzImage /boot/vmlinuz-2.6.12
6. If you are compiling on some architecture other than i386 (e.g. x86_64), replace the i386 above with the appropriate architecture.
7. Install the modules by issuing the command: make modules_install .
8. Copy the system map to /boot directory by issuing the command: cp /home/USERNAME/linux-2.6.12/System.map /boot/System.map-2.6.12
(NOTE: needed only for 3rd party boot managers)
9. Change to the /boot/grub directory : cd /boot/grub
10. Edit grub.conf and include the following lines:
title KingKrool’s Linux kernel 2.6.12
root (hdx, y)
kernel /boot/vmlinuz-2.6.12 ro root=/dev/hdpn
The first line is the title to appear in the Grub screen.

The second line gives the drive on which grub is installed. x and y must be replaced with the appropriate values. Eg. For the second logical drive on the first physical drive x = 0, y = 1. This is not fixed though. The best way would be to boot into Linux (using the old kernel) and use the hardware browser (in System tools of RH /FC distros). Depending on your installation there will be two or three linux partitions. If there are three the smallest will be the boot partition, the largest partition is root and third is swap. If there are two then the larger one is boot+root and second is swap.
If the label given is /dev/hdb3 then x = 1, y = 2.

The third line gives the kernel location. If you have a dedicated boot partition then /boot is not necessary in the path, otherwise the full path is required (i.e. all paths are relative to /boot). In root=dev/hdpn p and n are from above.
If the drive was listed as /dev/hda8 then p = a n = 8 (copy as is).

The simplest way to configure the kernel is to copy the existing code for any Linux kernel and just make a few modifications to the kernel image path.

If you have compiled support for the filesystem of the root partition as a module then you will have to add the following line at the end (4th line)
initrd (/boot)/initrd-2.6.12.img
(/boot) is used only if boot and root partitions are the same.
The file intrd-2.6.12.img has to be made by issuing the command
/sbin/mkinitrd /boot/intird-2.6.12.img `kernel version` where `kernel version` is 2.6.12 to which you append the string (if any) entered in local version.
Even if you have not compiled the FS as a module, it is still recommended to create an initrd – it is needed on several distributions, and will be necessary in the future due to the deprecation of devfs in the kernel (just take my word for it).
Save the file and exit. Reboot your computer and you are ready to use the new kernel!

Remember to leave the old kernel entries intact, that way if you have problems, you can always go back to the old kernel.



CONFIGURATION
NOTES:
Kernel modules are small pieces of compiled code which can be inserted in the running kernel, rather than being permanently built into the kernel. You use the "modprobe" tool to add (and sometimes remove) them.

Only some options can be compiled as modules. In menuconfig, they are marked < >. Press M to compile as a module. In xconfig, click multiple times. A tick means compiled in, a dot means module.

The [….] (eg. [EXPERIMENTAL]) refers to the option name as seen in the .config file. It will be prefaced by CONFIG_ (eg. CONFIG_EXPERIMENTAL=y). Just a little bit of trivia.


Code Maturity Level Options
Prompt for development and/or incomplete code/drivers
[EXPERIMENTAL]
Purpose: You have the option of using experimental (alpha-test) drivers and obsolete drivers.
Suggestion – exclude. However, if you are sure of what you are doing you can include it. This is only for developers or people who have an excellent idea of their hardware configuration. NOTE: you might need to enable this for SATA as explained at the end of the configuration section.

Select only drivers expected to compile cleanly
[CLEAN_COMPILE]
Purpose: If the previous option was selected, then this one appears. Select this
option when you do not even want to see the option to configure known broken drivers.
Suggestion – this option should not even show up, as, in general, the previous option should not have been included.

General setup
Local version - append to kernel release
Purpose: Append an extra string to the end of your kernel version.
This will show up when you type uname.
Select this and type in a string (up to 64 characters)
Suggestion – If you want to customize your OS, including this will really earn you geek points with your techie friends.

Support for paging of anonymous memory
[SWAP]
Purpose: Allows the kernel to have more virtual memory than RAM using swap files or swap devices.
Suggestion – Definitely build this in. If you have loads of RAM you might avoid this, but it is in general a bad idea to try to exist without a swap file. Exclude it on embedded systems, or real time systems only.

System V IPC
[SYSVIPC]
Purpose: This is a feature from the Unix background that Linux has come from. Required for many programs.
Suggestion – build in. There are many common programs that require IPC (inter process communication) provided by this feature.

BSD Process Accounting
[BSD_PROCESS_ACCT]
Purpose: Allows user level programs to specify that process accounting information be stored.
Suggestion – build in.

BSD Process Accounting version 3 file format
[BSD_PROCESS_ACCT_V3]
Purpose: This one show up only if you included the previous option.
Suggestion – leave it out for now.

Sysctl support
[SYSCTL]
Purpose: Allows modification of certain kernel parameters on the fly.
Suggestion – build in. In case of rescue disks it can be left out.

Auditing support
[AUDIT]
Purpose: Required by various kernel subsystems such as SELinux.
Suggestion – build in. It probably won't hurt.

Enable system-call auditing support
[AUDITSYSCALL]
Purpose: Enable low-overhead system-call auditing infrastructure. (appears only if previous option was selected)
Suggestion – might as well build this one in too.

Kernel Userspace Events
[KOBJECT_UEVENT]
Purpose: enables the kernel userspace event layer.
Suggestion – build in.

Kernel .config support
[IKCONFIG]
Purpose: This option enables the complete Linux kernel ".config" file
contents to be saved in the kernel. This information can be extracted from the kernel image file with the script scripts/extract-ikconfig It can also be extracted from a running kernel by reading /proc/config.gz if enabled.
Suggestion – built in. Makes it easier to compile your kernel the next time as you can just load the previous .config and select the changes.

Enable access to .config through /proc/config.gz
[IKCONFIG_PROC]
Purpose: This option enables access to the kernel configuration file through
/proc/config.gz.
Suggestion – build in.
Configure standard kernel features (for small systems)
[EMBEDDED]
Purpose: This is for non standard kernels.
Suggestion – leave it out.

Loadable Module Support

Enable loadable module support
[MODULES]
Purpose: Allows you to build a modular kernel. If you don't want to use modular kernels exclude it. Generally it is a good idea to keep it as you can then build a smaller (and faster) kernel this way.
Suggestion – build in.

Module Unloading
[MODULE_UNLOAD]
Purpose: Enables module unloading facility. All modules may not be able to make use of this feature (though that will not cause any errors).
Suggestion – build in.

Source checksum for all modules
[MODULE_SRCVERSION_ALL]
Purpose: Used by module developers.
Suggestion – leave it out.

Automatic Kernel Module Loading
[KMOD]
Purpose: Allows certain parts of the kernel to automatically load kernel modules using modprobe. It’s probably a good idea to include this unless you are sure of what you are doing.
Suggestion – build in.

Processor type and features

Subarchitecture type – Select PC Compatible (unless you are running non x86 systems)

Processor Family – Your processor should be automatically detected, but do scroll down the list to make sure that it has been selected correctly. Previously AMD64 was detected as K7 rather than K8 (in 2.6.6). Make sure that you choose the correct case (you can safely choose a lower level but never select a configuration higher than your own). Failure to make a proper choice can lead at best to a loss of features and at worst a kernel that fails spectacularly.

Generic x86 support
[X86_GENERIC]
Purpose: Includes Optimizations for processors other than the one selected.
This is required only if you wish to distribute the kernel you have compiled to machines of another architecture.
Suggestion – exclude.

HPET timer support
[HPET_TIMER]
Purpose: Uses the new HPET timer for the kernel's internal timing rather than the venerable 8254 (Anyone who has done a microprocessor techniques course will tell you that the 8254 was made way back in the late 70s and is still in use). It is safe to include this feature as it is only enabled if the platform supports it.
Suggestion – build in.

Provide RTC interrupt
[HPET_EMULATE_RTC]
Purpose: Related to the previous option but there is no documentation on the feature.
Suggestion – leave it out, I guess. It appears to have to do with emulating the real time clock (provided by/using?) the HPET (I infer this from the name).

Symmetric multi-processing support
[SMP]
Purpose: This enables support for systems with more than one CPU (symmetric multiprocessor systems).
Suggestion – if you have more than one processor in your system include this.
This is required to use the hyper-threading feature on processors that support the feature.

Preemptible Kernel
[PREEMPT]
Purpose: Allows low priority processes to be preempted even while in kernel mode (For further explanation read up about the linux process management from a good book).
Suggestion – built in for desktop systems, RTS or embedded.

Preempt The Big Kernel Lock
[PREEMPT_BKL]
Purpose: This option reduces the latency of the kernel by making the
big kernel lock preemptible (what does that mean?). This arises from the previous option.
Suggestion – build in.

Local APIC support on uniprocessors
[X86_UP_APIC]
Purpose: Allows uniprocessors with a local APIC to use this APIC. It can be safely enabled with no slowdown even if it is not present (some of you may have seen an option in the bios dealing with this).
Suggestion – build in.

IO-APIC support
[X86_UP_IOAPIC]
Purpose: this option appears only if you have selected the last one.
Suggestion – Similar to the last option and can be built in. If you have an SMP, it is likely that you will require this.

Machine Check Exception
[X86_MCE]
Purpose: Returns errors to the kernel if the processor detects an error (overheating etc)
Suggestion – built in is a safe option for everyone except Pentium users. Some older Pentiums (Pentium 1s) have a design flaw and report false MCE events. So Pentium users should be cautious while enabling this option. 386s and 486s do not have this feature, so in such cases this option can be excluded (it is still safe to enable it though).

Check for non-fatal errors on AMD Athlon/Duron Intel Pentium 4
[X86_MCE_NONFATAL]
Purpose: Similar to above, but returns errors specific to these processors.
Suggestion – module.

Check for P4 thermal throttling interrupt
[X86_MCE_P4THERMAL]
Purpose: Prints a message whenever the P4 enters thermal throttling.
Suggestion – user's choice.

Toshiba Laptop Support
[TOSHIBA]
Purpose: Useful only on Toshiba Laptops having a Toshiba bios.
Suggestion – exclude unless your system satisfies the above criterion.

Dell Laptop Support
[I8K]
Purpose: Useful only on the Dell Inspiron 8000.
Suggestion – exclude unless your system satisfies the above criterion.

Enable X86 board specific fixups for reboot (X86_REBOOTFIXUPS)
Purpose: This enables chipset and/or board specific fixups to be done
in order to get reboot to work correctly.
Suggestion - Currently, the only fixup is for the Geode GX1/CS5530A/TROM2.1. Combination. Others should exclude.

/dev/cpu/microcode – IA32 CPU microcode support.
[MICROCODE]
Purpose: If you say Y here and also to "/dev file system support" in the
'File systems' section, you will be able to update the microcode on
Intel processors in the IA32 family, e.g. Pentium Pro, Pentium II,
Pentium III, Pentium 4, Xeon etc.
Suggestion – exclude. I have never heard of anyone ever using this.

/dev/cpu/*/msr – Model specific register support
[X86_MSR]
Purpose: Enables privileged processes access to MSRs.
Suggestion – module.

/dev/cpu/*/cpuid – CPU information support
[X86_CPUID]
Purpose: Access to the x86 CPUID instruction.
Suggestion – module.

High memory support
[NOHIGHMEM / HIGHMEM4G / HIGHMEM64G]
Suggestion – If you have not more than 1GB RAM then say “off”.
1- 4 GB then select 4GB
Up to 64 GB then select 64 GB. (Only on systems supporting PAE!)

Allocate 3rd level page tables from high memory.
[HIGHPTE]
Purpose: Setting this option will put user space page tables in high memory.
This avoids the waste of low memory space in systems having large amount of RAM.
Suggestion – build in. This option appears only if you have selected the previous option.

Math Emulation
[MATH_EMULATION]
Purpose: Emulates a math coprocessor on systems which do not have one.
Suggestion – exclude, unless you are running a 386 or 486SX without a coprocessor (unlikely).

MTRR support
[MTRR]
Purpose: Memory Type Range Registers may be used to control access to AGP and PCI buses. Improves performance of video cards.
Suggestion – build in.

Boot from EFI support
[EFI]
Purpose: This option has a meaning only on IA64 systems.
Suggestion – exclude.

Enable seccomp to safely compute untrusted bytecode
[SECCOMP]
Purpose: This kernel feature is useful for number crunching applications
that may need to compute untrusted bytecode during their
execution.
Suggestion – build in.

KingKrool 26 Jun 05 07:24 PM
Power Mangement Options

This section is highly system dependent. I would advise going through each option carefully. Many of the options are only for mobile systems or those running on mobile Pentium or Athlon processors.

Power Management support
[PM]
Purpose: Enables ACPI / APM
Suggestion – build in.

I won't describe the APM/ACPI options. If possible, use ACPI (some older systems will only support APM, others may not even support that). APM is deprecated.

CPU Frequency scaling
[CPU_FREQ]
Purpose: CPU Frequency scaling allows you to change the clock speed of
CPUs on the fly. Note that this driver doesn't automatically change the CPU
clock speed, you need to either enable a dynamic cpufreq governor
after boot, or use a userspace tool.

Enable CPUfreq debugging
[CPU_FREQ_DEBUG]
Suggestion – exclude

CPU frequency translation statistics
[CPU_FREQ_STAT]
Purpose: This driver exports CPU frequency statistics information through sysfs file system
Suggestion – exclude.

Default CPUFreq governor
This option sets which CPUFreq governor shall be loaded at
startup. If in doubt, select 'performance' ie. [CPU_FREQ_DEFAULT_GOV_PERFORMANCE].

Enable 'powersave' governor [CPU_FREQ_GOV_POWERSAVE],
'userspace' governor for userspace frequency scaling [CPU_FREQ_GOV_USERSPACE] and 'conservative' cpufreq governor [CPU_FREQ_GOV_CONSERVATIVE]. In case of desktop systems (excluding AMD systems), enable 'ondemand' cpufreq policy governor [CPU_FREQ_GOV_ONDEMAND] instead of 'conservative'.

CPUFreq processor drivers
Enable the appropriate driver (if any) for your system.

PCI Support
[PCI]
Purpose: Required if the system bus is PCI (as it is on almost all systems from P1 upwards).
Suggestion – build in.

PCI Access Mode – any [PCI_GOANY].

PCI Express support
[PCIEPORTBUS]
Purpose: This automatically enables PCI Express Port Bus support
Suggestion – if you have PCIE on your motherboard, build this in.

Message Signaled Interrupts (MSI and MSI-X)
[PCI_MSI]
Purpose: This allows device drivers to enable MSI (Message Signaled
Interrupts).
Suggestion – exclude for now, it is a new feature.

Legacy proc/pci interface
[PCI_LEGACY_PROC]
Purpose: Legacy support. Newer tools are now in use (ie lspci).
Suggestion – exclude.


PCI device name database
[PCI_NAMES]
Purpose: The kernel contains a database of all known PCI devices.
Disabling this feature replaces the device names by device IDs. It also reduces kernel image size by 80KB (though this memory can be freed at runtime).
Suggestion – build in. If you are creating a boot disk then it can be excluded.

PCI Debugging
[PCI_DEBUG]
Purpose: Produces PCI debug information and writes it to the system log.
Suggestion – exclude.

ISA Support
[ISA]
Purpose: Required only if you have ISA slots in your system.
Suggestion – Most modern systems do not have ISA slots (the Intel 875 may be an exception). It can, therefore, be excluded in such systems.
If your system does have ISA slots then include this as well as all subsequent options that appear on enabling it (except VESA Local Bus priming).

MCA Support
[MCA]
Purpose: Required on systems having Microchannel architecture.
Suggestion – This is supported only on a few systems from IBM. For most systems it should be excluded.

NatSemi SCx200 support
[SCx200]
Suggestion – Required only if you have the National Semiconductir
SCx200 processor. Exclude for most systems.

PCMCIA/ Cardbus Support
Purpose: This sub menu includes several options. It is necessary only on laptops.
Suggestion – exclude on desktop systems. On laptops it should be built in, giving access to several other options not described here.

Executable File Formats

Kernel Support for ELF binaries
Purpose: Required for using Binaries compiled in the ELF format. As the conversion to ELF was started in 1995, this option can be considered critical.
Suggestion – built in.

Kernel support for a.out and ECOFF binaries
Purpose: Required to run certain old binaries which were in the a.out format which is now dead (this has nothing to do with the fact that the default name of all files compiled by gcc is a.out, that was just a convention which is still followed). Needed only if you have really old binries lying around.
Suggestion – exclude. If absolutely necessary then include it as a module.

Kernel support for Miscellaneous binaries
Purpose: Plug wrapper-driven binary formats into the kernel.
Suggestion – built in.
Device Drivers
This is one of the weirdest parts of the configuration, and unfortunately, one which I can't help you with. There are hundreds if not thousands of options, all of them system dependent. I will give you a few tips though.

If you started your configuration using an existing reference .config (whether of the current running kernel or from /arch/... subdirectory) then you should have it a bit easier.

Include Parallel support (module) if you use the parallel port on your PC. Include PC-style hardware under this, but not Multi-IO cards.

Include PnP support – this is important.

Under block devices -
Normal floppy disk support – include
Parallel port IDE device support – exclude (unless you use an external CDROM / HDD connected to your parallel port.
Include Loopback device support (module)
RAM disk support – include
Leave the default values of RAM disk number and size.
Initial RAM disk (initrd) support – include.
Support for Large Block Devices – exclude (do you have a 2 TB disk?)
Packet writing on CD/DVD media – include (module)
ATA over Ethernet support – exclude (most of the time)

Use the CFQ I/O scheduler and exclude the others

ATA/ATAPI/MFM/RLL support – DEFINITELY include unless you have a pure SCSI system. Haven't heard of those for a long time.

Support for SATA [BLK_DEV_IDE_SATA] under Enhanced IDE/MFM/RLL disk/cdrom/tape/floppy support – exclude, as it is deprecated. Do not worry if you have SATA hard drives, there is another driver for them.

Include:
IDE/ATAPI CDROM support
IDE/ATAPI FLOPPY support
PCI IDE chipset support
generic/default IDE chipset support
Generic PCI bus-master DMA support
Use PCI DMA by default when available
AMD and nVidia IDE support (nForce users only)
Your SATA controller may be listed here, so include it as well.
For any chipset you don't have – exclude it.

Include SCSI device support. It IS required for USB storage. Also include legacy /proc/scsi/ support and SCSI disk support (for USB storage). Exclude everything else under SCSI and its submenus (except SATA support).

Multiple devices driver support - exclude. Few people use software raid or LVMs on desktops.
I2O support – exclude.

Do not disable networking, it is required even by some non-network programs.
Networking options – leave the defaults, but most people can get rid of Appletalk and IPX.
Choose the correct n/w card option - "Tulip" family network device support is used by NC100 based cards.

Do you have IR ports, Token Ring, Bluetooth, FDDI, 10Gbps networks? Use common sense and exclude everything in these sections.

Wireless LAN – include only on systems with a wireless card of some type. You will still need drivers.

WAN interfaces support – exclude. No one connects to a WAN using an interface card on a desktop. Very rare.

ISDN support – do you use ISDN? I don't, nor do I know anyone who does anymore.

Character devices -
do you need non standard serial support? – mostly no.
Intel/AMD/VIA HW Random Number Generator support – yes if you have an i8xx series chipset. Presumably it should work for i9xx series as well, but I can't be sure of that.
/dev/nvram support – include.
/dev/agpgart – build in (module).

Lookout for your chipset driver for AGP support in character devices and make sure to include it (all others can then be excluded). Specifically, there is support for i865 and nforce 1 and 2, SIS and VIA, apart from several others (If you have nforce3 you can try nforce2 driver).

If you have a Radeon then include its driver under Direct Rendering Manager of Character Devices.

Configure Graphics support carefully. It can cause problems otherwise.

Under sound, select ALSA, not OSS (which is deprecated).
In ALSA, under PCI devices, select your soundcard. There is support for quite a few soundcards – Aureal, Audigy, SBLive, AC97, Intel HD Audio and many others.

USB support should also be configured carefully. Most people now have USB 2.0, so it along with USB 1.1 should be selected. Include USB storage if you are likely to use a pen drive.

Remember this section is largely about common sense. If you don't have need for a particular feature, or do not have certain hardware, then in most cases it is safe to switch it off. This however, does not apply to the networking and SCSI. Be careful there.

File Systems
This is another large section, so I'll just mention whether you should include an option or not.

Second Extended fs support – build in for Redhat/Fedora etc distros.
EXT2 extended attributes – exclude.
EXT3 journalling file system support - build in for Redhat/Fedora etc distros.
EXT3 extended attributes – exclude.
(extended attributes must be included if you want to use SELinux or the like)
JBD debugging support – exclude.
Reiserfs support – include on SUSE, Mandrake and others.
JFS support – exclude.
XFS support – exclude.
Minix filesystem support – exclude.
ROM filesystem support – exclude.
(Some people might need these, but if you are such a person, you will know how to configure them)
Quota support – exclude. Only needed if you want to set limits on user disk usage. Again, an advanced option, not present on most home PCs or single user desktops.
Kernel automounter support – exclude.
Kernel automounter support v4 – exclude. Needed only on large networks.

CD/DVD ROM filesystems – use built in for all the options in the submenu.
DOS/FAT/NT Filesystems --->
MSDOS fs suport – exclude (usually, except in cases where linux is mounted from a DOS partition).
VFAT fs support – include.
NTFS support – build in.
NTFS debugging support – exclude.
NTFS write support – exclude. It doesn't do much.
(The above options should actually be included as modules, but I would recommend not doing so the first time. With experience you will learn which features should generally be compiled as modules and then these can be configured accordingly).

Pseudo Filesystems-->
/proc file system support – include.
/dev/pts extended attributes – exclude. Again, you will know if you need it.
Virtual memory file system support – include.
HugeTLB filesystem support – exclude. Not sure what this does.

Miscellaneous filesystems-->
All the options in the submenu can generally be excluded. They are not commonly used on Linux/Windows dual boot systems.

Network filesystems support-->
Again, all these options can usually be excluded. They are required only on networked computers. If you are on a networked system then your administrator should be able to tell you which filesystems are required. Accordingly support can be compiled in. Possibly you can include SMB file system support.

Partition types--> Only two options are to be included:
1. Advanced partition selection.
2. PC BIOS support.
If you use dynamic disks in Windows 2000 or later, then you should also include Windows Logical Disk Manager support.

Native Language Support--> exclude all except USA/Canada and NLS ISO 8859-1 + NLS ISO 8859-15. This is to do with codepages (non-english filenames, not contents).

Kernel Hacking
All the options in this menu are advanced features. It is best to exclude them from the kernel.

Security Options
Enable different Security models
Purpose: This allows you to use security models other than the default linux security model.
Suggestion – exclude. You may want to include this however if you are interested in using SELinux (security enhanced).
Enable access key retention support – exclude.

Cryptographic Options
It is safe to include all these options as modules. Don't build them in, otherwise your kernel size will increase dramatically. Compiling these options into the kernel is recommended only if you use them very frequently (e.g. All your documents are encrypted using one of these algorithms).
Even if you don't include them, third party tools can provide these services.

Library Routines
Both options can be included safely.

After you are finished save the file and proceed to the Post Configuration section given earlier.

The above configuration procedure was on the 32 bit system, when you try this on a 64 bit system, different options are available.

-The processor options are different.
-There are different ACPI options.
-CPU frequency scaling now has K8 PowerNow! (Cool n Quiet)
-Funnily enough, there is no option for initrd. Add it in manually to the .config file as:
CONFIG_BLK_DEV_INITRD=y
-File formats: there is no longer an a.out format in the 64 bit world. However, there is IA32 emulation, as well as IA32 a.out emulation.

Unfortunately, I was unable to get the kernel up and running on FC3 (64 bit). FC3 has some difficulties which I was unable to get around. For one, it is necessary to make an initrd (initial RAM disk). And there was no option in the kernel to enable it. Even after putting it in manually I was unable to boot up. Seems like some bug. If anyone has any success (on a 64 bit FC3) please do post here.
Funnily, I used the 64 bit kernel, with a 32 bit Distro (CentOS 3.6) and it booted up properly.

If you want to enable SATA then try this (it did not work on the 32 bit FC1, but did on the 64 bit kernel + CentOS combo – CentOS root was located on the SATA hdd):

In code maturity options, include “Prompt for development and/or incomplete code/drivers”, but exclude “Select only drivers expected to compile cleanly”. Then under ATA/ATAPI/MFM/RLL include support for your SATA chipset (if listed). Then go to SCSI, enable support for SCSI hard disks. Got to SCSI low level drivers, enable SATA hard disks and enable support for your SATA chipset/controller listed under that (sata_sil, sata_nv, etc.).

Well that's it! Enjoy!!!!

Monday, 13 July 2009

Ebooks sites

booktraining.net

Friday, 10 July 2009

msfweb on slackware 12.2

install metasploit packagge from slackbuild.org
install rubygem package
run the command "gem install rails"

Wednesday, 8 July 2009

How to manage Outlook Web Access features in Exchange Server 2003

http://support.microsoft.com/kb/830827

Favorite slackware/linux links

http://wiki.linuxquestions.org/wiki/Slackware-FAQ
http://www.vcn.bc.ca/~dugan/setting-up-slackware.html
http://www.brunolinux.com/
http://humanreadable.nfshost.com/sdeg/index.htm
http://slackworld.berlios.de/links.html
http://www.linuxpackages.net/howto.php
http://www.basicconfig.com/
http://www.linuxhomenetworking.com/
http://www.bilbos-stekkie.com/slack_init/en/index.html
http://slackwiki.org
http://www.linuxconfig.org/
http://www.lugatgt.org/articles/

Tuesday, 7 July 2009

mouse wheel in slackware 12.2

As root edit /etc/X11/xorg.conf for slackware 12. The syntax of the file is the same for both.

Find the 'Core Pointer' section. In there you will have something like this:

Identifier "Mouse1"
Driver "mouse"
Option "Protocol" "IMPS/2"
Option "Device" "/dev/mouse"


Protocol and device might be different on yours if, for example, you have a USB mouse.

Add two lines here to make it look like this:

Identifier "Mouse1"
Driver "mouse"
Option "Protocol" "IMPS/2"
Option "Device" "/dev/mouse"
Option "Buttons" "5"
Option "ZAxisMapping" "4 5"


Restart the X server.

Enjoy abusing your wheel :)

Type vietnamese in slackware with scim & skim

install scim
install skim
connfig as instructed at
http://www.scim-im.org/wiki/documentation/installation_and_configuration/all/installation_from_the_source

install scim-unikey

restart computer.

Thursday, 2 July 2009

Failed to lock the file! VMWare virtual disk (vmdk)

just delete .lck folders

Wednesday, 1 July 2009

Intel wifi 5100 with Slackware 12.2

Just get the new kernel 2.6.30 and compile it. Now i can get injection working!!!

Friday, 26 June 2009

Injection with Intel Wireless (WiMax/)WiFi Link 4965AGN/51x0AGN, Intel Ultimate-N (WiMax/)WiFi Link 53x0AGN

Intel Wireless (WiMax/)WiFi Link 4965AGN/51x0AGN, Intel Ultimate-N
(WiMax/)WiFi Link 53x0AGN

The first reported success and how to do it is in this thread message.

A more recent success story is in this thread including detailed steps.
This one summarizes the the steps for Ubuntu 8.04. Another one.
Detailed HowTo

This is how you can get the Intel WiFi Link 4965AGN/5xxxAGN card to
inject under Linux using the iwlwifi drivers. Please note that the
injection is still under development, but is possible at this point.
Fake auth doesn't work but there's a workaround: using wpa_supplicant.
Deauth seems to be buggy.

What you need :

*
a kernel of 2.6.25 or higher,
*
the kernel sources,
*
the compat-wireless-2.6 package (for 2.6.27 and up) or the
compat-wireless-old package (for 2.6.25/2.6.26),
*
aircrack-ng => RC1 (=> SVN rev. 1531 if you want to use fakeauth),
*
basic development tools (make, gcc, ...),
*
injection patches for mac80211 (all kernels) and the drivers (only
for 2.6.25/.2.6.26).

Please note that the instructions provided here are suited for generic
Linux. Your distribution, especially if it uses some kind of advanced
package managing (Debian, Ubuntu, etc.), may have the needed packages in
its repositories (so that you don't need to compile them manually from
source).
Preparing the kernel

You need to make sure that your kernel configuration includes these
options. Pay attention which are to be build as modules and which can be
built-in.

Networking -> Wireless :
[M] Improved wireless configuration API
[*] nl80211 new netlink interface support
[*] Wireless extensions
[M] Generic IEEE 802.11 Networking Stack (mac80211)

If they exist, these should be either unchecked or modularized:

[M] Generic IEEE 802.11 Networking Stack (DEPRECATED)
[M] IEEE 802.11 WEP encryption (802.1x)
[M] IEEE 802.11i CCMP support
[M] IEEE 802.11i TKIP encryption
[M] Software MAC add-on to the IEEE 802.11 networking stack

You must also enable "Automatic kernel module loading" under "Loadable
module support", otherwise you will have module dependency errors.

If you are running a distro-supplied kernel, and find that these options
are not configured as described here, then you will need to recompile
your kernel with these options corrected. It is not enough to just
change these options in the kernel configuration, as you need these
options to be true for the running kernel.

At this point, it is assumed that you've got your kernel properly
configured, up and running right now.
Compiling the drivers

The development versions of the drivers are a part of the
compat-wireless project. We will need the latest version of the package,
which can be obtained here:

http://wireless.kernel.org/en/users/Download

Select compat-wireless-2.6 if you are using 2.6.27 or newer, or
compat-wireless-old if you are using 2.6.25 or 2.6.26. Download the
tarball to your home directory. Having downloaded it, we need to
download the patches for the iwlwifi drivers (only for 2.6.25/.26) and
the frag+ack patch for mac80211. The frag+ack patch is available on
http://patches.aircrack-ng.org (get the 2.6.28-rc4-wl version for
2.6.27+ and the 2.6.26-wl version for 2.6.25/.26). The driver patch (not
needed for 2.6.27 and up) is available here :
http://pastebin.com/f7bc96631.

Then, execute these commands:

2.6.25/.26 (not sure if this is still correct):

cd ~
tar xjf compat-wireless-old.tar.bz2
cd compat-wireless-old-2009-*
wget http://pastebin.com/pastebin.php?dl=f7bc96631 -O
iwlagn-injection.patch
wget http://patches.aircrack-ng.org/mac80211_2.6.26-wl_frag.patch
patch -p1 < iwlagn-injection.patch
patch -p1 < mac80211_2.6.26-wl_frag.patch
make -j4
make unload; rmmod ssb mac80211 cfg80211 [as root!]
make install [as root!]
echo options iwlagn swcrypto=1 >> /etc/modprobe.d/options [as root!]
make load [as root!]

2.6.27 and up:

cd ~
tar xjf compat-wireless-2.6.tar.bz2
cd compat-wireless-2009-*
wget
http://patches.aircrack-ng.org/mac80211_2.6.28-rc4-wl_frag+ack_v3.patch
patch -p1 < mac80211_2.6.28-rc4-wl_frag+ack_v3.patch
wget
http://patches.aircrack-ng.org/mac80211-2.6.29-fix-tx-ctl-no-ack-retry-c
ount.patch
patch -p1 < mac80211-2.6.29-fix-tx-ctl-no-ack-retry-count.patch
make -j4
make unload [as root!]
make install [as root!]
echo options iwlagn swcrypto=1 >> /etc/modprobe.d/options [as root!]
make load [as root!]

NOTE: mac80211-2.6.29-fix-tx-ctl-no-ack-retry-count.patch is not needed
in the bleeding-edge compat-wireless-2.6, only in
2.6.29/2.6.30/compat-wireless-2.6.30.

That should get you the patched driver module up and running, you should
also see "wlan0" and "wmaster0" as your interfaces, the first one should
also be available by using iwconfig.
Injecting

Due to the way how mac80211 works, you cannot inject on the card's
"stock" interface - wlan0. This is where the airmon-ng tool comes in
handy. It will create a mon0 interface suited for injecting after
running it this way :

airmon-ng start wlan0

It may complain about the "iw" program missing. If it does, the link is
provided, so just download and compile it. The "iw" program, however,
requires the "libnl" libraries, available here :
http://people.suug.ch/~tgr/libnl/. If you have it all, run the program
again, and it should give you output somewhat similar to this:

# airmon-ng start wlan0

Interface Chipset Driver

wlan0 Intel 4965/5xxx iwlagn - [phy0]
(monitor mode enabled on mon0)

If that's how it looks, you're good to go. The mon0 interface can be
used for both listening with airodump-ng and injecting with aireplay-ng.

Printing with CUPS (Slackware)

Q) How do I add my printer/ enabling printing/ etc?

By default, Slackware now uses CUPS (as of 10.1, though apsfilter and lrpng can be found in /pasture).

To start CUPS, as root:

cd /etc/rc.d
chmod +x rc.cups
./rc.cups start

Confirm CUPS is running, thus:

ps -ef | grep cups

If running, result will be like:

root 3657 1 0 09:24 ? 00:00:00 /usr/sbin/cupsd

Before using CUPS, check the information for your printer at www.linuxprinting.org - it will tell you which is the best driver for your printer, and where to get it (gimp-print drivers come with the gimp-print package in Slackware, Ghostscript (LP's "PPD") based drivers require you to download a PPD front end file and put this in /usr/share/cups/model)

To add your printer, you can either use the command line: CUPS Admin Manual - Managing Printers (www.cups.org)

Or you can use the web based configuration: http://localhost:631

Either of the methods above can also be used for managing printers, printer classes, etc.

Worked example using Firefox to browse to http://localhost:631/printers (Slackware 11, Netgear PS110 print server at IP address 192.168.0.20 and HP LaserJet 2200D on Port 1)
---------------------------------------------------------------
SOURCE:
http://wiki.linuxquestions.org/wiki/Slackware-FAQ#Q.29_How_do_I_add_my_printer.2F_enabling_printing.2F_etc.3F#ixzz0JyxOz4Dc&D

Slackware Bootsplash Howto

- SOURCE: http://n00bsys0p.wordpress.com/tag/slackware/
------------------------------------------------------------
Slackware Bootsplash Howto
3 02 2009

Hi all. I don't know about any of you, but the fact that the original
bootsplash patch is becoming obsolete and being superceded by sucky...
sorry, I mean splashy... really pisses me off. I love the simplicity and
speed of bootsplash, and splashy has failed to deliver on almost every
front. It's slow, ungraceful, difficult to make really pretty, and what
annoys me more than anything is that the verbose mode is utter crap.
Kernel panics will never be easy to diagnose again.

I don't install bootsplash often enough to know it off by heart, and I
find that every time I install Slackware on a new system I want to put a
bootsplash on I can never exactly remember how - cue many frustrating
wasted hours trying to get it sorted. I'd imagine it's a problem that
I'm not alone in encountering, so for your intellectual enjoyment (and
hopefully to help retain your hair's colour!), here's a full howto.

NB: If you are a newbie to compiling kernels, creating initramfs images
and reconfiguring LILO, then consider seriously practising/reading up on
them before attempting this, as you could render your system unbootable.
Step 1: Patch, configure and install the kernel.

You'll need a working patch for the kernel you're using. Sometimes a
patch from a previous kernel will work, but always patch with the
following tags first:

patch --dry-run -p1 < bootsplash-3.1.6-$(uname -r)

This will just test the patch. If you get any HUNK FAILED messages, then
DON'T USE IT! Also, if you are trying a patch from a different kernel,
then replace $(uname -r) with the patch's kernel version.

You will now need to configure the kernel using your favourite .config
editor. I'm a huge fan of xconfig (type make xconfig in your kernel's
unpacked directory). You will need to turn OFF the existing bootup logo
and turn on the bootup splash screen. It's probably a good idea to make
sure you have initrd/initramfs support in there too.

Now compile and install your kernel. If you don't know how to do this,
Eric Hameleers (Alien Bob) has written an excellent guide on his
Dokuwiki. Take heed of all of his warnings, as doing this wrong could
hose your computer. See you after the KERNEL PANIC.

Now boot up your new kernel.
Step 2: Download, compile and install the splash util.

There are countless copies of the splash utilities scattered around the
internet, and the places you'll find them change regularly, so I can't
give you a direct link, but version 3.0.7 seems to be a pretty good bet,
and easy to find.

Once you have downloaded the package, just typing make will result in a
huge b0rk-fest. The only binary you need is splash, so just type make
splash, and you should be ok. Now copy this into /sbin and that's step 2
complete.
Step 3: Make your initramfs format initrd.gz

I find this is where the guides all start to tell fibs. They all tell
you just to use the splash binary and redirect the output to a file.
THIS DOES NOT WORK. The reason being that Slackware now uses an
initramfs image for it's initial ramdisk, which is a compressed cpio
archive. Just using this file will not be recognised, and annoyingly
there will be no useful pointers to show you what's wrong.

First off, you'll want to download a bootsplash from somewhere. Kde-look
has some pretty nifty ones. Now create the directory
/etc/bootsplash/themes. Put the files you downloaded in here in the
format /etc/bootsplash/themes/theme-name/images and
themes/theme-name/config.

Now to actually create the initramfs. First of all, check for the
existence of a file called initrd.gz in your /boot folder. If there is
one there, then you should back it up before proceeding, as it will now
be blown away. Navigate to /boot and type:

mkinitrd -c -k $(uname -r) -f filesystem on root partition -r /dev/root
partition

There will now be a folder called initrd-tree in /boot. This will be the
contents of your initrd. Navigate to this folder and use the following
command:
splash -s -f
/etc/bootsplash/themes/theme-name/config/bootsplash-1024x768.cfg >
bootsplash

This has placed some information for the kernel on the location of the
bootsplash theme in the cpio archive. You now need to place the
bootsplash into the folder in exactly the same directory structure that
exists on your filesystem. Create the folder
/boot/initrd-tree/etc/bootsplash/themes and copy in the bootsplash theme
you downloaded and installed earlier.

To finish off our penultimate step, go to /boot again and type simply
mkinitrd to compress the contents of /boot/initrd-tree into the
initrd.gz file you will now see in the /boot folder.
Step 4: Reconfigure LILO and reboot.

Ok, we've got to the point of no return. You have a working bootsplash
enabled kernel and a brilliantly put together initramfs image. Now
you'll need to modify the /etc/lilo.conf section which points at your
new kernel as follows:
image = /boot/vmlinuz-custom-2.6.27.7-1 # Or whatever your kernel image
is called
root = /dev/hda7 # Or whatever your root partition is.
label = Slacksplash # Name it anything you like
initrd = /boot/initrd.gz
append = "splash=silent"
read-only

Now run lilo. I tend to use lilo -c -v as -c speeds up the initial
loading of the kernel, and -v gives you a whole bunch of useful
information.

Now reboot, select your kernel from the list and admire all the
beautiful colours swirling across your screen.

That's it... Done. Any questions just leave me a comment.

n00b

MOSS 2007 in single machine (testing)

sharepoint installation notes

Preparation
install win2k3 sp2 & all updates
.net framework 2 & 3
install "application server" (add/remove windows components ) - IIS config allow asp.net 2 & 3, smtp for emailing
create seperate domain admin account & use it for all remainding installation

Logon with the domain admin acc
install sql server 2005 std with sp2
install MOSS 2007
- Select Advanced --> Complete
- change file location for database
- enter the server name or database instance as the database server name
- ntlm authentication

WSS 3.0 SP1 should be installed before SharePoint Server 2007 SP1.


Setup services on the server (start all for testing)
Create sites (sspadmin, mysite, Intranet or whatever u name it)
Note: use different database for each site for easy management
Create SSP (shared service provider)
Collaboration Portal Site Collection Setup
Import user profile from Active Directory
Configure indexing

MOSS 2007: Event ID 6641 Reason: Logon failure: unknown user name or bad password

MOSS 2007: Event ID 6641 Reason: Logon failure: unknown user name or bad password

June 1, 2009 at 11:45 pm · Filed under MOSS, error ·Tagged Event ID 6641, MOSS 2007

We have changed the password of the account used to run some services of MOSS server. After some time, Event ID 6641 started to appear after approximately 5 minutes in the event viewer.

Event Type: Error

Event Source: Office SharePoint Server

Event Category: Office Server Shared Services

Event ID: 6641

Date: XXXXXX

Time: XXXXXX

User: N/A

Computer: XXXXXX

Description:

The SSP Timer Job Distribution List Import Job was not run.

Reason: Logon failure: unknown user name or bad password

Technical Support Details:

System.ComponentModel.Win32Exception: Logon failure: unknown user name or bad password

at Microsoft.Office.Server.Utilities.WindowsSecurity.GetUserTokenFromCredentials(String userDomainName, String password, LogonType logonType)

at Microsoft.Office.Server.Utilities.WindowsSecurity.GetUserTokenFromCredentials(String userDomainName, String password)

at Microsoft.Office.Server.Administration.JobHandler.Execute(Object state, Boolean timedOut)

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

Resolution:

Run following two commands using STSADM:

stsadm -o updatefarmcredentials [-identitytype]

[-userlogin] [-password] [-local]

stsadm -o updateaccountpassword -userlogin -password [-noadmin]

Run sharepoint sites in FireFox withouth entering credentials repeatedly

You have to enable NTLM using the following steps, so that Firefox will authenticate automatically.

1. Open Firefox
2. Type about:config in the address bar and hit Enter.
3. Type network.automatic in the top Filter bar
4. Right click network.automatic-ntlm-auth.trusted-uris and click Modify
5. Enter only the names of your internal(SharePoint) servers in a comma-delimited list. For example: lon-ad-01,contoso and click OK.
6. Restart Firefox


You should be able to access all of your SharePoint sites on the servers you entered through Firefox now without providing credentials repeatedly.

The above setting is usually stored in “prefs.js” in the following directory:

C:\Documents and Settings\\Application Data\Mozilla\Firefox\Profiles\.default
eg: C:\Documents and Settings\technobuff\Application Data\Mozilla\Firefox\Profiles\viqz4db1.default

Windows SharePoint Services Search service cannot start

SOURCE: http://technobuff.wordpress.com/2007/11/20/windows-sharepoint-services-search-service-cannot-start/#comment-167
-----------



If you attempt to start Windows SharePoint Services Search service on MOSS 2007 and receive the following message:

Error “The handle is invalid”

Windows SharePoint Services Search error

Try modifying the “Log On As” Identity of the service. If it was setup to log on as “Local Service”, chang this to “Local System”, and retry starting the services. This works only when you aretrying to start the service from Services Adminstrative Console.

If you are using the ‘Operations’ tab in Sharepoint 3.0 central administration, start the service with an account which have right previleges. Give the account name as domain\accountname or else the service will not run if you just give the accountname.

Thursday, 25 June 2009

vmlinuz vs bzImage - Slackware

vmlinuz - Nothing but bzImage file.
config - Config file used for kernel compliation
system.map - Used by kernel ,if it needs to recover from fatal errors.
initrd - Used to mount real root file system


initrd.img is completely different from System.map.

While System.map is used for debugging.
initrd.img stands for initial ram disk,provides initial temporary file system which
allows kernel to mount the real root file system,while booting.

If you have real file system (ext3) build inside your kernel ,rather than using it as an
loadable module,you won't need initrd.
__________________

Microsoft Information Store\First Storage Group Database was not found, or could not be accessed."

A Backup Exec 11d or 12.0 Exchange Information Store (IS) backup to a Backup-to-Disk Folder fails with the error: "Backup- \\Exchange\Microsoft Information Store\First Storage Group Database was not found, or could not be accessed."

http://seer.entsupport.symantec.com/docs/290493.htm

Resolution: exclude the backup folder from the local antivirus server

WPA wireless with Slackware 12.2

edit following files:
- /etc/rc.d/rc.inet1.conf (dhcp or static)
- /etc/wpa_supplicant.conf

note: use the following cmd to convert ur passphase to psk
#wpa_passphase YOURSSID passphase
Use the output for /etc/wpa_supplicant.conf

if not sure on your wap, run "#iwlist scan" to detect

Tuesday, 23 June 2009

The name or security ID (SID) of the domain specified is inconsistent with the trust information for that domain

http://technet.microsoft.com/en-us/sysinternals/bb897418.aspx
http://www.experts-exchange.com/Operating_Systems/Windows_Server_2003/Q_21112381.html

How to find Hsync and Vsync of a monitor? (linux)

For those values, it is usually best to see what the manufacturer lists - check manual or website. I don't specify those values in the xorg.conf of my laptops and they work fine.

You can try this command to get some good screen info though:
Code:
xdpyinfo

On my box (Fedora) it is in the xorg-x11-utils package.

Also, you can try to let X determine your best settings. Try these steps:

1. (re-)boot into non-Graphical runlevel (init 3)
2. log in as root
3. run
Code:
X -configure

4. test it with
Code:
X -config /root/xorg.conf.new
(or whatever the generated xorg conf file is called)
5. press Ctrl+Alt+Backspace to get out of the X test window

and see if that works for you.

Sunday, 21 June 2009

PPTP client with Slackware 12

This works with my remote router with vpn enabled.

Get necessary info for your connection:
* vpn server: server_name
* user: your_username
* password: your_pwd
* IP address: server_ip
* name for the connection: myvpn (u can name it whatever you like)

modified the following files:
* /etc/ppp/chap-secrets
* /etc/ppp/options.pptp
created the following file
* /etc/ppp/peers/myvpn
* /etc/ppp/ip-up (also chmod +x /etc/ppp/ip-up)

# cat /etc/ppp/peers/myvpn (this depends on your remote vpn configs)
pty "pptp server_ip --nolaunchpppd"
name your_username
remotename server_name
require-mschap-v2
require-mppe-128
file /etc/ppp/options.pptp
ipparam myvpn

# cat /etc/ppp/chap-secrets
your_username server_name your_pwd *

# cat /etc/ppp/options.pptp
lock
noauth
refuse-eap
refuse-chap
refuse-mschap
nobsdcomp
nodeflate

#cat /etc/ppp/ip-up
#!/bin/sh
/sbin/route add -net REMOTE_NET_IP netmask REMOTE_NET_MASK gw DEFAULT_GATEWAY dev ppp0

execute the following command to connect

# pppd call myvpn dump debug logfd 2 nodetach

Friday, 12 June 2009

Change to screen resolution 1280x800 on Slackware 12

-Calculate VESA GTF mode lines with gtf command
#gtf 1280 800 60

# 1280x800 @ 60.00 Hz (GTF) hsync: 49.68 kHz; pclk: 83.46 MHz
Modeline "1280x800_60.00" 83.46 1280 1344 1480 1680 800 801 804 828 -HSync +Vsync

-Copy the result to section Monitor in /etc/X11/xorg.conf


Section "Monitor"

Identifier "My Monitor"

HorizSync 28-64

VertRefresh 40-90

Modeline "1280x800_60.00" 83.46 1280 1344 1480 1680 800 801 804 828 -HSync +Vsync
EndSection

- Also add the following in the Screen section
Section "Screen"
Identifier "Screen 1"
Device "VESA Framebuffer"
Monitor "My Monitor"

# If your card can handle it, a higher default color depth (like 24 or 32)
# is highly recommended.

# DefaultDepth 8
# DefaultDepth 16
DefaultDepth 24
# DefaultDepth 32

# "1024x768" is also a conservative usable default resolution. If you
# have a better monitor, feel free to try resolutions such as
# "1152x864", "1280x1024", "1600x1200", and "1800x1400" (or whatever your
# card/monitor can produce)

Subsection "Display"
Depth 8
Modes "1280x800" "1024x768" "800x600" "640x480"
EndSubsection
Subsection "Display"
Depth 16
Modes "1280x800" "1024x768" "800x600" "640x480"
EndSubsection
Subsection "Display"
Depth 24
Modes "1280x800" "1024x768" "800x600" "640x480"
EndSubsection
Subsection "Display"
Depth 32
Modes "1280x800" "1024x768" "800x600" "640x480"
EndSubsection

EndSection

-Check the result with xrandr
$ xrandr
Screen 0: minimum 640 x 480, current 1280 x 800, maximum 1280 x 800
default connected 1280x800+0+0 0mm x 0mm
1280x800 75.0*
1024x768 76.0
800x600 86.0
640x480 86.0

you might require to reboot

Install TrueCrypt 6.1a in Slackware 12

1. Download truecrypt source from www.truecrypt.org and expand it in a temporary folder. (opt/truecrypt)

2. Ftp the files below from ftp.rsasecurity.com/pub/pkcs/pkcs-11/v2-20 and copy them into the truecrypt source directory.
/opt/truecrypt/truecrypt-6.1a-source in my case.

cryptoki.h
ct-kip.h
opt-pkcs11.h
pkcs-11v2-20a3.h
pkcs-11v2-20a3d3.h
pkcs11.h
pkcs11f.h
pkcs11t-consolidated-d1.h
pkcs11t.h
pkcs11t.h.org

3. Download wxWidgets from: http://www.wxwidgets.org/downloads/ wxAll is what you want.

4. unpack wxWidgets in the truecrypt source directory.

5. run the following command from the truecrypt source directory /opt/truecrypt/truecrypt-6.1a-source# make NOGUI=1 WX_ROOT=/opt/truecrypt/truecrypt-6.1a-source/wxWidgets-2.8.10 wxbuild

Note: change directories to match your installation

6. run the following command: make NOGUI=1 WXSTATIC=1
7. after the compiling is completed, copy the truecrypt file in the Main folder to /usr/bin
8.

Tuesday, 9 June 2009

install vmware server 2 on slackware 12

SOURCE: http://www.basicconfig.com/install_vmware_server_slackware
NOTE: this can apply when install vmware server on BT3 Final

if your kenel is 2.6.30 then u need to download patch from http://communities.vmware.com/thread/215985 ( vmware-server.2.0.1_x64-modules-2.6.30-fix.sh (3.5 K)
* vmware-server.2.0.1_x64-modules-2.6.30-fix.patch (8.4 K))

When the installer ask you to run vmware-config.pl, choose no then run the fix. After that, run vmware-config.pl to complete your installation.

------------------------
VMware installation procedures

Installing vmware in Slackware Linux is quite difficult in the past. Many pre-installation requirements and some tweaks need to be done before proceed the installation. However this time, both vmware 2.0 and Slackware 12.2 have made our job easier. The things left for us are:

1. Download vmware server 2 from official vmware website. If you not already done it, here is the link to get vmware.
2. Install Linux PAM software. You can get Linux PAM package for Slackware from LinuxPakages website.

Finished the tasks above before you continue vmware server 2.0 installation.

Untar vmware server 2.0 source in your installation directory. Normally slackers use /usr/local/src directory, which is in it's own partition created during Slackware installation. It's up to you where to extract vmware server source, but put every added software in one directory location is a good practice to make your system in order and tidy.

root@hitam:~# cd /usr/local/src/
root@hitam:/usr/local/src# tar zxvf /home/slackware/source/VMware-server-2.0.0-122956.i386.tar.gz

Compile vmware server 2:

root@hitam:/usr/local/src# cd vmware-server-distrib/
root@hitam:/usr/local/src/vmware-server-distrib# ls
FILES doc/ installer/ man/ vmware-install.pl@
bin/ etc/ lib/ sbin/ vmware-vix/
root@hitam:/usr/local/src/vmware-server-distrib# ./vmware-install.pl

Everything after those steps above, you just enter and accept default value. It should work and finish without error. But that's not the way to learn Linux, is it? What you can do is read and take notes of each step. That way you know what happen. Here are some things that you should know:

To uninstall vmware server from Slackware, issue the command below (Only if you choose the default directory during vmware server installation):

root@hitam:~# /usr/bin/vmware-uninstall.pl

If you choose to enable vmware server networking, you need to configure host dhcp (which is Slackware) not to interfere with vmware server's dhcp server. You can add the following line in Slackware /etc/dhcpd.conf:

Subnet 172.16.121.0 netmask 255.255.255.0 {
# Note: No range is given, vmnet_dhcpd will deal with this subnet.
# Change the ip address to your vmnet ip address, nat and hostonly.
}

Seriously, that's all you need to do to install vmware server 2.0 in Slackware 12.2. If vmware server compiled without any error, then we can start vmware server to install guest operating system. If you did take notes during vmware server configuration steps, you should notice that vmware server 2.0 uses web base for administration, setup, etc. The default ports are 902 for remote, 8222 for http and 8333 for https.

So, start kde now if you installed vmware server in terminal. Open firefox and enter localhost:8222 in url:

vmware server open in firefox image

Enter login name and password. The default login name is root if you do not change it during vmware installation.
VMware installation troubleshooting

Although I said earlier that vmware server 2.0 installation in Slackware 12.2 has been easier but that doesn't mean it will go smoothly. If you are lucky to have an error during vmware installation, check log file in /var/log/secure directory. You must have root privilege to run this command.

root@hitam:~# tail -f /var/log/secure

There is only one problem I encountered during vmware server 2.0 installation, which is Login failed due to a bad username or password . The Login failed due to a bad username or password happened when I tried to login vmware control panel with firefox. That problem solved when I installed Linux PAM package.

Monday, 8 June 2009

C header files location asked when installing BT3 - vmware-tools with vmware server 2

just download the kernel from: http://www.offensive-security.com/kernel.lzm

and install it with the command: "lzm2dir kernel.lzm /" and re-run "/usr/bin/vmware-config-tools.pl"

vmware-tools on slackware 12.1

Okay, here is a list of steps that install vmware-tools on Slackware 12.1
You need to install PAM before proceding the instruction, get PAM from LinuxPackages.net & install it
(http://www.linuxpackages.net/search_view.php?by=name&name=pam&ver=12.1)

After that, do:

1.cd /etc/rc.d

2.for V in {0,1,2,3,4,5,6}; do ln -s /etc/rc.d /etc/rc.d/rc${V}.d; done

3.mkdir /etc/pam.d

4.cp /etc/rc.d/rc.inet1 /etc/init.d/network

5.cp /etc/rc.d/rc.inet1 /etc/init.d/networking

6.In VMWARE, select Settings => Install Vmware Tools

7.$mount /dev/cdrom /mnt/cdrom

8.cp /mnt/cdrom/vmware*.tar.gz /tmp

9.cd /tmp

10.tar zxf vmware*.tar.gz

11.goto the extracted folder and $./vmware-install.pl

Saturday, 6 June 2009

SOURCE: http://forums.remote-exploit.org/backtrack3-howtos/18470-howto-compile-truecrypt-6-1-bt3-final.html
-----------------------------
Howto: Compile TrueCrypt 6.1 on BT3-Final
/offtopic:

First of all, as this is my first post on the forum, I want to thank all the people involved in this community and of course all the guys from remote-exploit for putting together this great distro!
Thanks to you people I've been learning a great deal in the past few weeks and I have a feeling there is lots more to come! Once again, thanks.

And now to the topic.


/ontopic:

Since I am using quite a lot of external hard drives which are all crypted using TrueCrypt 6.1, I wanted to be able to use them on BT3 too. unfortunately, BT3-Final still comes with an outdated version of TrueCrypt. So I sat down and learned how to compile the current TrueCrypt 6.1.

It wasn't really that hard, basically some reading of and thinking about the right information that comes along with the downloads.

First of all, we will need the sourcefiles of Truecrypt, which can be downloaded here:


Code:

hxxp://www(dot)truecrypt(dot)org/downloads2.php


See that you the Linux/Mac OS tar.gz file AND the corresponding PGP signature file, just so we can make sure we got the "real deal" here... This we will do by taking a look at "gpg" to verify the source code we just got is valid and not tempered with.

Now if you don't know what gpg is, feel free to search google, because to explain all the features and their usage of gpg would be far beyond my little tutorial here. Just so much: Me just found out that messing with it might be a Pretty-Good-Precaution for future communication... On the other hand, if you are the trustworthy and "I-don't-think-the-world-is-bad-cause-everyone-is-full-of-good-intentions" kind of person, feel free to skip this part (and maybe consider doing a reboot into the M$-world)

Otherwise, you will need to fire up a terminal and do a:


Code:

wgex hxxp://truecrypt(dot)sourceforge(dot)net/TrueCrypt-Foundation-Public-Key.asc


to get the public key, which we will than import into gpg:


Code:

gpg --import TrueCrypt-Foundation-Public-Key.asc


Now we can finally verify that we got the correct source files by typing:


Code:

gpg --verify TrueCrypt\ 6.1\ Source.tar.gz.sig TrueCrypt\ 6.1\ Source.tar.gz


After that we should get a good signature message in return from gpg, telling us that our downloaded file is the original, unmodified source code given out by the authors.

Next would be to untar the source and change the pwd to the new directory:


Code:

tar -zxvf TrueCrypt\ 6.1\ Source.tar.gz
cd truecrypt-6.1-source


To actually compile the binaries of TrueCrypt 6.1, a


Code:

less Readme.txt


tells us we will need the RSA Security Inc. PKCS #11 Cryptographic Token Interface (Cryptoki) 2.20 header files and where we can get them. So we will do a


Code:

wgex fxp://ftp(dot)rsasecurity(dot)com/pub/pkcs/pkcs-11/v2-20/cryptoki.h
wgex fxp://ftp(dot)rsasecurity(dot)com/pub/pkcs/pkcs-11/v2-20/ct-kip.h
wgex fxp://ftp(dot)rsasecurity(dot)com/pub/pkcs/pkcs-11/v2-20/opt-pkcs11.h
wgex fxp://ftp(fot)rsasecurity(dot)com/pub/pkcs/pkcs-11/v2-20/pkcs-11v2-20a3.h
wgex fxp://ftp(dot)rsasecurity(dot)com/pub/pkcs/pkcs-11/v2-20/pkcs-11v2-20a3d3.h
wgex fxp://ftp(dot)rsasecurity(dot)com/pub/pkcs/pkcs-11/v2-20/pkcs11.h
wgex fxp://ftp(dot)rsasecurity(dot)com/pub/pkcs/pkcs-11/v2-20/pkcs11f.h
wgex fxp://ftp(dot)rsasecurity(dot)com/pub/pkcs/pkcs-11/v2-20/pkcs11t-consolidated-d1.h
wgex fxp://ftp(dot)rsasecurity(dot)com/pub/pkcs/pkcs-11/v2-20/pkcs11t.h
wgex fxp://ftp(dot)rsasecurity(dot)com/pub/pkcs/pkcs-11/v2-20/pkcs11t.h.org

which should provide us with the needed files now being stored in the source code directory. After that we should be ready to create a working binary from the source by including the PKCS header files by typing:


Code:

make PKCS11_INC=/root/truecrypt-6.1-source


Of course you would have to adjust the code of the PKCS11_INC variable to your needs, if you happen to work in a different directory structure. Just make sure it points to the PKCS files we got earlier.

If everything goes well, we should end up with a nice working binary of TrueCrypt 6.1 in the "/root/truecrypt-6.1-source/Main" directory. We can now change into this directory, copy the compiled file to "/usr/bin" and thus overwriting the old binary of TrueCrypt 4.3a (I think it was). To keep things clean, we can also delete the directory with the source code as we don't need it anymore.


Code:

cd /root/truecrypt-6.1-source/Main
cp truecrypt /usr/bin/
cd /root
rm -rf truecrypt-6.1-source


That's it folks. For the looks and feels one might want to right-click on the K --> Menu-Editor, navigate to Backtrack --> Miscellaneous --> Truecrypt and uncheck the "Run in terminal" box. Also, in the "Command" text field, make sure truecrypt doesn't get any arguments passed on startup through the menu. Save the KDE Menu Editor, hit the X and off you go...

I hope this tutorial is of any use for someone. Shouldn't be to hard to walk through, as a rather beginning user as myself could figure this out and get it to compile.

Any comments, suggestions and critics are wellcome. Thanks again guys and have fun playing around with this info as I did.

Cheers
FreqVer

CODE: http://repository.slacky.eu/slackware-12.1/security/truecrypt/6.1a/src/

Friday, 12 December 2008

Install BT3 on USB with persistent changes, using Linux.

SOURCE:

http://forums.remote-exploit.org/showthread.php?t=14486
------------------------------------------------------------
Before I start, I would like to thank Pureh@te for his video tutorial that covers this. GREAT JOB

When I could not find a written Tutorial that included the persistent changes, and was done from start to finish on a Linux box, I decided to write my own so here it is.
On a side note, this is the first Tutorial I have ever written, so any feedback would be appreciated


For this Tutorial I will be installing BT3 on a 2 GB Flash Drive. Feel free to use a drive with more capacity, I recommend that you have at least 2 GB's.

Now lets get started.

Download the BT3B USB version.

Open a terminal and wget it.
Code:

wget http://www.remote-exploit.org/cgi-bin/fileget?version=bt3b-usb

I can't post links so you'll have to correct it

Once you have downloaded the file. place it in a directory of your likings and forget about it for the time being.

We will need to split our 2GB drive into 2 separate partitions. One partition will be 1.10 GB's on a FAT32 file system, and the second will be the remainder of the free space as an Ext 3 filesystem.

I will be using "fdisk, mkfs, & fsck" to setup the partitions.

Insert your drive into the nearest USB port and lets-

Create the Partitions

Open a terminal and type the following command:
Code:

fdisk /dev/sdb

You will need ROOT Privs. for most of the commands I use

This is the fdisk prompt:
Code:

Command (m for help):

To list the existing partitions type "p" and enter
Code:

Command (m for help): p

Disk /dev/sdb: 1998 MB, 1998585344 bytes
255 heads, 63 sectors/track, 242 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xa62da6ab

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 132 1060258+ b W95 FAT32
/dev/sdb2 133 242 883575 83 Linux

We need to delete these partitions so type "d" and enter
You will then be asked for the partition number that you want to delete.
Code:

Command (m for help): d
Partition number (1-4):

Type the number "1" and hit enter, now repeat the process for the remaining partitions.

Once there are no partitions, the output of "p" will be:
Code:

Command (m for help): p

Disk /dev/sdb: 1998 MB, 1998585344 bytes
255 heads, 63 sectors/track, 242 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xa62da6ab

Device Boot Start End Blocks Id System

To create a new partition type "n" and enter. This will prompt us for some details:
Code:

Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-242, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-242, default 242): +1080M

Lets create the second partition
I know the first partition should be FAT32 and is clearly Linux, don't worry we are getting to that

Again type "n" and answer the questions.
Code:

Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 2
First cylinder (133-242, default 133):
Using default value 133
Last cylinder or +size or +sizeM or +sizeK (133-242, default 242):
Using default value 242

Lets look at our partition layout now. Type "p" and enter.
Code:

Command (m for help): p

Disk /dev/sdb: 1998 MB, 1998585344 bytes
255 heads, 63 sectors/track, 242 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xa62da6ab

Device Boot Start End Blocks Id System
/dev/sdb1 1 132 1060258+ 83 Linux
/dev/sdb2 133 242 883575 83 Linux

Its time to change the ID of partition 1 to correspond with the Fat 32 Filesystem type that we will be using.

Type "t" and enter, then answer the questions:
Code:

Command (m for help): t
Partition number (1-4): 1
Hex code (type L to list codes): b
Changed system type of partition 1 to b (W95 FAT32)

We only need to change partition 1 because 2 is already set for Ext 3.

Now we will make the first partition bootable.

Type "a" and enter the partition number that you want bootable. in this instance it will be 1.
Code:

Command (m for help): a
Partition number (1-4): 1

One last look at our partitions before we move on, so type "p" and enter:
Code:

Command (m for help): p

Disk /dev/sdb: 1998 MB, 1998585344 bytes
255 heads, 63 sectors/track, 242 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xa62da6ab

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 132 1060258+ b W95 FAT32
/dev/sdb2 133 242 883575 83 Linux

Everything looks good so lets write these changes to the drive.
Type "w" and enter

Writing the Filesystems

For this task we will be using "mkfs"

At the terminal type:
Code:

user@laptop:~$ mkfs -t vfat /dev/sdb1

Should output
Code:

mkfs.vfat 2.11 (12 Mar 2005)

Then for the second partition type:
Code:

mkfs -t ext2 /dev/sdb2

Should output
Code:

mke2fs 1.40.8 (13-Mar-2008)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
56896 inodes, 226918 blocks
11345 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=234881024
7 block groups
32768 blocks per group, 32768 fragments per group
8128 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840

Writing inode tables: done
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 27 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.

Its time to use "fsck" to -

Check The Filesystems

At the Terminal type:
Code:

fsck -y /dev/sdb1

Should Output:
Code:

fsck 1.40.8 (13-Mar-2008)
dosfsck 2.11, 12 Mar 2005, FAT32, LFN
/dev/sdb1: 0 files, 1/264543 clusters

Then:
Code:

fsck -y /dev/sdb2

Should Output:
Code:

fsck 1.40.8 (13-Mar-2008)
e2fsck 1.40.8 (13-Mar-2008)
/dev/sdb2: clean, 11/55328 files, 6071/220893 blocks

Thats it, the partitions are created, filesystems written, and then checked. We are ready to start installing!!!

"cd" to the directory where you have the downloaded BT3 rar file, and run unrar.
Code:

unrar x bt3b141207.rar

If you experience issues on your Distro unpacking the .rar, be sure you have unrar installed.

Once the unpacking is completed OK we need to start copying files to our drive. "cd" into the unpacked directory and copy "boot" and "BT3" directories to the first partition of your flash drive.

So type:
Code:

cp -r boot /media/disk

Then:
Code:

cp -r BT3 /media/disk

I'm using ubuntu and the flash drive is mounted in /media you will need to change this to where your drive is mounted

We need to "cd" to the first partition of the flash drive.

So type:
Code:

cd /media/disk

"cd" into the boot directory and then into the syslinux directory.
Code:

cd boot/syslinux

Here we need to change a few permissions.

In the terminal type:
Code:

chmod 777 lilo

then:
Code:

chmod 777 syslinux

Using your favorite text editor we need to modify the syslinux.cfg file. Here I will use nano.
Code:

nano syslinux.cfg

Change this line:
Code:

LABEL pchanges
MENU LABEL BT3 Graphics mode with Persistent Changes
KERNEL /boot/vmlinuz
APPEND vga=0x317 initrd=/boot/initrd.gz ramdisk_size=6666 root=/dev/ram0 rw changes=/slax/slaxsave.dat autoexec=xconf;kdm

To:
Code:

LABEL pchanges
MENU LABEL BT3 Graphics mode with Persistent Changes
KERNEL /boot/vmlinuz
APPEND vga=0x317 initrd=/boot/initrd.gz ramdisk_size=6666 root=/dev/ram0 rw changes=/dev/sdb2 autoexec=xconf;kdm

You can add this line to any of the boot choices, as it is you will need to boot to "BT3 Graphics mode with Persistent Changes" for the changes to be saved

We need to go back up one directory to run the bootinst.sh script
So:
Code:

cd ..

An "ls" should show:
Code:

bootinst.bat bootlilo.sh dos isolinux mt86p vesamenu.c32
bootinst.sh chain.c32 initrd.gz modules syslinux vmlinuz

Run the bootinst.sh script:
Code:

./bootinst.sh

This begins the Slax boot installer:
Code:

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Welcome to Slax boot installer
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

This installer will setup disk /dev/sdb1 to boot only Slax.

Warning! Master boot record (MBR) of /dev/sdb will be overwritten.
If you use /dev/sdb to boot any existing operating system, it will not work
anymore. Only Slax will boot from this device. Be careful!

Press any key to continue, or Ctrl+C to abort...

Hit any key and:
Code:

Flushing filesystem buffers, this may take a while...
Setting up MBR on /dev/sdb...
The Master Boot Record of /dev/sdb has been updated.
Activating partition /dev/sdb1...
No partition table modifications are needed.
Updating MBR on /dev/sdb...
Setting up boot record for /dev/sdb1...
Disk /dev/sdb1 should be bootable now. Installation finished.

Read the information above and then press any key to exit...

The install worked perfectly!!!!

Reboot your machine and test out the stick

If anyone has any questions or are not clear on any part of this Tutorial I will answer any of your questions to the best of my ablility.

Ubuntu Dark Arts: Hacking Networks With Ettercap To Gain Usernames And Passwords

SOURCE:http://www.zimbio.com/Runescape+Hacks/articles/3164/Ubuntu+Dark+Arts+Hacking+Networks+Ettercap
-----------------------------------
Ettercap is a program that can accomplish many things, most notably gaining usernames and passwords from networked computers. For example, let's say you think your husband or wife is carrying on an online relationship with somebody and you want to gain access to their email or social site accounts. With ettercap, you can do just that.

First, you need to install ettercap. From the command line type in this:
sudo apt-get install ettercap-common ettercap-gtk

Before running ettercap you will need to modify the config file to allow for SSL access. Some other guides state to edit the file located at /usr/local/etc/etter.conf but my config file was not located there. I found mine at /etc/etter.conf. You have to uncomment the two iptables lines about iptables in the .conf file to allow for SSL access. So locate these two lines:

#redir_command_on = "iptables -t nat -A PREROUTING -i %iface -p tcp –dport %port -j REDIRECT –to-port %rport"

#redir_command_off = "iptables -t nat -D PREROUTING -i %iface -p tcp –dport %port -j REDIRECT –to-port %rport"

Remove the "#" before each line and save the edited file. Then go to Applications –> System Tools –> ettercap and follow this mini-guide to "sniff" your local network for usernames and passwords.

ettercap start screen

Go to Sniff –> Unified sniffing

ettercap unified sniffing

Choose your network interface (eth0, wlan0, etc.)

ettercap choose interface

Press CTRL+s to scan the network for hosts

ettercap scan network

Go to Mitm –> Arp poisoning

ettercap arp poisoning

After selecting arp poisoning, then check the box "Sniff remote connections"

ettercap sniff remote connections

Finally, select Start –> Start sniffing to start the sniffing for usernames and passwords

ettercap start sniffing

This works out quite nicely if you have everything set up right. I have tried this out and can confirm that it does indeed sniff out usernames and passwords. When someone on your local network goes to a website where they need to log in to gain entry, such as Yahoo Mail, then immediately after they log in to the site, the website url, username and password will be listed in the ettercap terminal. Pretty cool, huh?

Just to be on the safe side I will just say that this guide is for informational purposes only; it is not my intention to have anyone read this and head off to a local coffee shop and try to hack everyone's accounts!

Thursday, 11 December 2008

Unlock pdf file online

http://www.ensode.net/pdf-crack.jsf

Monday, 8 December 2008

Fix no sound on Ubuntu 8.10

SOURCE: http://onlyubuntu.blogspot.com/2008/11/fix-for-no-sound-issue-in-ubuntu-810.html
--------------------------------------------

sudo killall pulseaudio

sudo alsa force-reload

and then go to System>Preferences>Sound and change everything to ALSA

Wednesday, 3 December 2008

How to get Vmware server to access USB stick?

SOURCE: https://lists.ubuntu.com/archives/ubuntu-users/2008-March/139099.html
exec the following command "mount -t usbfs usbfs /proc/bus/usb/" before starting
VMWare does the job.

Monday, 1 December 2008

How can I view those Microsoft Office 2003 Scanned documents in Unix?

SOURCE: http://nomoa.com/index.php?module=articles&func=display&aid=1864&theme=print
-------------
Ubuntu - the straw that broke the camels back
Posted by: Samiuela LV Taufa onWed, 30 May 2007 14:57:24

Otherwise known as: How can I view those Microsoft Office 2003 Scanned documents in Unix?

[Update 2007.06.14 to include gnome2/nautilus-script and hopefully clarified some text]

The desktop replacement Ubuntu box I've been putting together for my father-in-law's office has ground to a halt because of a very simple problem:

I can't get a graphics viewer for Microsoft Office 2003's TIFF format created by the MS Office 2003 tool for managing scanners, Microsoft Office Document Imaging.

Technically, Ubuntu/Linux can view the multiple images embedded in the TIFF file, but it is a song and dance affair at the moment that is doable for a techno-dweeb, but not yet accessible to mere humans.

Scanning: YES we can scan documents under Ubuntu by using XSane Image Scanner, but I'm interested in viewing TIFF documents created by business partners.
Background

Microsoft Office Document Imaging (MDI) is part of Microsoft Office 2003 suite and provides a generic scanning tool for scanning images into your machine (most notably for attaching printed documents to email.) This tool is a way way easier to use than the driver based tool provided by the scanner manufacturer, as well as allowing a single application on which the user is trained for scanning documents/pictures.

We currently use it for scanning contracts, forms and sent faxes to forward between business partners. Likewise, our major business partner uses it extensively when sending us printed forms and faxes.

MDI's scanning tool saves multi-page scanned documents as a single TIFF file. Within this TIFF file are:

1. JPEG images of the scanned pages
2. JPEG thumbnails of the scanned pages
3. OCR'd versions of the above pages (OCR - Optical Character Recognition - an attempt to recognise the text in your document)

The TIFF/TIF file format has been extensively documented and in Microsoft's own promotional blurb about Microsoft Office - Document Imaging.

TIFF is a commonly used format for various imaging applications, including those that scan and fax. Microsoft Office Document Imaging uses the TIFF format, utilizing the format's capability to contain text recognized by optical character recognition (OCR) (OCR: Translates images of text, such as scanned documents, into actual text characters. Also known as text recognition.) When you scan new documents, they are saved in TIFF format (with a .tif extension), and any OCR text is stored in the TIFF file along with the image.

You can open and edit TIFF files created with Office Document Imaging by using many other graphics applications. When you do so, any OCR text that the file contains is lost. You will have to rerun OCR if you want to access the text in the TIFF file again in Office Document Imaging.

It seems that Microsoft are using legitimate extensions to TIFF 6.0 and it's extensions, but not near enough programmers out there have access to the documentation on these extensions or can cut the code for it.

Some further notes on the TIFF format in the below Unix section but there are problems even within Microsoft Windows to view these scanned multi-page documents.

Visit bTonga


Viewing:

On an MS Windows XP desktop, you can view these multiple pages using:

* Microsoft's MDI application's viewer, or
* the free application IrfanView, or
* the free application XnView (my preferred tool at the moment)

On Unix, Linux there's a convoluted way to get at the files and shown later in this post.
Viewing Limited:

Microsoft's Office Picture Manager (12.0.4518) can view the 1st Image in the TIFF file, but I can't see anyway of seeing the rest of the images in the file and there are no notable indications that there are multiple images in the file (leading you to a conclusion that the single image you see is the only relevant image.)

OT: Weird limitation considering the product is shipped by the same team, only further highlighting how big Office development/programming has become.
Viewing NOT:

You cannot, however, view the images using Microsoft's own current tools and other popular tools.

* Windows Picture and Fax Viewer, or
* Imagic Magic 6.2.3 Q16 IMDisplay 1.0, or
* Paint.NET v3.07

Unfortunately I don't have a copy of Adobe Photoshop on my machine to give people more information.

Similarly, I have tried to view multipage TIFFs on Linux with the following applications also failing with errors complaining about the TIFF format

* F-Spot Photo Manager 0.3.5 (crashes on import, and fails to display image/s)
* GIMP Image Editor 2.2.13 (multiple "unknown field tag" error message on loading file)
* GNU Paint gpaint-2 0.3.0-pre5 (error: cannot open file)
* gThumb Image Viewer 2.10.2 (no errors, but no image view)
* Gwenview 1.4.1 (multiple "unknown field tag" errors and "Invalid YCBCr subsampling")
* xloadimage 4.1 (same error message as tiffinfo shown below)

Viewing GNU Linux:

Thanks to a post by Michael R. Head, there is a way to view the multipage TIFF files, but there is some command-line magic you have to walk through.

Let's first take a look at an indicator that we have a TIFF file created by Microsoft's MDI by using LibTIFF's tiffinfo tool. We first transport 2 multipage TIFF files (multipage.tif and multipage2.tif) from our Windows box to Ubuntu Linux.

$ ls
multipage2.tif multipage.tif

$ file multipage.tif multipage2.tif
multipage.tif: TIFF image data, little-endian
multipage2.tif: TIFF image data, little-endian

The unix file utility is telling us that the two images we're using in this example is a file with the format "TIFF image data, little-endian"

$ tiffinfo multipage.tif
TIFFReadDirectory: Warning, multipage.tif: unknown field with tag 513 (0x201) encountered.
TIFFReadDirectory: Warning, multipage.tif: unknown field with tag 514 (0x202) encountered.
TIFFReadDirectory: Warning, multipage.tif: unknown field with tag 37680 (0x9330) encountered.
multipage.tif: Invalid YCbCr subsampling.
TIFFReadDirectory: multipage.tif: cannot handle zero strip size.

Using tiffinfo we now know that for both the multipage.tif and multipage2.tif file that we do not recognise portions of the file that seem to be equivalent areas in both files.

$ tiffinfo multipage2.tif
TIFFReadDirectory: Warning, multipage2.tif: unknown field with tag 513 (0x201) encountered.
TIFFReadDirectory: Warning, multipage2.tif: unknown field with tag 514 (0x202) encountered.
TIFFReadDirectory: Warning, multipage2.tif: unknown field with tag 37680 (0x9330) encountered.
multipage2.tif: Invalid YCbCr subsampling.
TIFFReadDirectory: multipage2.tif: cannot handle zero strip size.

Seeing the error messages displayed by tiffinfo helps us to understand some of the error messages displayed by the above image viewers. The errors are implying these viewers use of the libtiff library and it's limitations. It should be pointed out here that libtiff.org documents:

TIFF 6.0 Specification Coverage

The library is capable of dealing with images that are written to follow the 5.0 or 6.0 TIFF spec. There is also considerable support for some of the more esoteric portions of the 6.0 TIFF spec.
...
Note that there is no support for the JPEG-related tags defined in the 6.0 specification; the JPEG support is based on the post-6.0 proposal given in TIFF Technical Note #2.
...
The JPEG-related tag is specified in TIFF Technical Note #2 which defines a revised JPEG-in-TIFF scheme (revised over that appendix that was part of the TIFF 6.0 specification).

I am not so sure how relevant the above is to the Microsoft MDI problem, but suffice it to say I don't know enough to blame anyone for why so many open source software lack support for viewing MDI multi-page TIFF files.
Unix: Extracting the Images

We now know that the TIFF file could be a legitimate TIFF file, but we can't view the images without resorting to a Windows box. Thanks again to Michael R. Head's article the solution is through a forensics tool Foremost.

Foremost is a console program to recover files based on their headers, footers, and internal data structures. This process is commonly referred to as data carving. Foremost can work on image files, such as those generated by dd, Safeback, Encase, etc, or directly on a drive. The headers and footers can be specified by a configuration file or you can use command line switches to specify built-in file types. These built-in types look at the data structures of a given file format allowing for a more reliable and faster recovery.

Foremost seems to understand the TIFF data structure presented by Microsoft's MDI, so it can extract the separate streams/images and store them to the disk for 'later processing. Using foremost is rather simple as shown below on our two multipage files.

$ ls
multipage2.tif multipage.tif

$ foremost -i multipage.tif -o multipage
Processing: multipage.tif
|*|

$ foremost -i multipage2.tif -o multipage2
Processing: multipage2.tif
|*|

foremost creates subdirectories (-o) jpg and ole where jpg contains the images (both full image and thumbnail image), and ole contains ocr'd versions of the pages.

$ ls -R
.:
multipage multipage2 multipage2.tif multipage.tif

./multipage:
audit.txt jpg ole

./multipage/jpg:
00000000.jpg 00000545.jpg 00000937.jpg 00001543.jpg 00002127.jpg
00000538.jpg 00000931.jpg 00001535.jpg 00002120.jpg 00002682.jpg

./multipage/ole:
00002692.ole

./multipage2:
audit.txt jpg ole

./multipage2/jpg:
00000000.jpg 00002941.jpg 00006432.jpg 00009274.jpg 00011870.jpg 00014243.jpg 00016827.jpg
00001609.jpg 00004364.jpg 00006444.jpg 00009284.jpg 00011879.jpg 00014252.jpg 00016836.jpg
00001622.jpg 00004375.jpg 00007880.jpg 00010598.jpg 00012939.jpg 00015470.jpg 00018163.jpg
00002931.jpg 00004954.jpg 00007891.jpg 00010608.jpg 00012948.jpg 00015481.jpg

./multipage2/ole:
00018172.ole

The jpg files, being thumbnail and full image should have distinctive sizes such as the above listing shown below

$ ls -lR

./multipage:
total 12
-rw-r--r-- 1 samt samt 1178 2007-05-30 14:47 audit.txt
drwxr-xr-- 2 samt samt 4096 2007-05-30 14:47 jpg
drwxr-xr-- 2 samt samt 4096 2007-05-30 14:47 ole

./multipage/jpg:
total 1380
-rw-r--r-- 1 samt samt 275019 2007-05-30 14:47 00000000.jpg
-rw-r--r-- 1 samt samt 3709 2007-05-30 14:47 00000538.jpg
-rw-r--r-- 1 samt samt 197089 2007-05-30 14:47 00000545.jpg
-rw-r--r-- 1 samt samt 3011 2007-05-30 14:47 00000931.jpg
-rw-r--r-- 1 samt samt 305575 2007-05-30 14:47 00000937.jpg
-rw-r--r-- 1 samt samt 4002 2007-05-30 14:47 00001535.jpg
-rw-r--r-- 1 samt samt 294723 2007-05-30 14:47 00001543.jpg
-rw-r--r-- 1 samt samt 3442 2007-05-30 14:47 00002120.jpg
-rw-r--r-- 1 samt samt 284052 2007-05-30 14:47 00002127.jpg
-rw-r--r-- 1 samt samt 4793 2007-05-30 14:47 00002682.jpg

./multipage/ole:
total 8
-rw-r--r-- 1 samt samt 5632 2007-05-30 14:47 00002692.ole

./multipage2:
total 12
-rw-r--r-- 1 samt samt 1998 2007-05-30 14:47 audit.txt
drwxr-xr-- 2 samt samt 4096 2007-05-30 14:47 jpg
drwxr-xr-- 2 samt samt 4096 2007-05-30 14:47 ole

./multipage2/jpg:
total 9200
-rw-r--r-- 1 samt samt 823649 2007-05-30 14:47 00000000.jpg
-rw-r--r-- 1 samt samt 6345 2007-05-30 14:47 00001609.jpg
-rw-r--r-- 1 samt samt 669597 2007-05-30 14:47 00001622.jpg
-rw-r--r-- 1 samt samt 5344 2007-05-30 14:47 00002931.jpg
-rw-r--r-- 1 samt samt 728014 2007-05-30 14:47 00002941.jpg
-rw-r--r-- 1 samt samt 5365 2007-05-30 14:47 00004364.jpg
-rw-r--r-- 1 samt samt 296251 2007-05-30 14:47 00004375.jpg
-rw-r--r-- 1 samt samt 756384 2007-05-30 14:47 00004954.jpg
-rw-r--r-- 1 samt samt 6134 2007-05-30 14:47 00006432.jpg
-rw-r--r-- 1 samt samt 734716 2007-05-30 14:47 00006444.jpg
-rw-r--r-- 1 samt samt 5064 2007-05-30 14:47 00007880.jpg
-rw-r--r-- 1 samt samt 707892 2007-05-30 14:47 00007891.jpg
-rw-r--r-- 1 samt samt 4973 2007-05-30 14:47 00009274.jpg
-rw-r--r-- 1 samt samt 672318 2007-05-30 14:47 00009284.jpg
-rw-r--r-- 1 samt samt 4854 2007-05-30 14:47 00010598.jpg
-rw-r--r-- 1 samt samt 645537 2007-05-30 14:47 00010608.jpg
-rw-r--r-- 1 samt samt 4784 2007-05-30 14:47 00011870.jpg
-rw-r--r-- 1 samt samt 542300 2007-05-30 14:47 00011879.jpg
-rw-r--r-- 1 samt samt 4081 2007-05-30 14:47 00012939.jpg
-rw-r--r-- 1 samt samt 662687 2007-05-30 14:47 00012948.jpg
-rw-r--r-- 1 samt samt 4416 2007-05-30 14:47 00014243.jpg
-rw-r--r-- 1 samt samt 623235 2007-05-30 14:47 00014252.jpg
-rw-r--r-- 1 samt samt 5299 2007-05-30 14:47 00015470.jpg
-rw-r--r-- 1 samt samt 688888 2007-05-30 14:47 00015481.jpg
-rw-r--r-- 1 samt samt 4436 2007-05-30 14:47 00016827.jpg
-rw-r--r-- 1 samt samt 678824 2007-05-30 14:47 00016836.jpg
-rw-r--r-- 1 samt samt 4619 2007-05-30 14:47 00018163.jpg

./multipage2/ole:
total 8
-rw-r--r-- 1 samt samt 5632 2007-05-30 14:47 00018172.ole

I don't know what the sequencing issues are with the file names, but it seems obvious that the larger files will be the full image, with one of the smaller files being a thumbnail of the same (presumably the nearest higher order number.)
Unix: Automating extraction and viewability

In a comment to Michael R. Head's article, typhoncore writes a nice bash script that uses ImageMagick's 'convert' utility and pdftk to create a multipage PDF file from the larger images. It is listed here with a few minor modifications I have inserted (for better or worse.)

#!/bin/bash
DOC_COUNT=0
arg1=$1
arg_out=$arg1.out
echo "Extracting Images from $arg1 using foremost to $arg_out"
foremost -i $arg1 -o $arg_out
echo "Done"
cd $arg_out/jpg
echo "Converting Single Images to PDF"
for i in $(ls *.jpg); do
ODDEVEN=$(echo "scale=0; $DOC_COUNT % 2" | bc)
if [ "$ODDEVEN" = "0" ] ; then
echo -n " > $i to $i.pdf"
convert $i $i.pdf
echo " - done"
fi
DOC_COUNT=$(echo "scale=0; $DOC_COUNT + 1" | bc)
done
echo -n "Merging separate single page PDF's to a multipage PDF"
pdftk *.pdf cat output merged.pdf
mv merged.pdf ../../$arg1.pdf
echo " - done"
cd ../..
echo -n "Removing temporary directory $arg_out"
rm -Rf $arg_out
echo " - done"

The bastardisation of typhoncore's script is to add console progress indicators (and as additional documentation within the script) for us noobs.

Output of the script will look something like the below.

$ sh TIFFtoPDF.sh multipage.tif
Extracting Images from multipage.tif using foremost to multipage.tif.out
Processing: multipage.tif
|*|
Done
Converting Single Images to PDF
> 00000000.jpg to 00000000.jpg.pdf - done
> 00000545.jpg to 00000545.jpg.pdf - done
> 00000937.jpg to 00000937.jpg.pdf - done
> 00001543.jpg to 00001543.jpg.pdf - done
> 00002127.jpg to 00002127.jpg.pdf - done
Merging separate single page PDF's to a multipage PDF - done
Removing temporary directory multipage.tif.out - done
$

Unix: GNOME GUIfying extraction and viewability

I was thinking what could be a registry hack (Windows Hat on) or other means to let the File Explorer in X Windows (later discovering it is called GNOME Nautilus) send TIFF files to the above script when I came across a solution for separate but related problem Mount and UnMount ISO images without burning them.

That lead me to a rehacked whack of the above TIFFtoPDF.sh that can be placed in your ~/username/.gnome2/nautilus-scripts/ folder.

Read Nautilus File Manager Scripts : Questions and Answers for more details on how to get the below script working properly with Nautilus.


#!/bin/bash
# mount

BASENAME=`basename $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS`

DOC_COUNT=0
INFILE=$BASENAME
OUTPUT=$INFILE.odir

if ! zenity --question --title "Convert MS TIFF file to Multipage PDF"

--text "Do you wish to Convert the MS TIFF $BASENAME to a Multipage PDF?"
then
exit 0
fi

foremost -i $INFILE -o $OUTPUT
cd $OUTPUT/jpg

for i in $(ls *.jpg); do
ODDEVEN=$(echo "scale=0; $DOC_COUNT % 2" | bc)
if [ "$ODDEVEN" = "0" ] ; then
convert $i $i.pdf
fi
DOC_COUNT=$(echo "scale=0; $DOC_COUNT + 1" | bc)
done
pdftk *.pdf cat output merged.pdf
mv merged.pdf ../../$INFILE.pdf
cd ../..
rm -Rf $OUTPUT

The bare essentials for getting the above script working in GNOME Nautilus is:

1. Put the script in ~/username/.gnome2/nautilus-scripts/
2. Make the script executable
3. Visit the directory using GNOME Nautilus

Conclusion

There is no going to Ubuntu/Linux or any other variant of Unix/BSD until this image viewing problem can find a simpler solution for these guys.

Funny how for the big ticket items we were eventually able to find good alternate solutions, but things fell over with this simple yet insurmountable problem.

Microsoft Outlook 2003 --> now using Thunderbird 2.0.x
Microsoft Word 2003 --> we have been testing Open Office 2.2 Write
Microsoft Excel 2003 --> we have been testing Open Office 2.2 Calc
Microsoft Access 2003 --> not currently using, no need for an alternative
Microsoft Publisher 2003 --> infrequent use, although testing scribus
Printing --> CUPS with Vendor Linux Drivers
Scanning --> XSane with Vendor Linux Drivers

Accounting Software --> Not currently using one, but looking around

For my own desktop needs, I'm still an XP man and will probably go to Vista with my next machine, as that will definitely be a TabletPC, but there's plenty of cheap Pentium IV's on www.ebay.com.au so I'm getting an X Windows (Gnome/KDE) up for some of the kid's fun and gaming (defining anything they enjoy as play.)

The sledge-hammer solution would be to run a mail server that would parse incoming emails for TIFF files and automatically detect/convert multipage files from TIFF to PDF. If this was a do or die situation I would probably work on it, as it is, it will have to wait for another day/solution.
References

Michael R. Head's Handling Microsoft Office Document Scanning TNEF and TIFFs in Linux
typhonecore Multipage TIFF to Multipage PDF script
DRAFT TIFF Technical Note #2
Adobe Photoshop TIFF Technical Notes (PDF)

Monday, 24 November 2008

Online conversion tools

vixy.net
zamzar.com

Wednesday, 19 November 2008

Online photo edit

photoshop.com/express
FotoFlexer.com
Picnik.com
lunapic.com
aviary.com
picture2life.com
Pixenate.com
snipshot.com

Tuesday, 28 October 2008

How to fix black windows during video playback

How to fix black windows during video playback

* There is a workaround to this bug by changing the video output device on your video player to x11/xshm. (Note that this will decrease the quality of the video output and requires a lot more CPU.)

* For gstreamer-dependent players (Totem, etc.):

gstreamer-properties
Video-->Default Video Plugin: X Window System (No Xv)

Click Test to verify that video playback is working (you should be able to see the standard TV testing colour stripes).

* For VLC player(if installed):

VLC-->Settings-->Preferences
Video-->Output modules-->Advanced: X11

* For MPlayer (if installed):

Mplayer-->Right-click on the screen-->Preferences
Video-->Available Drivers: X11 (XImage/Shm)

Some users report that MPlayer may not be able to show videos in full screen.

* For Xine player (if installed):

Xine-->File-->Configure-->Preferences
experience_level: Master Of The Known Universe
Video-->Driver: xshm

* For RealPlayer (if installed):

RealPlayer-->Tools-->Preferences
Hardware-->Deselect: Use XVideo

Monday, 27 October 2008

Increase vmware harddisk size

vmware-vdiskmanager -x 10GB myDisk.vmdk

10GB: change to your new size
myDisk.vmdk: change to your harddisk file

Then use partitioning tools to resize your partition.

Friday, 17 October 2008

Enable bluetooth on Hp nx6320 with Ubuntu Hardy

-Remove bluez-utils & gnome-bluetooth packages
-Edit source.list to add the repository : deb http://archive.ubuntu.com/ubuntu gutsy main
-Disable all other repositories
-Install bluez-utils. You may need to remove bluez-audio if conflict occurs
-Enable other repos and disable the one on step 2.

Thursday, 16 October 2008

Installing Metasploit on Ubuntu/Kubuntu/Debian Linux

SOURCE:
http://www.metasploit.com/dev/trac/wiki/Metasploit3/InstallUbuntu

At this time, no package exists for Metasploit 3. In order to use the Metasploit Framework on Ubuntu or Debian distributions of Linux, the following packages need to be installed:

# apt-get install ruby libruby rdoc libyaml-ruby libzlib-ruby libopenssl-ruby libdl-ruby libreadline-ruby libiconv-ruby rubygems

*The RubyGems package may need to be manually downloaded and installed.

If you would like to use the experimental GUI, you will need to install the following packages:

# apt-get install libgtk2-ruby libglade2-ruby

If you would like to use the online update feature, you will need to install the "subversion" package as well. Once the pre-requisites have been installed, download the Unix tarball from Framework Website and extract it to the directory of your choice. If everything was installed correctly, execute the interface of your choice to get started (msfconsole, msfweb, etc).

Wednesday, 15 October 2008

Dell Optiplex 330 won't reboot or shutdown

Solution: add the kernel option "reboot=b" in the menu.lst

Thursday, 9 October 2008

Install Agere Modem on Ubuntu with hp nx6320

-Install the package sl-modem-daemon
-Download the package SLMODEMD.gcc4.2.tar.gz, untar
-Copy slmodemd from the downloaded archive to /usr/sbin:

# sudo cp SLMODEMD.gcc4.2/slmodemd /usr/sbin/
- Edit as root /etc/default/sl-modem-daemon and add or change the following lines:

SLMODEMD_DEVICE=hw:0,6
SLMODEMD_COUNTRY='your country name'

Save the file.

-Now run

# wvdialconf

This should detect your modem and write create or change the file /etc/wvdial.conf

Now edit /etc/wvdial.conf and enter the details to connect with your provider:
also disable the following lines with ";"
Carrier Check = no
Stupid Mode = on

If you get a very low connection speed, you also might set:

Baud = 115200
(instead of Baud = 460800)

Save the file.

-Now connect the laptop with a modem cable to your telephone line

start slmodemd:

# slmodemd -c 'YOURCOUNTRYNAME' --alsa hw:0,6

Then keep this console open and open a second console and start wvdial:

$ sudo wvdial


Note:
- if you connect with kppp then use gksu kppp
- use the following command to check your modem type: cat /proc/asound/card0/codec#1
make sure your modem chipset as below:
Codec: Generic 11c1 Si3054
Address: 1
Vendor Id: 0x11c13026
Subsystem Id: 0x103c30aa
Revision Id: 0x100700
Modem Function Group: 0x1

- after connected with kppp, use the following command to change default gateway :
sudo route add default ppp0

Sunday, 28 September 2008

How to speed up Ubuntu

http://ubuntuforums.org/showthread.php?t=89491

================

Problem with HAL

source:http://www.teknopipo.nl/telco/files/tag-ubuntu.html
=================================
HAL bug in Ubuntu
18/05/08 18:50 Filed in: network configuration
This weekend I finally pulled myself together and upgraded my home server to Ubuntu 8.04, also known as Hardy Hudson. After a seemingly painless upgrade process, I rebooted and logged in, and the system presented me with the following error message:

Internal error: HAL Failed to initialize

Annoying as this message may be, the biggest problem was that Hardy would no longer mount any of my external drives. After nosing around on the web, I've seen several suggested solutions, varying from tweaking etc/init.d scripts, reconfiguring HAL to completely reinstalling Ubuntu. The problem also occurs on earlier kernels. If I had to guess, I'd say the error is somehow related to the problems I've been having with an external USB drive from Freecom (400GB). Basicly I've been repartitioning and reformatting that thing in every format imaginable, but I can't seem to get it to behave properly... HAL means Hardware Abstraction Layer, and most people I've seen reporting the above error have some kind of issue with a faulty DVD drive that fails to mount, for example.

Of course the first thing I tried was to remove the external USB drive and reboot to see if that solved anything, and it didn't. Maybe my buggy drive messed up some configuration file or something, so I then tried the suggested solution to reinstall HAL which seemed to solve the problem to some extent. I no longer got the error, but my desktop failed to initialize properly, I was just getting a blank screen and a task bar. And after a reboot the error was back again, so not much luck there.

Another suggested solution was to sudo mkdir /var/run/PolicyKit, whatever the hell that means. I checked to see if that dir was there, and it was, so no need to run the mkdir.... but what I did notice, was that its ownership was set to polkituser:polkituser. After typing groups in a terminal, I noticed that my userid was not in the polkituser group, so I figured that was the problem. And it was. After I typed...

sudo usermod -a -G polkituser [myuserid]

...I relogged in and everything was working flawlessly. Don't forget the -a option or you'll fuck up your system. Out.

===================
https://bugs.launchpad.net/ubuntu/+source/linux-ubuntu-modules-2.6.24/+bug/212271

http://www.uluga.ubuntuforums.org/showthread.php?t=365442&page=3

===============
SOURCE:
http://www.danielhardy.com/blog/making-friends-with-hal/
As of late I have been having some trouble with HAL(Hardware Abstraction Layer). I
finally found the solution and decided I would post it here in case anyone else my need it. The symptoms of this problem are simple. When Gnome boots up you get an error stating “failed to initialize HAL”. There are many problems that can cause this error but the one that I keep running into was tricky to find but extremely easy to resolve.

It boils down to a boot order issue where dbus and HAL are scheduled to boot at the same time. The problem with this is that often HAL requires dbus to be up and running. To figure out if this is the specific cause you can take a look at the /etc/rc2.d/ folder. You simply want to make sure HAL’s three digit prefix comes after dbus’s. For example “S12dbus” followed by “S13hal”. If it doesn’t simply execute something like the following command in the terminal. Make sure you change it to match your system.

sudo mv /etc/rc2.d/S12hal /etc/rc2.d/S13hal

If you have ran into this problem I hope this will help you get it fixed.

Thursday, 25 September 2008

How to join Ubuntu/Samba to a Windows 2003 Active Directory domain

SOURCE: http://www.onnoot.com/wiki/how_to_join_ubuntu_samba_to_a_windows_2003_active_directory_domain
==================
How to join Ubuntu/Samba to a Windows 2003 Active Directory domain

Ingredients:

*
A Windows network with an Active Directory server (like Windows Server 2003)
*
Ubuntu Linux 5.10 installed
*
TCP/IP setup properly (the Linux machine taking its address by DHCP from the Windows server)
*
No firewall yet on the Linux machine! First get it working, then secure it.

More info:

*
http://us1.samba.org/samba/docs/man/Samba-HOWTO-Collection/domain-member.html
*
http://justlinux.com/forum/archive/index.php/t-118512.html

1. Installing

We assume that Ubuntu Linux has been installed.

Install the following packages with the Synaptic Package Manager. You may need to specify “universe” as an extra source for packages.

*
Samba (version 3):
o
samba
o
samba-common (installed by default)
o
smbclient (installed by default)
o
winbind
*
Kerberos:
o
krb5-config
o
krb5-user
*
... and any packages that might be needed to meet dependencies.

2. Edit configuration files

Edit the following configuration files. We assume the following:

*
The local DNS domain is mycompany.local
*
The Windows 2003 server is obelix.mycompany.local

/etc/samba/smb.conf

[global]
security = ADS
realm = MYCOMPANY.LOCAL
workgroup = mycompany
password server = obelix.mycompany.local
wins support = no
wins server = 10.0.20.202
invalid users = root
# Winbind settings
idmap uid = 10000-20000
idmap gid = 10000-20000
# For testing
debuglevel = 2

# A shared folder for testing purposes
[SharedFolder]
path = /home/onno2/Shared_Folder
available = yes
public = yes
writable = yes
force create mode = 0666
force directory mode = 0777

Make sure the path (/home/onno2/Shared_Folder or whatever you choose) exists and that the rights are set properly (chmod 777 or something similar)
/etc/krb5.conf

[libdefaults]
default_realm = MYCOMPANY.LOCAL
krb4_config = /etc/krb.conf
krb4_realms = /etc/krb.realms
kdc_timesync = 1
ccache_type = 4
forwardable = true
proxiable = true
# The following libdefaults parameters are only for Heimdal Kerberos.
v4_instance_resolve = false
v4_name_convert = {
host = {
rcmd = host
ftp = ftp
}
plain = {
something = something-else
}
}
[realms]
MYCOMPANY.LOCAL = {
kdc = obelix.mycompany.local
admin_server = obelix.mycompany.local
}
[domain_realm]
.mycompany.local = OBELIX.MYCOMPANY.LOCAL
mycompany.local = OBELIX.MYCOMPANY.LOCAL
[login]
krb4_convert = true
krb4_get_tickets = true

/etc/nsswitch

The only change here was adding winbind twice.

# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.
passwd: compat winbind
group: compat winbind
shadow: compat
hosts: files dns
networks: files
protocols: db files
services: db files
ethers: db files
rpc: db files
netgroup: nis

3. Start or restart services

/etc/init.d/samba restart
/etc/init.d/winbind restart
4. Join domain

net ads join -U administrator If this doesn’t work, check the logs in Linux (/var/log/samba/*) and Windows.
5. Test your setup

testparm to check if your smb.conf has a correct syntax.
kinit onno@MYCOMPANY.LOCAL test if kerberos works properly.
wbinfo -u should give a list of users.
wbinfo -g should give a list of groups.
getent passwd should give a list of users in the passwd style.
getent group should give a list of groups.
ls -ltr /var/log/samba gives a list of log files, sorted by time of last change.
smbclient -L -U onno should give you a list of available shares.

If this all works properly, try to access the share (/home/onno2/Shared_Folder) from any Windows machine in the domain by using network neighbourhood

Tuesday, 23 September 2008

Enabling USB support for VMware Server in Hardy Heron

SOURCE: http://maketecheasier.com/enabling-usb-support-for-vmware-server-in-hardy-heron/2008/05/05
===============================================

After installing VMware Server on Hardy heron, if you find that your virtual machine cannot detect any USB devices on the host, that is because Ubuntu has removed the support for /proc/bus/usb/*.

The following is the way to solve this issue:

Open up a terminal and type

gksu gedit /etc/init.d/mountdevsubfs.sh

In the window that pop up, scroll to line 40 and look for the following code:

#mkdir -p /dev/bus/usb/.usbfs
#domount usbfs "" /dev/bus/usb/.usbfs -obusmode=0700,devmode=0600,listmode=0644
#ln -s .usbfs/devices /dev/bus/usb/devices
#mount --rbind /dev/bus/usb /proc/bus/usb

Uncomment them by removing the ‘#’ infront of each line of the code.

Save and exit.

Restart the module

/etc/init.d/mountdevsubfs.sh start

Done. Your virtual machine should be able to detect USB device now.

---------

Monday, 22 September 2008

WEB cracking with Intel 3945abg

-Download and install aircrack-ng rc1 (http://download.aircrack-ng.org/aircrack-ng-1.0-rc1.tar.gz)
-Download & install iw (http://www.aircrack-ng.org/doku.php?id=mac80211)
-Download compat wireless driver here (http://linuxwireless.org/download/compat-wireless-2.6/compat-wireless-old.tar.bz2)
-Test if your wireless card support injection ("aireplay-ng --test ")

Friday, 19 September 2008

Wireless driver for Intel 3945abg on wireless cracking

http://wireless.kernel.org/download/compat-wireless-2.6/compat-wireless-old.tar.bz2

Note: it is working on the hp nx6320.

Thursday, 18 September 2008

Cannot power on Vmware machine

when the guest system is on an ntfs Hd partition, it can't be powered on.

Solution:
Set "mainMem.useNamedFile=FALSE" in the .vmx file

Monday, 15 September 2008

Error when executing lvcreate: "/proc/misc: No entry for device-mapper found"

hen I opened the error, and at the top it said

/proc/misc: No entry for device-mapper found
Is device-mapper driver missing from kernel?
Failure to communicate with kernel device-mapper driver.
/proc/misc: No entry for device-mapper found
Is device-mapper driver missing from kernel?
Failure to communicate with kernel device-mapper driver.

Remember to load the modules into the kernel.

$ sudo modprobe dm_snapshot
$ sudo modprobe dm_mirror
$ sudo modprobe dm_crypt

Backup partition table

Copying Partition Tables with sfdisk
To backup or replicate a disk’s partition table, use sfdisk:
$ sudo sfdisk –d /dev/sda > sda-table Back up partition table to file
$ sudo sfdisk /dev/sda < sda-table Restore partition table from file
$ sudo sfdisk –d /dev/sda | sfdisk /dev/sdb Copy partition table from disk to disk

Friday, 12 September 2008

Eject usb drive in ubuntu

sudo fuser -k /media/usbdrive

Thursday, 11 September 2008

Install Logitech Quickcam Pro for Notebook

For Hardy (Ubuntu-8.04) and Gutsy (Ubuntu-7.10)
Code:

sudo apt-get install subversion build-essential linux-headers-$(uname -r) &&
svn checkout svn://svn.berlios.de/linux-uvc/linux-uvc/trunk &&
cd trunk &&
make &&
sudo cp -av /lib/modules/$(uname -r)/ubuntu/media/usbvideo/uvcvideo.ko /lib/modules &&
sudo install -v -m644 uvcvideo.ko /lib/modules/$(uname -r)/ubuntu/media/usbvideo/uvcvideo.ko &&
sudo depmod -ae $(uname -r)


REBOOT

--------------
SOURCE: http://ubuntuforums.org/showthread.php?t=593231

Tuesday, 9 September 2008

Installing Metasploit

Installing Metasploit

Before installing metasploit we need to install the following packages:

$ sudo apt-get install ruby libruby rdoc

$ sudo apt-get install libyaml-ruby

$ sudo apt-get install libzlib-ruby

$ sudo apt-get install libopenssl-ruby

$ sudo apt-get install libdl-ruby

$ sudo apt-get install libreadline-ruby

$ sudo apt-get install libiconv-ruby

$ sudo apt-get install rubygems

Once the dependencies have been installed, we are ready to install metasploit.

We now need to download the metasploit 3.0. Use the following link for download:

http://framework.metasploit.com/msf/downloader/?id=framework-3.0.tar.gz

Accept the license.

The location (for download) is not important. After the download is complete we need to untar it:

$ tar -xvzf framework-3.0.tar.gz


Updating Metasploit

Before we run metasploit, its a good idea to update its database. Change to metasploit folder:

$ cd metasploit-3.0

Update:

$ svn update

Note: in case you don't have subversion installed use the following command:

$ sudo apt-get install subversion


Running Metasploit

To run metasploit use the following command:

$ ./msfconsole

Friday, 5 September 2008

How to VMWare Server 1.0.6 and 2.0 RC1 in Ubuntu 8.04

http://ubuntuforums.org/showthread.php?t=779934

http://www.salatti.net/how-to-vmware-server-106-on-ubuntu-hardy-step-by-step/

Thursday, 4 September 2008

Howto crack (or hack) a wireless network with Wired Equivalent Privacy (WEP)

Howto crack (or hack) a wireless network with Wired Equivalent Privacy (WEP)

September 27, 2006 at 20:22 · Tags: Crack, d-link, hack, linksys, Linux, OSX, security, Vista, WEP, Windows, wireless networking, xp

Aircrack-ng logo

WEP was intended to provide comparable confidentiality to a traditional wired network (in particular it does not protect users of the network from each other), hence the name. Several serious weaknesses were identified by cryptanalysts — any WEP key can be cracked with readily available software in two minutes or less — and WEP was superseded by Wi-Fi Protected Access (WPA) in 2003, and then by the full IEEE 802.11i standard (also known as WPA2) in 2004. Despite the weaknesses, WEP provides a level of security that can deter casual snooping. Wikipedia

It’s fairly easy to crack a WEP encrypted wireless network. Infact the WEP encryption has some serious flaws in its design, flaws that make it easy and fast to crack or hack.

Install aircrack-ng - on Debian Etch by:

sudo apt-get install aircrack-ng

Then start aircrack-ng to look for wireless networks:

sudo airodump-ng eth1

Then notice the channel number of the wireless network you want to crack.

Quit aircrack-ng and start it again with med specific channel number to collect packages faster:

sudo airodump-ng -c 4 -w dump eth1

Then wait and let it collect about 500K IVS and the try the do the actual crack:

sudo aircrack-ng -b 0a:0b:0c:0d:0e:0f dump-01.cap

The MAC after the -b option is the BSSID of the target and dump-01.cap the file containing the captured packets.
HACKING COMMUNITIES:
hackerthreads.org security • View topic - HELPFU... http://www.hackerthreads.org/viewtopic.php?f=1...
1 of 19 08/22/2008 06:05 PM
http://www.tgs-security.com
http://www.anomalous-security.org
http://www.governmentsecurity.org
http://www.brain-hack .org
http://www.hack erscenter.com/
http://www.houseofmaveric.com
http://www.cheatforums.tk
http://www.warindustries.com
http://www.humptyhump.com/index.php
TROJANING COMMUNITIES:
http://www.cruel-intentionz.com
http://www.evileyesoftware.com
http://www.nak edcrew.net
http://newbielair.baselair.com
http://www.plexusataxia.net/bbs/
http://evileyesoftware.com/forums/
http://nak edcrew.net/mboard//index.php
http://mosuck er.net
http://www.opensc.ws/
http://chasenet.org/community/
http://illmob.org
http://j3n7il.net/forum/index.php
http://lithiumrat.org/forums/
http://www.lommage.co.uk
http://www.elitec0ders.net/forum/
http://www.immortal-hack ers.com
http://www.critical-zone.com/
http://www.nuclearwinter.us/
http://nuclearwinter.mirrorz.com/
http://www.iamaphex.org/forums/
http://ilusion-free.com/
http://www.elitest.info/forums
http://www.cruel-intentionz.info/
http://ucc.elfnet.org/forum.php
http://gateofgod.com/forums
http://sinred.com/forums
http://digerati.sinred.com/forums/
http://euyulio.org/forums
http://www.censorednet.org/ipb/
NEED COMPUTER HELP? GO HERE: (One of my favorite sites)
http://forums.techguy.org
Just look at the statistics for the site:
Code: Select all
hackerthreads.org security • View topic - HELPFU... http://www.hackerthreads.org/viewtopic.php?f=1...
2 of 19 08/22/2008 06:05 PM
Threads: 321,134, Posts: 2,444,064, Members: 176,961
It's huge, your questions get answered within minutes.
http://www.securibox.net/phpBB2/portal.php
PROXIES:
http://www.proxysk y.com
http://www.samair.ru/xwww/proxy.htm
http://www.quickproxy.tk
http://www.onlinecheck er.freeproxy.ru/f ... _lists.php (small list, but updated every
hour, usually good proxies)
HACKING:
http://www.insecure.org (home of Nmap)
http://www.luck y-web.net
http://www.net-security.org
http://nouse.sytes.net/webdeface.html
http://nouse.sytes.net/computerhack ing.html
http://www.infosyssec.org/infosyssec/hackhow1.htm
http://whitehats.com/library/internic/index.html
http://www.sir.com/academics/gibbs/stud ... /guhl.html
LINUX:
http://www.userfriendly.org
http://www.linuxjournal.com/
http://www.linuxiso.org
http://www.distrowatch.com
http://www.linux.org
http://www.linuxquestions.org
http://www.madpenguin.org
http://www.happypenguin.org (great site for Linux games, many include source code!)
http://www.tlm-project.org (shameless plug, sorry
http://www.linmodems.org
http://www.linuxant.com (connexant windmodem drivers for linux)
http://www.linuxpack ages.net
http://www.linuxsecurity.com
EXPLOITS:
http://www.hoobie.net/security/exploits
http://www.dmoz.org/Computers/Hack ing/Exploits
http://www.exploits.org
hackerthreads.org security • View topic - HELPFU... http://www.hackerthreads.org/viewtopic.php?f=1...
3 of 19 08/22/2008 06:05 PM
http://www.k -otik .com/exploits
TELNET:
http://www.elhalf.com/forge.txt
http://www.tip.net.au/tip/help/htelnet.htm
http://www.walthowe.com/navnet/faq/telnet.html
http://www.icsd.k12.ny.us/infotech/faq/telnet.html
http://www.hack erthreads.org/phpbb/viewtopic.php?t=724
http://chiark .greenend.org.uk /~sgtatham/putty/
ASSEMBLY:
http://www.xs4all.nl/~smit/asm01001.htm
http://www.geocities.com/SiliconValley/ ... les01.html
http://brain-hack .org/forum/viewtopic.php?t=92
http://www.hack erthreads.org/phpbb/viewtopic.php?t=790
ASSEMBLERS:
http://eurosport.ifrance.com/joss/asmz.htm
NETWORKING:
http://www.homenethelp.com/web/howto/HomeNet-start.asp
http://punch.engr.wisc.edu/~orchard/net-tutorial/
http://www.winncom.com/html/wireless.shtml
http://www.lantronix.com/learning/tutorials/
http://docs.rinet.ru/TCP-IP/
C++:
http://www.cplusplus.com/doc/tutorial/
http://www.ecst.csuchico.edu/~beej/guide/net/html/
http://www.hotscripts.com/Detailed/11707.html
http://www.mysteries-megasite.com/linux/tutorials.html
http://cprogramming.com
http://cboard.cprogramming.com
http://www.bloodshed.net/devcpp.html
http://www.carbonize.co.uk /Tutorials/Cpp/lesson_1.php
MISC PROGRAMMING LINKS:
http://tutorials.beginners.co.uk /integr ... /187/vs_p/
http://stommel.tamu.edu/~baum/programming.html
http://www.programmingtutorials.com/main.asp
http://www.freeprogrammingresources.com/
hackerthreads.org security • View topic - HELPFU... http://www.hackerthreads.org/viewtopic.php?f=1...
4 of 19 08/22/2008 06:05 PM
http://www.vbtutor.net/vbtutor.html
http://plugin.laxmaniac/index.html
http://www.php.net
http://www.python.org
http://www.w3schools.com
http://www.osdir.com
http://www.angrycoder.com/
http://www.dotnetspider.com/
http://www.davesite.com/webstation/html/
http://devshed.com
http://forums.devshed.com
http://www.rohitab.com
SOFTWARE CRACKING/REVERSE ENGINEERING:
http://www.hnc3k .com/tutorialz.htm
http://www.hack erthreads.org/phpbb/viewtopic.php?t=757
http://www.t-gr.com/fotis/
BUFFER OVERFLOWS:
http://www.wbglink s.net/pages/reads/bofs/
http://www.elhalf.com/win32buffer.txt
NUMERAL RADIXES:
http://www.cplusplus.com/doc/papers/hex.html
HOW TO ASK QUESTIONS:
http://www.catb.org/~esr/faqs/smart-questions.html
http://nouse.united.net.kg/idiotguide.html
CUSTOM PCs, CASE MODS, OVERCLOCKING:
http://www.gruntville.com
http://www.infomaniak .it
http://www.CrazyPC.com
http://www.pctechtalk .com
http://www.extrememhz.com/
http://www.extrememhz.com/
http://www.extreme-modder.com/
http://www.maxitmag.co.uk /
http://www.kusanagiweb.com/
http://www.voidedwarranty.com/
http://www.comp-shop.com/
http://www.overclock ersworld.com/
http://www.twistedhardware.tk
http://www.xtremepccentral.com/
hackerthreads.org security • View topic - HELPFU... http://www.hackerthreads.org/viewtopic.php?f=1...
5 of 19 08/22/2008 06:05 PM
http://www.pcsynapse.com/
http://www.subzerotech.com/index/
http://www.modsynergy.com/
http://www.casemodworld.com/
http://www.oc-zone.com/
http://www.techtastic.ca/
http://www.xcsystems.com/
http://www.mypcmadness.com/
http://www.cybercpu.net/
LINKS WITH MORE LINKS:
http://www.project-hack .org/tutorials.html
http://fux0r.phathookups.com/textfiles/ (A SHIT LOAD of text files, some really
interesting ones in there, covering a mass of subjects, check it)
http://www.beginningtoseethelight.org/
Actually it contains few topics but with adetailed discussion
"newbies will panic seeing this "
For Network ing , ccna , ccnp and windows network ing :
http://www.net130.com
its chineese , though you will find it so easy to deal with it contains various educational
media concerning ccna,ccnp,.....oracle for example i found this inside it :
http://www.net130.com/ccnp-labs/index.htm
http://iws.ccccd.edu/sbutler/
cisco educational ppt slides " ccna,ccnp,....." , its great .
http://www.petri.co.il/
Anothe amazing site talk ing about windows operating system, security and various
other topics .
http://www.windowsnetwork ing.com/
learn every thing about windows network ing many articles and amazing information .
hackerthreads.org security • View topic - HELPFU... http://www.hackerthreads.org/viewtopic.php?f=1...
6 of 19 08/22/2008 06:05 PM
For Hack ing and Security :
http://whoppix.hack ingdefined.com/index.php/Demos
Awonderfull movies explaining hack ing ,web crack ing and even sniffing remote traffic
.
I guess the whole site is simple and rather fine .
http://www.americasleastwanted.com
some good tutorials in electronics and phreak ing .
http://www.theargon.com
An amazing archive containing encryption tutorials , tools , source codes you will love
it .
For emails
http://www.mailnation.net/
1000 GBs email with various advantages for free .
http://www.yousendit.com/
send up to 1gb file to any email .
For guys who are fond of mak ing their live windows distribution and editing their own
distributions .
http://www.reatogo.de/Reatogo_Downloads.htm
http://www.nu2.nu/pebuilder/
http://www.xppe.com/
http://pcfreak s.big-clan.net/bartpe/pebuilder.shtml
For programmers
http://www.exhedra.com/exhedra/planetsourcecode/cd.aspx
http://www.planet-source-code.com/
hackerthreads.org security • View topic - HELPFU... http://www.hackerthreads.org/viewtopic.php?f=1...
7 of 19 08/22/2008 06:05 PM
just choose alanguage and get many source codes for many projects this site is many
awards winning .
Who can live without book s ?!!!
http://www.blueportal.org
book s ............. many book s " needs registeration "
http://www.flashdance.cx/book s/
Hack ing Videos
===========
http://www.milw0rm.com/video/
http://www.forcehack er.com/videos.html
http://www.irongeek .com/i.php?page=secu ... llustrated
http://livesploit.com/resources.html
http://www.blackhat.com/html/bh-multime ... index.html
http://video.google.com/videosearch?hl= ... a=N&tab=wv

Wednesday, 27 August 2008

Install xvnkb

Hướng dẫn - Gõ tiếng Việt cho người mới sử dụng bằng XVNKB

Phần mềm quan trọng nhất nhì với người Việt Nam ta ấy chính là bộ gõ tiếng Việt. Không có bộ gõ tiếng Việt trên máy thì quả thật làm việc gì rồi cũng thấy… bế tắc. Gõ tiếng Việt trên Linux cũng có nhiều cách nhưng cách thông dụng và thân thuộc nhất là dùng xvnkb, một bộ gõ tiếng Việt mã nguồn mở khá có tiếng trong thế giới Chim cánh cụt. Nó hoạt động như Vietkey hay Unikey trên Windows vậy. Mình cũng đang gõ bài post này bằng xvnkb :-D .

Bộ gõ XVNKB hiện nay đã có thể thay thế bằng SCIM với những tính năng tốt hơn cài đặt dễ dàng và giao diện dễ sử dụng hơn.

1. Cài đặt trình biên dịch

Chúng ta sẽ biên dịch từ mã nguồn (đảm bảo nhất) nên sẽ cần tải xuống trình biên dịch. Cái này cũng cần cho những đồng chí lập trình viên nào nuôi ước mơ lập trình trên Linux.

Chọn menu Application > Accessories > Terminal để mở cửa sổ dòng lệnh. Sau đó gõ lệnh sau:

sudo apt-get install build-essential

Chờ cho trình cài đặt tải xuống và giải nén tất cả các gói xong là được. Tuy nhiên xvnkb khi biên dịch cũng yêu cầu phải có thêm gói xorg-dev nữa. Các bạn gõ thêm lệnh sudo apt-get install xorg-dev để cài đặt gói này.

Vậy là xong bước 1.

2. Tải xuống mã nguồn và cài đặt

Trong cửa sổ dòng lệnh gõ wget http://xvnkb.sourceforge.net/xvnkb-0.2.9a.tar.bz2 để tải xuống mã nguồn chương trình. Sau đó giải nén bằng lệnh:

tar -xvf xvnkb-0.2.9a.tar.bz2

Chuyển vào thư mục vừa giải nén và biên dịch, bạn thực hiện tuần tự những lệnh sau:

cd xvnkb-0.2.9a/

./autogen.sh

./configure --use-extstroke

Đến đây phải chỉnh file config.h một chút. Bạn gõ gedit config.h và chỉnh nội dung file thành:

#define __VK_CONFIG_H
#define VK_CHECK_SPELLING
#define VK_USE_EXTSTROKE
#define VK_NEED_UCHAR

(bỏ đi một vài dòng bị lỗi)

Sau đó gõ tiếp các lệnh sau:

make

sudo make install

Chúc mừng, bạn đã cài đặt thành công xvnkb. Bây giờ để khởi động chương trình bạn gõ xvnkb từ cửa sổ dòng lệnh là xong. Nhắp phải chuột lên hộp chương trình của xvnkb để xem menu tuỳ chọn. Nhắp trái chuột để bật tắt tuỳ chọn gõ tiếng Việt.
Nếu muốn xvnkb tự động chạy lúc khởi động, bạn vào menu System > Preferences > Sessions, chọn New và nhập vào ô Command như sau: xvnkb --method=telex --charset=utf8 (trong đó method là telex, vni hoặc viqr; charset là utf8, tcvn, viscii, vps hoặc viqr). Bây giờ xvnkb sẽ khởi động mặc định với kiểu gõ (method) và bảng mã (charset) mà bạn đã chọn.

P/s (afterlastangel):

Bạn nào thích xài XVNKB compile sẵn thì vào đây http://202.78.227.17/Public/ubuntu/pool/extras/x/xvnkb/xvnkb_0.2.9-ubuntu704_i386.deb

Nhưng XVNB vẫn còn xung đột với ổ đĩa CD của bạn vì vậy mình khuyên sử dụng SCIM để tránh xung đột.

------------
SOURCE: http://saylinux.wordpress.com/2007/04/27/cai_dat_bo_go_tieng_viet_xvnkb_cho_ubuntu/

Tuesday, 26 August 2008

How to create custom iso file

It’s rather trivial task to make some changes into already burned installation or live CD. It may be performed to add some files to this CD or edit files on it. In any case it’s impossible to loop mount .iso file and then save it as iso9660 filesystem is read-only.

So, just mount your CD or iso image to some directory by commands:

sudo mkdir /mnt/image

sudo mount /dev/cdrom /mnt/image

or

sudo mount /path/to/your.iso /mnt/image -o loop

then copy it’s contents to some directory:

mkdir /tmp/newiso

cp -r /mnt/image /tmp/newiso

After this you can modify any files in /tmp/newiso, add files, delete them. After modifications are done, create new ISO image to be burned onto CD (or kept somewhere for a rainy day):

cd /tmp/newiso

and

sudo mkisofs -o /tmp/new.iso -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -J -R -V "new iso name" .

After mkisofs is finished new ISO file will be created at /tmp directory.

-----
Source: http://www.linuxscrew.com/2007/07/31/how-to-create-custom-linux-iso-image/

Eject and close cd tray on ubuntu

eject -T /dev/cdrom

This will eject the disk tray if it is closed, and will close the tray if it's already been ejected

Friday, 22 August 2008

Installing software from source in Linux - 1.2

< Installing software from source in Linux - 1.2 >

So you've downloaded a software package with tar.gz or tar.bz2 extension and have no idea what to do with it. Or perhaps you already know that it's most likely the source code of the program you want to install and you have to compile it, but don't know how. Don't worry, compiling and installing software from source in Linux isn't as hard as it may sound!

Author: Nana Långstedt < nana.langstedt at gmail.com >
tuXfile created: 13 July 2002
Last modified: 22 September 2005

contents

* The procedure
* Step 1. Unpacking
* Step 2. Configuring
* Step 3. Building
* Step 4. Installing
* Cleaning up the mess
* Uninstalling


back to

* Linux software
* Linux help
* tuXfiles home


< The procedure >

The installation procedure for software that comes in tar.gz and tar.bz2 packages isn't always the same, but usually it's like this:

# tar xvzf package.tar.gz (or tar xvjf package.tar.bz2)
# cd package
# ./configure
# make
# make install

If you're lucky, by issuing these simple commands you unpack, configure, compile, and install the software package and you don't even have to know what you're doing. However, it's healthy to take a closer look at the installation procedure and see what these steps mean.

< Step 1. Unpacking >

Maybe you've already noticed that the package containing the source code of the program has a tar.gz or a tar.bz2 extension. This means that the package is a compressed tar archive, also known as a tarball. When making the package, the source code and the other needed files were piled together in a single tar archive, hence the tar extension. After piling them all together in the tar archive, the archive was compressed with gzip, hence the gz extension.

Some people want to compress the tar archive with bzip2 instead of gzip. In these cases the package has a tar.bz2 extension. You install these packages exactly the same way as tar.gz packages, but you use a bit different command when unpacking.

It doesn't matter where you put the tarballs you download from the internet but I suggest creating a special directory for downloaded tarballs. In this tutorial I assume you keep tarballs in a directory called dls that you've created under your home directory. However, the dls directory is just an example. You can put your downloaded tar.gz or tar.bz2 software packages into any directory you want. In this example I assume your username is me and you've downloaded a package called pkg.tar.gz into the dls directory you've created (/home/me/dls).

Ok, finally on to unpacking the tarball. After downloading the package, you unpack it with this command:

me@puter: ~/dls$ tar xvzf pkg.tar.gz

As you can see, you use the tar command with the appropriate options (xvzf) for unpacking the tarball. If you have a package with tar.bz2 extension instead, you must tell tar that this isn't a gzipped tar archive. You do so by using the j option instead of z, like this:

me@puter: ~/dls$ tar xvjf pkg.tar.bz2

What happens after unpacking, depends on the package, but in most cases a directory with the package's name is created. The newly created directory goes under the directory where you are right now. To be sure, you can give the ls command:

me@puter: ~/dls$ ls
pkg pkg.tar.gz
me@puter: ~/dls$

In our example unpacking our package pkg.tar.gz did what expected and created a directory with the package's name. Now you must cd into that newly created directory:

me@puter: ~/dls$ cd pkg
me@puter: ~/dls/pkg$

Read any documentation you find in this directory, like README or INSTALL files, before continuing!

< Step 2. Configuring >

Now, after we've changed into the package's directory (and done a little RTFM'ing), it's time to configure the package. Usually, but not always (that's why you need to check out the README and INSTALL files) it's done by running the configure script.

You run the script with this command:

me@puter: ~/dls/pkg$ ./configure

When you run the configure script, you don't actually compile anything yet. configure just checks your system and assigns values for system-dependent variables. These values are used for generating a Makefile. The Makefile in turn is used for generating the actual binary.

When you run the configure script, you'll see a bunch of weird messages scrolling on your screen. This is normal and you shouldn't worry about it. If configure finds an error, it complains about it and exits. However, if everything works like it should, configure doesn't complain about anything, exits, and shuts up.

If configure exited without errors, it's time to move on to the next step.

< Step 3. Building >

It's finally time to actually build the binary, the executable program, from the source code. This is done by running the make command:

me@puter: ~/dls/pkg$ make

Note that make needs the Makefile for building the program. Otherwise it doesn't know what to do. This is why it's so important to run the configure script successfully, or generate the Makefile some other way.

When you run make, you'll see again a bunch of strange messages filling your screen. This is also perfectly normal and nothing you should worry about. This step may take some time, depending on how big the program is and how fast your computer is. If you're doing this on an old dementic rig with a snail processor, go grab yourself some coffee. At this point I usually lose my patience completely.

If all goes as it should, your executable is finished and ready to run after make has done its job. Now, the final step is to install the program.

< Step 4. Installing >

Now it's finally time to install the program. When doing this you must be root. If you've done things as a normal user, you can become root with the su command. It'll ask you the root password and then you're ready for the final step!

me@puter: ~/dls/pkg$ su
Password:
root@puter: /home/me/dls/pkg#

Now when you're root, you can install the program with the make install command:

root@puter: /home/me/dls/pkg# make install

Again, you'll get some weird messages scrolling on the screen. After it's stopped, congrats: you've installed the software and you're ready to run it!

Because in this example we didn't change the behavior of the configure script, the program was installed in the default place. In many cases it's /usr/local/bin. If /usr/local/bin (or whatever place your program was installed in) is already in your PATH, you can just run the program by typing its name.

And one more thing: if you became root with su, you'd better get back your normal user privileges before you do something stupid. Type exit to become a normal user again:

root@puter: /home/me/dls/pkg# exit
exit
me@puter: ~/dls/pkg$

< Cleaning up the mess >

I bet you want to save some disk space. If this is the case, you'll want to get rid of some files you don't need. When you ran make it created all sorts of files that were needed during the build process but are useless now and are just taking up disk space. This is why you'll want to make clean:

me@puter: ~/dls/pkg$ make clean

However, make sure you keep your Makefile. It's needed if you later decide to uninstall the program and want to do it as painlessly as possible!

< Uninstalling >

So, you decided you didn't like the program after all? Uninstalling the programs you've compiled yourself isn't as easy as uninstalling programs you've installed with a package manager, like rpm.

If you want to uninstall the software you've compiled yourself, do the obvious: do some old-fashioned RTFM'ig. Read the documentation that came with your software package and see if it says anything about uninstalling. If it doesn't, you can start pulling your hair out.

If you didn't delete your Makefile, you may be able to remove the program by doing a make uninstall:

root@puter: /home/me/dls/pkg# make uninstall

If you see weird text scrolling on your screen (but at this point you've probably got used to weird text filling the screen? :-) that's a good sign. If make starts complaining at you, that's a bad sign. Then you'll have to remove the program files manually.

If you know where the program was installed, you'll have to manually delete the installed files or the directory where your program is. If you have no idea where all the files are, you'll have to read the Makefile and see where all the files got installed, and then delete them.

Useful links for ubuntu beginners and solutions to common problems

Common Specific Tasks

Graphic Card Drivers
List of ATI supported cards: https://wiki.ubuntu.com/HardwareSupportComponentsVideoCardsAti
ATI Drivers: http://wiki.cchtml.com/index.php/Ubuntu
Nvidia Drivers: http://doc.gwos.org/index.php/Latest_Nvidia_Edgy

Screen Resolution Problems https://help.ubuntu.com/community/FixVideoResolutionHowto

Getting Support for Restricted/Proprietary Formats (mp3, playing DVDs, windows media, quicktime, etc): https://help.ubuntu.com/community/RestrictedFormats
mp3 support in amaroK: http://strabes.wordpress.com/2007/04/01/get-mp3-support-for-amarok-in-kubuntu-linux/

NTFS with read/write support: http://ubuntuforums.org/showthread.php?t=217009

Restoring GRUB after a Windows install:
https://help.ubuntu.com/community/RecoveringUbuntuAfterInstallingWindows
http://supergrub.forjamari.linex.org/

Resizing Partitions: http://gparted.sourceforge.net/livecd.php
Beginner Questions

Installing Software:
http://cutlersoftware.com/ubuntuinstall/
http://monkeyblog.org/ubuntu/installing/
http://www.psychocats.net/ubuntu/installingsoftware

What is a Repository?: https://help.ubuntu.com/community/Repositories

Managing Repositories: https://help.ubuntu.com/community/Repositories/Ubuntu

File Permissions and Editing Files that Belong to Root: http://www.psychocats.net/ubuntu/permissions

Introduction to the Command Line http://doc.gwos.org/index.php/CommandLineBeginners

What is “sudo” ? https://help.ubuntu.com/community/RootSudo

Basic Commands: https://help.ubuntu.com/community/BasicCommands
http://www.linuxcommand.org/
Great Information Resources

Great for beginners with tons of howtos: http://www.ubuntuguide.org/

Ubuntu Community Documentation: https://help.ubuntu.com/community/

How to Help Yourself: http://www.ubuntuforums.org/showthread.php?p=812448

Thursday, 21 August 2008

Enable and disable root account on Ubuntu

Enable root:
sudo passwd root

Disable root:
sudo passwd -l root

Ubuntu: Change the default Terminal window size

The default size of the Terminal window is around 80 columns wide and 24 columns high. To alter this, edit the file /usr/share/vte/termcap/xterm. You can use the following command:

sudo gedit /usr/share/vte/termcap/xterm

Just a few lines from the top will be the line reading:

:co#80:it#8:li#24:\

Change the number right after co# to change the width. Change the number right after li# to change the height.

Access Ubuntu shares from Windows pc

1. Install samba on the ubuntu machine
sudo apt-get install samba

2. Right click on the folder to share and choose Share Options. Fill in necessary info.

3. Add samba user account to Ubuntu machine
sudo smbpasswd -a
Note: should exist on the Ubuntu machine
Enter password two times

4. On the Windows pc, type in Run: \\\ and type in username and password.

Fyodor Answers Your Network Security Questions

Fyodor Answers Your Network Security Questions
Posted by Roblimo on Fri May 30, 2003 11:40 AM
from the eating-script-kiddies-for-breakfast dept.


4) Stepping into a network security career
by Anonymous Coward

I'll be graduating this month with a shiny new BS in Computer Science. I've done plenty of Unix sysadmin work throughout college and even deployed some high-interaction honeynets. I'm very interested in network security and systems programming. Do you have any advice for people in my situation who want to head into a career in network security?

Fyodor

Congratulations on your graduation! Unfortunately (for newcomers), the security field is one that often expects substantial experience and references. This is partly because these jobs require extraordinary trust, and also because of an aversion to mistakes. Everyone makes mistakes, but they can be extraordinarily costly in security and neophytes tend to make more of them. But don't lose hope! Talented security minds are still in very high demand, just be aware that you will have to work even harder to prove yourself.

Here are my suggestions for anyone starting out in network security, whether for fun or profit:

Step 1: Learn everything you can

1. You may wish to start with reading a general overview of security, such as Practical Unix and Internet Security 3rd Edition.
2. Reading alone won't teach you much. Hands-on experience is critical, so I would set up at least a basic test network. At the very minimum you should have a Unix box or two and a Windows machine (because these are very common in the real world). You can use very cheap machines, or even emulate a large network with virtualization software such as VMWare.
3. Next you should learn more about how attacks are performed. Take a look at the excellent and free Open Source Security Testing Methodology Manual (OSSTMM). This document aims to provide a comprehensive framework for security testing. But it mostly lists tasks to perform, without specifying how to do so. You will gain a lot from this manual if you research the tasks you don't know how to complete, and if you actually try performing the tasks on your test network. If this manual is too curt or hard to follow, you could try a more verbose book on vulnerability assessment, such as Hacking Exposed 4th Edition.
4. Now that you understand many of the general security ideas, it is time to get current. This is one area that has actually become easier in the last decade. The thinking used to be that vulnerability information should only be distributed to well-known and trusted administrators and security researchers through private digests such as Zardoz. This was a disaster for many reasons, and the full disclosure movement was born. In the last couple of years things have started to shift toward more limited ("responsible") disclosure and there is also a disturbing pay-money-for-early-disclosure trend. But information is still much more available than it used to be. Most of the news is carried on mailing lists, and I archive the ones I consider the best at Lists.Insecure.Org. You must subscribe to Bugtraq, and I would also highly recommend pen-test, vuln-dev, and security-basics. Read at least the last 6-12 months of archives. Choose other lists that correspond to your interests. SecurityFocus also offers a security-jobs list which is an excellent resource for finding jobs or just understanding what employers desire.

There are two major reasons for reading Bugtraq. One is that you must react quickly to new vulnerabilities by patching your servers, notifying your clients, etc. You can get this by simply scanning the subject lines or advisory summaries for bugs that directly apply to you. But then you will miss out on another crucial purpose of Bugtraq. Actually understanding a vulnerability helps you defend against it, exploit it, and identify/prevent similar bugs in the future. When you are lucky, the advisory itself will provide full details on the bug. Check out this excellent recent advisory by Core Security Technologies. Note how they describe exactly how the Snort TCP Stream Reassembly vulnerability works in detail and even include a proof-of-concept demonstration. Unfortunately, not all advisories are so forthcoming. For bugs in Open Source software, you can understand the problem by reading the diff. The next step is to actually write and test an exploit. I would recommend writing at least one for each general class of bug (buffer overflow, format string, SQL injection, etc.) or whenever a bug is particularly interesting.

Be sure to read the latest issues of Phrack and the research papers posted to the mailing lists. Send your comments and questions to the authors and you may start interesting discussions. Read well-regarded books on the security topics that interest you most.

I can't emphasize enough that you should intersperse hands-on work with all of this reading. Install unpatched RedHat 8 (or whatever) and run Nmap and Nessus against it. Then compromise it remotely, maybe via the latest Samba hole. Start out with a prewritten exploit from Bugtraq, which isn't quite as easy as it sounds. You may have to modify the 'sploit to compile, brute force the proper offset, etc. Then break in again using a different technique, and your own exploit. Install Ethereal and/or tcpdump and ensure you understand the traffic on your network during both your exploitation and normal network activity. Install Snort on an Internet-facing machine and watch the attacks and probes you'll experience. Wander around your neighborhood with Kismet, Netstumbler, or Wellenreiter on your Laptop or PDA to look for open WAPs. Install DSniff and execute an active MITM attack on an SSH or SSL connection between two of your computers. Take a look at my Top 75 Tools List and ensure you understand what each does and when it would be useful. Try out as many as you can.
5. Take a vacation, or at least a weekend camping! You deserve it! The steps above would probably take at least 3-12 months full-time, depending on your motivation level and the depth and breadth of your research.

Step 2: Now apply your newfound knowledge

Now you have learned enough to be dangerous. At this point, you would have little trouble obtaining most certifications, after studying the specifics of each topic. If your main goal is to find a job quickly, perhaps adding these extra feathers to your cap might be worthwhile. But I think your best bet is to prove your knowledge by joining and contributing to the security community. While this does indeed help others, it isn't an entirely selfless act. It improves your skills, leads to important contacts, and demonstrates your knowledge and ability in a constructive way. The latter is important if securing a career is one of your goals. These steps should also be fun! If not, perhaps you should keep looking at other fields. Here are some ideas:

Start participating with insightful comment and answers on the mailing lists. This is very easy and serves as a great learning experience, way to meet people, and garners some name recognition. If a security manager with a stack of 60 resumes recognizes your name, that is a huge win!

When a new worm or a big new vulnerability comes out, everyone wants to know the details. If you stay up all night disassembling the worm/patch and write the first comprehensive analysis, many folks will find that valuable. And you will learn a lot. Let your first priority be quality - if someone beats you to it, just compare your results with theirs to see if you (or they) missed (or misinterpreted) anything. You can also post your own exploits, although that is more of a political hot potato.

Attending security conferences is a great way to learn, party with fellow hackers, and network (in every sense of the word). Much better is to speak at these conferences. This field changes rapidly so there are always new topics and technologies to discuss. You don't have to be a well-known expert with a long history - just learn your topic well and put in the effort for a quality presentation. You could present at Defcon, at one of the more commercial events, or at a smaller regional con like ToorCon, CodeCon, Hivercon, etc. Among other advantages (often free admission/travel/hotel), this is a great way to meet people with similar interests. I spoke at the latest CanSecWest and have submitted a proposal for the next Defcon.

Now that you've seen and understand a wide variety of software vulnerabilities from your Bugtraq research, start finding your own. You can start by downloading any PHP app from Sourceforge. Most of those are hopelessly vulnerable to Cross-Site-Scripting, SQL injection, and/or remote code execution by "remote include" directives. Many (if not most) Windows shareware daemons are also vulnerable to simple buffer overflows and format-string bugs. Notify the authors and then write an advisory. After a few of these "easy targets", try breaking some more widely deployed programs.

Write a security tool! I could list some suggestions, but by this point you will have many of your own ideas as to what is needed. Scratch an itch.

I hope this helps. If you want more suggestions, Ask Slashdot. From that story, I found this post particularly insightful, especially the emphasis on "people skills". I don't claim to have any, but understand the value :).

Install scanner on Ubuntu

Sử dụng máy scan trên Ubuntu 8.04 LTS Desktop
17:00' 19/08/2008 (GMT+7)

- Mách bạn các bước sử dụng scanner khi cài đặt và sử dụng chúng trên Ubuntu, cùng cách xử lý các scanner chưa được Ubuntu hỗ trợ.

Kiểm tra scanner

Muốn xác định scanner có được Ubuntu hỗ trợ hay chưa, bạn thực hiện theo một trong ba cách:

Cách 1. Cắm dây cáp nối thiết bị vào máy tính, thường là cổng USB. Sau đó, chạy chương trình scan trên Ubuntu có tên XSane.

Nếu màn hình chính của XSane xuất hiện mà không có thông báo lỗi, máy scan của bạn đã được Ubuntu hỗ trợ. Khi đó, bạn đến ngay phần 2 để bắt đầu sử dụng máy scan.

Ngược lại, nếu có thông báo lỗi, thường là “No devices available” thì bạn cần đến phần 3 để tiến hành các bước cài đặt driver.

Cách 2. Một cách khác, rõ ràng hơn, bạn truy cập vào địa chỉ https://wiki.ubuntu.com/HardwareSupportComponentsScanners, chọn nhà sản xuất thiết bị tương ứng như Canon, Dell, HP..., sau đó kích vào liên kết tương ứng để tìm xem thiết bị scanner của mình có thuộc vào danh sách được Ubuntu hỗ trợ sẵn hay không. Nếu có, bạn đến ngay phần 2 để bắt đầu với máy scan của mình.

Cách 3. Nếu máy scan của bạn không có trong danh sách được Ubuntu hỗ trợ, bạn truy cập vào địa chỉ www.sane-project.org/sane-backends.html để xem danh sách các máy scan được SANE (Scanner Access Now Easy) hỗ trợ. SANE là một dự án cung cấp hầu hết các driver cho thiết bị scanner trên Ubuntu.

Nếu thiết bị của bạn thuộc danh sách này, bạn cần cài đặt driver như sau:

+ Cập nhật danh sách phần mềm hệ thống: root@hdhhac-desktop:~# apt-get update

+ Cài đặt thư viện libsane-extras bằng cách sử dụng chương trình Synaptic, hoặc gõ lệnh sau:

root@hdhhac-desktop:~# apt-get install libsane-extras

Lệnh này sẽ cài đặt các driver dành cho máy scan được dự án SANE hỗ trợ.

+ Mở file /etc/sane.d/dll.conf để xem thiết bị scanner của mình đã có trong danh sách liệt kê hay chưa: root@hdhhac-desktop:~# vim /etc/sane.d/dll.conf

Nếu ngay trước dòng tương ứng với tên máy scan của mình có dấu chú thích (#), bạn cần xóa dấu này đi để kích hoạt driver tương ứng với thiết bị của mình.

+ Đến đây, bạn mở chương trình XSane và bắt đầu sử dụng máy scan với driver vừa được cài đặt.

Sử dụng máy scan

Bạn cần sử dụng phần mềm tương tác với máy scan để có được các hình ảnh như mong muốn. Trên Ubuntu, mọi người thường sử dụng XSane để phục vụ cho mục đích này. Phần mềm này sử dụng SANE-library để giao tiếp với các máy scan. Tuy có hỗ trợ camera và các thiết bị video với những tác vụ cơ bản, nhưng XSane được thiết kế với mục đích chính là dành cho máy scan.

Với XSane, bạn có thể dễ dàng sao chép các trang văn bản, sau đó lưu trữ dưới dạng hình ảnh và thực hiện các thao tác fax hoặc chuyển qua email. Bạn có thể sử dụng XSane để lưu trữ hình ảnh thu được ở dạng multi-page documents chứ không chỉ là những hình ảnh riêng biệt. Cần đến với website http://XSane.org để tham khảo đầy đủ thông tin về chương trình hỗ trợ scan hữu ích này.

Để scan một trang tài liệu, bạn tiến hành các bước như sau:

1. Đặt trang tài liệu vào trong máy scan.

2. Khởi chạy XSane bằng cách vào menu Applications -> Graphics -> XSane Image Scanner. Bạn cũng có thể bấm vào nút Scan ngay trên máy scan để thực hiện thao tác này.

3. Trên cửa sổ chính của XSane, bạn bấm nút Scan để thực hiện thao tác quét trang tài liệu của mình. Khi tiến trình scan kết thúc, bạn sẽ nhận được kết quả ngay trên cửa sổ Viewer của XSane. Tại đây, bạn lưu ảnh từ menu File -> Save image dưới một trong các định dạng như JPEG, PDF, PNG, PNM...; hoặc thực hiện một vài thao tác xử lý như thay đổi kích thước của ảnh, thay đổi chiều hiển thị của ảnh...

Wednesday, 20 August 2008

INSTALLING TRUETYPE FONTS:

INSTALLING TRUETYPE FONTS:

In Short: The simple copy and paste method of installing your fonts.

Copy the code below:

gksu nautilus /usr/share/fonts/truetype

Open the terminal:

Applications > Accessories > Terminal

Paste the code into the Terminal: Edit > Paste.

Push the Enter Key on your keyboard and then enter your password and then click OK.

Nautilus should open to the truetype folder.

Make a new folder (of the name of your choice).

How? Right click with the mouse in the truetype folder we just opened and choose Create Folder and give the folder a name.

Double click the folder to open it.

Add your fonts to the directory you made by copying them and then just pasting them into the folder…

Alert Ubuntu that you added the fonts.

Copy the code below:

sudo fc-cache -f -v

Open the terminal:

Applications > Accessories > Terminal

Paste the code into the Terminal: Edit > Paste.

Push the Enter Key on your keyboard (and then enter your password if needed).

The command above adds them into the system so they become available.

Ubuntu Global Shortcut Keys

Global shortcut keys enable you to use the keyboard to perform tasks related to your desktop, rather than tasks on the currently selected window or application. The following table lists some global shortcut keys:

Shortcut Key


Function

Alt+F1


Open the Applications Menu.

Alt+F2


Display the Run Application dialog. See the section called “Running Applications” for more information.

Print Screen


Take a screenshot of the entire desktop. See the section called “Taking Screenshots” for more information.

Alt+Print Screen


Take a screenshot of the currently focused window.

Ctrl+Alt+Arrow keys


Switch to the workspace to the specified direction of the current workspace. See the section called “Workspaces” for more information on working with multiple workspaces.

Ctrl+Alt+D


Minimize all windows and give focus to the desktop.

Alt+Tab


Switch between windows. A list of windows that you can select is displayed. Release the keys to select a window. You can press the Shift key to cycle through the windows in reverse order.

Ctrl+Alt+Tab


Switch the focus between the panels and the desktop. A list of items that you can select is displayed. Release the keys to select an item. You can press the Shift key to cycle through the items in reverse order.
Window Shortcut Keys

Window shortcut keys allow you to use the keyboard to perform tasks on the currently focused window. The following table lists some window shortcut keys:

Shortcut Key


Function

Alt+Tab


Switch between windows. A list of windows that you can select is displayed. Release the keys to select a window. You can press the Shift key to cycle through the windows in reverse order.

Alt+F4


Close the currently focused window.

Alt+F5


Unmaximize the current window, if it is maximized.

Alt+F7


Move the currently focused window. After pressing this shortcut, you can move the window using either the mouse or the arrow keys. To finish the move, click the mouse or press any key on the keyboard.

Alt+F8


Resize the currently focused window. After pressing this shortcut, you can resize the window using either the mouse or the arrow keys. To finish the resize, click the mouse or press any key on the keyboard.

Alt+F9


Minimize the current window.

Alt+F10


Maximize the current window.

Alt+spacebar


Open the window menu for the currently selected window. The window menu allows you to perform actions on the window, such as minimizing, moving between workspaces, and closing.

Shift+Ctrl+Alt+Arrow keys


Move the current window to another workspace in the specified direction. See the section called “Workspaces” for more information on working with multiple workspaces.
Application Keys

Application shortcut keys enable you to perform application tasks. You can use shortcut keys to perform application tasks more quickly than if you use a mouse. The following table lists some common application shortcut keys:

Shortcut Key


Action

Ctrl+N


Create a new document or window.

Ctrl+X


Cut the selected text or region and place it on the clipboard.

Ctrl+C


Copy the selected text or region onto the clipboard.

Ctrl+V


Paste the contents of the clipboard.

Ctrl+Z


Undo the last action.

Ctrl+S


Save the current document to disk.

F1


Load the online help document for the application.

In addition to these shortcut keys, all applications support a set of keys to navigate and work with the user interface. These keys allow you to perform operations that you might normally perform with a mouse. The following table describes some interface control keys:

Keys


Action

Arrow keys or Tab


Move between controls in the interface or items in a list.

Enter or spacebar


Activate or choose the selected item.

F10


Activate the left-most menu of the application window.

Shift+F10


Activate the context menu for the selected item.

Esc


Close a menu without selecting a menu item, or cancel a drag operation.

Gnome or KDE is screwey; how do I reset my Gnome or KDE configuration?

The Gnome and KDE desktop environments can get into such a state that they either won't start or start more-or-less uselessly. Or you may just have configured a miserable combination of fonts, colours and desktop images and want to start afresh. In either case, it's simply a matter of logging out, renaming the configuration folder(s) and starting the desktop again.

Note that when you reset your configuration, you will lose all customizations made under those environments. For example: resetting your KDE configuration will reset your Konqueror bookmarks and cache, your Kmail settings, and your desktop wallpaper; resetting Gnome will result in your losing your theme settings, your Epiphany bookmarks, and your Nautilus settings. You can restore some of these settings by copying in specific files and folders from the backups made with the commands below.
KDE

All KDE settings are in a single folder in your home directory: .kde. Simply rename the folder:

1. logout
2. press Alt-Ctrl-F1 to switch to a console login
3. login
4. rename the .kde folder to .kde.date_and_time:
cd ~
mv .kde .kde.`date +%Y%m%d.%H%M`
exit
5. press Alt-Ctrl-F7 and login

You will now have no .kde folder so KDE will start afresh when you next login; your old settings are in .kde.date_and_time.
Gnome

1. logout
2. press Alt-Ctrl-F1 to switch to a console login
3. login
4. rename the Gnome folders to folder_name.date_and_time:
cd ~
tcsh
foreach d (.gnome .gnome2 .gconf .gconf2 .gnome-private .gnome2-private)
set dt=`date +%Y%m%d.%H%M`
mv $d $d.$dt
end
exit
5. press Alt-Ctrl-F7 and login

You will now have no Gnome folders so Gnome will start afresh when you next login; your old settings are scattered in the various .g* folders; frankly, I'm note sure which are where. But you may well find that you can save some of your settings by doing the following:

1. do steps 1 to 5 above
2. logout
3. press Alt-Ctrl-F1 to switch to a console login
4. login
5. replace the new .gconf folder with your original one:
cd ~
mv .gconf .gconf.fresh
\cp -pr .gconf.date_and_time to .gconf
exit
6. press Alt-Ctrl-F7 and login

install vmware server on ubuntu

http://www.howtoforge.com/installing-vmware-server-on-ubuntu-8.04

Tuesday, 19 August 2008

Tips for new Ubuntu user

Ubuntu has become the most popular Linux distribution for new Linux users. It's easy to install, easy to use, and usually "just works." But moving to a different operating system can be confusing, no matter how well-designed it is.

Here's a list of tips that might save you some time while you're getting used to Ubuntu.

1. Getting multimedia to work

The default Ubuntu install contains free software only, which means that it doesn't support some popular multimedia formats straight out of the box. This is inconvenient, but the Ubuntu folks have good reasons for not shipping with support for MP3, DVDs, and so forth -- including that software could cause them some legal headaches, or incur some serious fees.

Fortunately, as a user, you don't need to worry about fees (though some of the packages may not be legal due to patent restrictions or restrictions on circumventing copy protection, depending on where you live). The Ubuntu wiki has a page on restricted formats that explains how to get the packages you need. However, if you run Ubuntu on AMD64 or PowerPC hardware, you'll still be out in the cold for some of the packages, since some multimedia formats depend on proprietary software that's not available for those hardware platforms.

2. Changing the defaults

Ubuntu comes with a number of defaults that may or may not be to your liking. For example, the default editor is set to Nano, which isn't optimal if you're used to Vim.

The easy way to change this is to use the update-alternatives program, which maintains the symbolic links under /etc/alternatives that determine the default programs for FTP, system editor, rsh, Telnet, window manager, and so forth. Look under the /etc/alternatives directory to see what programs are managed.

To change the default editor, run sudo update-alternatives --config editor. You'll see a dialog like this:

There are 3 alternatives which provide `editor'.

Selection Alternative

-----------------------------------------------

1 /usr/bin/vim

2 /bin/ed

*+ 3 /bin/nano

Press enter to keep the default[*], or type selection number:

Just type 1 to switch to Vim. Note that on my system, I don't have Emacs or many other editors installed; if I did, the utility would offer the other editors as choices.

games_final_batlle.jpg

3. How to install packages

Most of the application software you'll want to add to your system will be available through the Ubuntu repositories using Synaptic, Adept, or another package management tool. What if you want to install something like Opera that is available as a package for Ubuntu, but isn't in the repositories?

In that case, download the application's Debian package (.deb) and right-click on the file. At the top of the context menu, you should see an option to open the package with the GDebi package installer. GDebi will provide a description of the package, what files are included, and other details about the package. The package installer also has a Install Package button; just click that and it will install the package. Note that the package installer also checks to verify whether it can install the package -- if it has dependencies that can't be satisfied, GDebi will give an error and refuse to install it.

If you prefer to install packages at the command line, just use sudo dpkg -i packagename.deb.

4. Sudo and gksudo

If you've used Linux for any amount of time, you might be used to running programs as root directly whenever you need to install packages, modify your system's configuration, and so on. Ubuntu employs a different model, however. The Ubuntu installer doesn't set up a root user -- a root account still exists, but it's set with a random password. Users are meant to do administration tasks using sudo and gksudo.

You probably already know how to use sudo -- just run sudo commandname . But what about running GUI apps that you want to run as root (or another user)? Simple -- use gksudo instead of sudo. For instance, if you'd like to run Ethereal as root, just pop open a run dialog box (Alt-F2) and use gksudo ethereal.

By the way, if you really must do work as root, you can use sudo su -, which will log you in as root. If you really, really want to have a root password that you know, so that you can log in as root directly (i.e., without using sudo), then run passwd when logged in as root, and set the password to whatever you want. I'd recommend using the pwgen package to create a secure password not only for root but for all your user accounts.

5. Add users to sudo

When you set up Ubuntu, it automatically adds the first user to the sudo group, allowing that user to make changes as the super user (root) by typing in their password. However, it doesn't automatically add additional users to the sudo group. If you want to give someone else superuser privileges on your shared system, you'll have to give them sudo access.

To add new users to sudo, the easiest way is to use the usermod command. Run sudo usermod -G admin username . That's all there is to it. However, if the user is already a member of other groups, you'll want to add the -a option, like so: sudo usermod -a -G admin username .

If you prefer the GUI way of doing things, go to System -> Administration -> Users and Groups. Select the user you want to add to sudo, and click Properties. Under the User privileges tab, check the box that says "Executing system administration tasks" and you'll be all set.

6. Adding a new desktop

Many users aren't sure what packages to add in order to run KDE or Xfce window managers on a stock Ubuntu system -- or what packages to add to run GNOME on Kubuntu or Xubuntu. You could add all of the necessary packages one at a time, but there's a much easier way to go about it.

To install all of the packages that come with one of the flavors of Ubuntu, such as Kubuntu, run apt-get install kubuntu-desktop (or edubuntu-desktop, xubuntu-desktop, or xubuntu-desktop).

If the GUI is more your style, the *desktop packages can be installed using Adept, Synaptic, or another package manager

7. How to reconfigure X.org

Most of the time, X.org -- that's the software that drives your video card and provides the foundation for the GUI, whether you're running GNOME, KDE, Xfce, or another window manager -- "just works" when you install Ubuntu. In fact, I'd wager that most Ubuntu users never even have to think about their video settings.

But, sometimes you need to reconfigure X.org because Ubuntu hasn't detected your video card and monitor properly, or maybe you've just purchased a shiny new video card and need to get it working with Ubuntu. Whatever the reason, it's good to know how to reconfigure X without having to edit your /etc/X11/xorg.conf by hand.

To run through the configuration, use dpkg-reconfigure xserver-xorg at the console or in a terminal window. Then you'll have a chance to specify your monitor and video card, the resolutions and color depths you want to run the server at, and so forth.

Since every setup is different, it's hard to give concrete advice for configuring X, but it's generally OK to accept the configuration defaults. Also, you'll be given a choice between Advanced, Medium, and Simple methods for giving your monitor's specifications. As a rule, it's probably best to go with Simple unless you really know what you're doing, or the Simple method doesn't work for you.

8. Log in automagically

By default, when you boot up the computer, Ubuntu will give you a login screen before you get to your X session. From a security perspective, this is a good idea, particularly in multi-user environments or in any situation where other people have physical access to your computer. Still, many users are used to just being logged in automatically, and don't want to fuss with logging in each time they reboot their desktop.

To set this in Ubuntu, go to System -> Administration -> Login Window. You'll need to provide your password, then you'll get the Login Window Preferences window with five tabs. Choose the Security tab and click Enable Automatic Login. If you have more than one regular user, make sure to specify which user should be logged in automatically.

Again, and I can't stress this enough, this is only a good idea for home computers where only one person has access to the computer. I don't recommend this for work computers or laptop/notebook computers, when someone else might have access to the machine.

9. Compiling from source

Ubuntu's package repository is huge, particularly when you factor in packages in the Universe and Multiverse repositories. However, many users find themselves needing to install packages from source, either because they want to use a newer package than is available in the repository, or they want to try something that's not in the Ubuntu repository at all.

If you want to install packages from source, you can use a few shortcuts to make life easier. First, you'll probably want to get the build-essential meta-package if you haven't installed any developer tools. Run sudo apt-get install build-essential; it will grab GCC, the Linux kernel headers, GNU Make, and some other packages that you'll probably need.

Next, if you're going to compile a package such as Gaim because a new version is out, you might be able to satisfy the new version's dependencies with the old version's dependencies. To do this, grab the package's build dependencies with sudo apt-get build-dep packagename . That will grab all of the development packages you need to build the package that's currently available in Ubuntu, and will probably satisfy dependencies for the new version you're compiling.

Finally, don't make install when you compile from source -- use CheckInstall instead. CheckInstall will create a Debian package and install it for you, so you can remove or upgrade the software more easily later on.

Grab CheckInstall with apt-get install checkinstall. After you've run ./configure ; make, just run sudo checkinstall and answer a few simple questions. Note that if you compile packages on AMD64, CheckInstall will select X86_64 as the architecture rather than amd64 -- which will cause the package install to fail, since Ubuntu expects amd64 as the architecture rather than X86_64.

By the way, the packages created by CheckInstall also make it easier to deploy the same package on several machines, if you happen to have several systems running Ubuntu. See Joe Barr's excellent CLI Magic feature on CheckInstall too.

10. A new kernel

Ubuntu will install a 386 kernel for x86 machines, which probably isn't what you'd want if you've got a Pentium II or better CPU. The 386 kernel is compiled to work with just about any x86 CPU, but extensions that appear in later CPUs can give your system a boost, if they're taken advantage of. To replace the kernel, open Synaptic or Adept and search for linux-image. You'll see several choices. Pick the one that best suits your CPU -- probably the linux-image-686 package for Pentium II and later CPUs, and linux-image-k7 for later AMD processors. Note that if you're using the AMD64 line (or Intel's x86-64 CPUs) you should be using the amd64 images.

Of course, once you install the new kernel, you'll need to reboot. Another benefit to the 686 kernels is that they have SMP support, which is a bonus for multi-core and Intel HyperThread CPUs.

If none of the tips cover questions that you have about Ubuntu, try checking out the Ubuntu wiki, forums, and mailing lists. As a rule, the Ubuntu users are a helpful lot, and you'll usually be able to find someone who's run into the same situation that you have questions about.

Now you have to add additional repositories , close synaptic package manager and type the following command in the terminal window (Application -> Accessories -> Terminal )

¨wget -q http://packages.medibuntu.org/medibuntu-key.gpg -O- | sudo apt-key add - ¨

and

¨sudo wget http://medibuntu.sos-sts.com/sources.list.d/feisty.list -O /etc/apt/sources.list.d/medibuntu.list

---------
SOURCE: http://ubuntuland.nireblog.com/post/2008/03/27/ten-tips-for-new-ubuntu-users

Adding the Medibuntu repos

Add Medibuntu to your sources.list, as well as its GPG key to your keyring. Make sure to use the correct sources.list that corresponds to your current distribution.

*

Ubuntu 8.04 "Hardy Heron":

sudo wget http://www.medibuntu.org/sources.list.d/hardy.list -O /etc/apt/sources.list.d/medibuntu.list

*

Ubuntu 7.10 "Gutsy Gibbon":

sudo wget http://www.medibuntu.org/sources.list.d/gutsy.list -O /etc/apt/sources.list.d/medibuntu.list

*

Ubuntu 7.04 "Feisty Fawn":

sudo wget http://www.medibuntu.org/sources.list.d/feisty.list -O /etc/apt/sources.list.d/medibuntu.list

*

Ubuntu 6.10 "Edgy Eft":

sudo wget http://www.medibuntu.org/sources.list.d/edgy.list -O /etc/apt/sources.list.d/medibuntu.list

*

Ubuntu 6.06 "Dapper Drake":

sudo wget http://www.medibuntu.org/sources.list.d/dapper.list -O /etc/apt/sources.list.d/medibuntu.list

Then, add the GPG Key:

sudo apt-get update && sudo apt-get install medibuntu-keyring && sudo apt-get update

VMware Server On Ubuntu 8.04 Mini-Howto

When upgrading from Ubuntu 7.10 to 8.04 my VMware server stopped working, this what I had to do to get it up and running:

Needed if upgrading VMware installation:

sudo ./vmware-install.pl

VMware wont compile with the new kernel, use this patch:

wget http://vmkernelnewbies.googlegroups.com/web/vmware-any-any-update-116.tgz
tar -zxf vmware-any-any-update-116.tgz
cd vmware-any-any-update-116

Apply the patch:

sudo ./runme.pl
sudo vmware-config.pl

VMware console wont run without this:

cp /lib/libgcc_s.so.1 /usr/lib/vmware/lib/libgcc_s.so.1/libgcc_s.so.1

You might need gcc3.4 as well.

-----
SOURCE: http://www.howtoforge.com/vmware-server-on-ubuntu8.04

Monday, 18 August 2008

How to join Ubuntu/Samba to a Windows 2003 Active Directory domain

How to join Ubuntu/Samba to a Windows 2003 Active Directory domain

Ingredients:

*
A Windows network with an Active Directory server (like Windows Server 2003)
*
Ubuntu Linux 5.10 installed
*
TCP/IP setup properly (the Linux machine taking its address by DHCP from the Windows server)
*
No firewall yet on the Linux machine! First get it working, then secure it.

More info:

*
http://us1.samba.org/samba/docs/man/Samba-HOWTO-Collection/domain-member.html
*
http://justlinux.com/forum/archive/index.php/t-118512.html

1. Installing

We assume that Ubuntu Linux has been installed.

Install the following packages with the Synaptic Package Manager. You may need to specify “universe” as an extra source for packages.

*
Samba (version 3):
o
samba
o
samba-common (installed by default)
o
smbclient (installed by default)
o
winbind
*
Kerberos:
o
krb5-config
o
krb5-user
*
... and any packages that might be needed to meet dependencies.

2. Edit configuration files

Edit the following configuration files. We assume the following:

*
The local DNS domain is mycompany.local
*
The Windows 2003 server is obelix.mycompany.local

/etc/samba/smb.conf

[global]
security = ADS
realm = MYCOMPANY.LOCAL
workgroup = mycompany
password server = obelix.mycompany.local
wins support = no
wins server = 10.0.20.202
invalid users = root
# Winbind settings
idmap uid = 10000-20000
idmap gid = 10000-20000
# For testing
debuglevel = 2

# A shared folder for testing purposes
[SharedFolder]
path = /home/onno2/Shared_Folder
available = yes
public = yes
writable = yes
force create mode = 0666
force directory mode = 0777

Make sure the path (/home/onno2/Shared_Folder or whatever you choose) exists and that the rights are set properly (chmod 777 or something similar)
/etc/krb5.conf

[libdefaults]
default_realm = MYCOMPANY.LOCAL
krb4_config = /etc/krb.conf
krb4_realms = /etc/krb.realms
kdc_timesync = 1
ccache_type = 4
forwardable = true
proxiable = true
# The following libdefaults parameters are only for Heimdal Kerberos.
v4_instance_resolve = false
v4_name_convert = {
host = {
rcmd = host
ftp = ftp
}
plain = {
something = something-else
}
}
[realms]
MYCOMPANY.LOCAL = {
kdc = obelix.mycompany.local
admin_server = obelix.mycompany.local
}
[domain_realm]
.mycompany.local = OBELIX.MYCOMPANY.LOCAL
mycompany.local = OBELIX.MYCOMPANY.LOCAL
[login]
krb4_convert = true
krb4_get_tickets = true

/etc/nsswitch

The only change here was adding winbind twice.

# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.
passwd: compat winbind
group: compat winbind
shadow: compat
hosts: files dns
networks: files
protocols: db files
services: db files
ethers: db files
rpc: db files
netgroup: nis

3. Start or restart services

/etc/init.d/samba restart
/etc/init.d/winbind restart
4. Join domain

net ads join -U administrator If this doesn’t work, check the logs in Linux (/var/log/samba/*) and Windows.
5. Test your setup

testparm to check if your smb.conf has a correct syntax.
kinit onno@MYCOMPANY.LOCAL test if kerberos works properly.
wbinfo -u should give a list of users.
wbinfo -g should g