Wednesday, September 24, 2008

configure VNC to disaply x:0 on Fedora Core 9

i had to enable VNC x:0 on my box at home...

this is how i did it...

Don't forget to create a backup for every file that you edit/change...


i have edited "xorg.conf"

Section "Screen"
Identifier "Screen0"
Device "Videocard0"
DefaultDepth 24
SubSection "Display"
Viewport 0 0
Depth 24
EndSubSection
Option "SecurityTypes" "VncAuth"
Option "UserPasswdVerifier" "VncAuth"
Option "PasswordFile" "/home/Yaniv/.vnc/passwd"

EndSection
I have added the 3 last Options:

Option "SecurityTypes" "VncAuth"
Option "UserPasswdVerifier" "VncAuth"
Option "PasswordFile" "/home/Yaniv/.vnc/passwd"


i had to change the PasswordFile path to my password file...


also i had to create a new section

Section "Module"
Load "vnc"
EndSection



i did a reboot and every thing worked...

the result is i can VNC to my box and every thing i do can be seen on the monitor
this is called display 0

good luck
Yaniv Ferszt

Tuesday, September 23, 2008

enable public_html and use .htaccess and .htpasswd for security

so after installing at home the FC9 box i configured the "httpd.conf" to enable access to
"public_html" directory's and support for ".htaccess" and ".htpasswd" files.

this is how i did it... there are many other ways to configure it... this is my solution :-)

NOTE: create a backup for every file BEFORE YOU EDIT OR CHANGE IT.

enable "public_html"

edit httpd.conf
you have to enable "UserDir public_html "so search it and uncomment it.
also you MUST remove the "UserDir disable" line above (search it).

verify that "LoadModule userdir_module modules/mod_userdir.so" is enabled...
uncomment it if you have to...

in order that apache can access your home dir you have to grant it permissions to do so
this is ls -ld on my home dir.

"drwx-----x 48 Yaniv Yaniv 4096 2008-09-22 21:04 Yaniv"

you have to grant others execute permissions... so use
"chmod 701 your_home_dir" to grand others read on the folder.

create the "public_html" folder inside your home dir.
it must be with 755 permissions.
"drwxr-xr-x 2 Yaniv Yaniv 4096 2008-09-22 16:14 public_html/"

restart apache and thats it.
"/etc/init.d/httpd restart"


.htaccess and .htpasswd
ok lets configure user name and password authentication for "public_html" or every other folder inside it.


edit httpd.conf and search for:
# First, we configure the "default" to be a very restrictive set of
# features.

right below it should be some ""
change it to look like this:


Options Indexes FollowSymLinks
AllowOverride All
NOT REQUIRED (i think so) i have enabled it...
Indexes = it will enable the users that is accessing your_url.com/~user_name/ to see the content...
FollowSymLinks = enables you to create links and they are working...

REQUIRED

AllowOverride All = can be changed to be more specific settings... i have used All

save the changes... and restart apache.

now lets cd to your "public_html" folder

create file named ".htaccess" the dot is a MUST
edit the file (i use vi) and place this inside:
AuthUserFile /your_home_directory/public_html/.htpasswd
AuthName "Title for Protected Site"
AuthType Basic
Require valid-user


AuthUserFile = change the path to your home dir path with /.htpasswd that we will create soon :-)
AuthName = place some tilte there... Welcome to my site... bla bla
AuthType Basic = leave it
Require valid-user = leave it

save the changes and close the file.

now use the htpasswd command to create the ".htpasswd" file.

htpasswd -c .htpasswd your_name

this will create the ".htpasswd" file with your name and your password
the password is encrypted inside the .htpasswd file... :-)

to create more users... lets say you would like to give a friend access to this folder with his own credentials
just cd to the folder where the ".htpasswd" is we just created and use:
htpasswd .htpasswd his_name

and thats it.

now change the permissions for both files
".htaccess"
".htpasswd"
to "644"

it should look like this:
-rw-r--r-- 1 Yaniv Yaniv 103 2008-09-22 16:11 .htaccess
-rw-r--r-- 1 Yaniv Yaniv 58 2008-09-22 20:47 .htpasswd


it should work now...

good luck
Yaniv Ferszt






Tuesday, September 9, 2008

Installing the vx 6000 webcam on Fedora core 9

After google-ing and reading i got my MS webcam vx-6000 working on Fedoracore9

I found the solution that worked for me here
quick installation guide:


  • yum install git kernel-devel gcc

From a command-line prompt, cd to a directory where you want to download it, then run the command:
  • git clone http://repo.or.cz/r/microdia.git
This will create a folder named "microdia" which contains all the source code.
  • cd microdia
also i found out that you have to edit macrodia.h before compiling... read more here
  • vi microdia.h
i had to change 2 values...
modify the Vendor Id with the code of Microsoft 045E and
the Product Id of the model 624F with 00F4.
it has to look like this DO NOT COPY PASTE:

#define USB_0C45_VID 0x045e /** Vendor ID of MICRODIA

#define USB_624F_PID 0x00f4 SN9C201 + OV9650


Attention: Do _NOT_ under any circumstances use "$ sudo make".
There are no root privileges necessary at this point and
using them causes a never ending chain of different problems lateron.

  • make

Troubleshooting MAKE errors look here
or
http://groups.google.com/group/microdia/web/testing-microdia-driver-draft
you should find some answers almost at the bottom...


I used "cheese" to test my web cam... you can find it with yum...
  • yum search cheese

if every thing worked for you... you would like the microdia.ko to get loaded at boot right?

here we go:

  • strip -g microdia.ko
  • sudo cp microdia.ko /lib/modules/`uname -r`/kernel/drivers/media/video/usbvideo/
  • sudo depmod -a
also i had this error and i solved it with this:
http://groups.google.com/group/microdia/web/testing-microdia-driver-draft

Troubleshooting insmod errors

# insmod microdia.ko
insmod: error inserting 'microdia.ko': -1 Unknown symbol in module

See the output of #dmesg

the last few lines would be complaints about missing symbols, depending upon whats missing

you may not have loaded the modules that module depends on,
So it failed with those error messages. You would need to modprobe for that module's dependencies

Try

$ sudo modprobe videodev

$ sudo modprobe compat-ioctl32

then

$ sudo insmod microdia.ko

good luck :-)
Yaniv Ferszt

Thursday, July 10, 2008

T r u e C r y p t open-source disk encryption

If you ever need to encrypt files or partitions and you like open source.
You have to try TrueCrypt or http://www.truecrypt.org/
personally i have allot of information on my disk-on-key and laptop.
as you know portable devices can get stolen or lost...
this is a good solution to protect your digital information.

This little software is amazing.

you can create encrypted folders on your disk-on-key / HDD /etc

Main Features:



Main TrueCrypt Window



TrueCrypt Volume Creation Wizard – encryption algorithms

Tuesday, June 10, 2008

CoreConfigurator - Windows Server Core

Here is a very good tool created by Guy Teverovsky
Guy's Blog or http://blogs.microsoft.co.il/blogs/guyt/

please visit Guy's blog for the latest release...

this tool will help you configure Basic (and much more) features on Windows Server Core

Features available in the current release:

  • Product Activation
  • Configuration of display resolution
  • Clock and time zone configuration
  • Remote Desktop configuration
  • Management of local user accounts (creation, deletion, group membership, passwords)
  • Firewall configuration
  • WinRM configuration
  • IP configuration
  • Computer name and domain/workgroup membership
  • Installation of Server Core features/roles

After installing CoreConfigurator (supplied as MSI package), navigate to the folder where it has been installed and execute CoreConfigurator.exe





Thanks Guy for this tool



Thursday, June 5, 2008

send sms via command line




so easy :-) and so useful





what i used:
OS: xp-pro-sp3
Nokia e65
Nokia USB cable
Nokia pc suite
Microsoft sms sender get it here or http://www.microsoft.com/globaldev/outreach/dnloads/smsSender.mspx

installation:
  1. Install Nokia pc suit
  2. Connect the Cell Phone
  3. Install Microsoft sms sender
  4. Done
i had to use the Microsoft sms sender GUI one time and than i could use the command line.

the command line syntax is also very easy:
smssender.exe /p:123456789 /m:"hello there"

explanation
/p: = cell number
/m: = your sms message... i use quotes " " or else i only get the first word...

thanks to Microsoft for writing this little tool :-)

next step is to use telnet from my Nagios server and send sms alerts ;-)

Wednesday, June 4, 2008

Nagios service and network monitoring




Nagios home page


I installed Nagios on a VM (virtual machine) and started to add host's and routers/switches to monitor.

i am very surprised how easy to use and strong this software is.

here is an example how to monitor with SNMP a cisco 3750 uptime

i assume you have read the Nagios Doc's and know where to find the files i talk about...
if not i will update this post with more details @ a later time...


at the define service section:

define service{
use generic-service ; Inherit values from a template
host_name cisco_backbone
service_description UpTime is
check_command check_snmp!-C public -o sysUpTime.0 -P 2c
}


also you can test from the libexec directory this command to see if you get the output
you expected:

./check_snmp -H 192.168.10.253 -o sysUpTime.0


SNMP OK - Timeticks: (300635204) 34 days, 19:05:52.04 | DISMAN-EVENT-MIB::sysUpTimeInstance=Timeticks: (300635204) 34 days, 19:05:52.04


thats it for the moment :-)


Sunday, June 1, 2008

My new Gaming system


After reading and searching month in forums and checking reviews...
i have decided to NOT WAIT FOR NEHALIM :-)
and no i will not get a 9xxx graphic card... they have the same GPU like the 88xx series...


i got this hardware for my gaming system

CPU: Intel E8500
Motherboard: Gigabyte EP35C-DS3R
RAM: Corsair DHX 2x2GB TwinX DDR2 800MHz CL5 (twin2X4096-6400C5DHX)
video card: eVGA 8800GT 512MB GDDR3 DX10 HDTV 2xDVI PCI-E
Power supply: Enermax Noisetaker II EG701AX-VE 600W Dual Fan
Hard Drive: Seagate 500GB 7200RPM, 32MB, SATA II


after running COD4 / CRYSIS / Assassin's Creed / etc

i can say it was worth every cent :-)

Sysinternals tools available via web

The Sysinternals team enabled access via web for all tools they have...
no need to download and extract :-)

http://live.sysinternals.com/Tools/

Introduction

Hello

my name is Yaniv and i work as system administrator.

i support Linux (Redhat based) systems and Windows.

i am over 7 years in the IT Business now...

i will start to blog about things i do...

njoy reading :-)