Tag Archives: windows

solaris 10 and vnc

Boost Your Adsense And Affiliate Commissions By Building 10s, 100s or 1,000s of Websites,
Each With The Click of a Button!

VNC is a server client method of connecting to a remote server,
the great thing about vnc is that you can see the remote server desktop, and work on it with a mouse just like its your local desktop.
another good thing about vnc is that its free for use for many distros.

There are main 2 major software companies that supply free vnc server and vnc cllient,
the first is realvnc and the second is tightvnc , from the tighvnc site:

TightVNC is a free remote control software package. With TightVNC, you can see the desktop of a remote machine and control it with your local mouse and keyboard, just like you would do it sitting in the front of that computer. TightVNC is:

  • free for both personal and commercial usage, with full source code available (GPL-licensed);
  • useful in remote administration, remote customer support, education, and for many other purposes;
  • cross-platform, available for Windows and Unix, compatible with other VNC software.

So these are 2 options for you to download a good free vnc viewer.

Solaris VNCserver configuration

and I say only viewer because now the Solaris 10 build 5 comes with the vncserver alredy inside.
all you need to do is to configure it.

This page on the SUN site will give you the detailed explanation on how to do things and what security patch you need to install fisrt ,but the instructions can be summed up in 4 lines:

mkdir -p /etc/dt/config

cp /usr/dt/config/Xservers    /etc/dt/config/Xservers

edit this file “/etc/dt/config/Xservers” and add these lines at the end:

:1  Local local_uid@none root /usr/X11/bin/Xvnc :1 -nobanner -AlwaysShared -SecurityTypes None -geometry 1024x768x24 -depth 24
:2  Local local_uid@none root /usr/X11/bin/Xvnc :2 -nobanner -AlwaysShared -SecurityTypes None -geometry 1024x768x24 -depth 24
:3  Local local_uid@none root /usr/X11/bin/Xvnc :3 -nobanner -AlwaysShared -SecurityTypes None -geometry 1024x768x24 -depth 24
And reboot the server.

The lines with the :1 :2 etc at the beginning, are the virtual displays you wish to server to have available for connections, you can add more by changing the numbers to :4 :5 etc.

when connecting to the server with the vnc viewer you need to express to which virtual display you want to connect by adding it to end of the server’s name or ip:

10.10.10.1:3

If you want to connect to virtual display number 3.

A security note – this configuration will allow passwordless access to the vnc screen – if someone logs in and leaves it open – the next user can just enter without a login.

A safer configuration is to require a password by using the -SecurityTypes VncAuth parameter. The Xvnc(1) man page describes password requirements.

VNC and Security

The vnc as a general is clear text, for a more secure connection there is a method of tunneling the vnc through a ssh session.
2 nice tutorials for vnc through ssh can be found here and here.
the second tutorial is using putty for the ssh connection – putty is another great freeware,
its a free ssh client for windows to connect to ssh servers.

If the server you wish to connect to through vnc is located withing your lan,
and you are relaxed about security for the users on it – if its a training server etc ,
you can just setup the vncserver without any safeguards,
but if you are connecting through an unsecured medium (AKA the internet)
you better add the ssh layer to it.

Boost Your Adsense And Affiliate Commissions By Building 10s, 100s or 1,000s of Websites,
Each With The Click of a Button!

Technorati Tags: , , , ,

Apache Active Directory Authentication

Apache server is a strong web server that can serve great open source application like Mediawiki which is a great solution for information sharing,
but what if you want to use Mediawiki to share information only for the local office active directory domain members?
Or even only to members of a specific group in the active directory?

In Apache you have a specific module called mod_ldap which allows you to use the Active Directory as an authentication server for your users,
so you can create a secure wiki branch for each department users.

To setup the apache server to use Active Directory as access manager you will need to make sure the mod_ldap was compiled with the apache server and that these lines are in the httpd.conf file:

LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
LoadModule ldap_module modules/mod_ldap.so

If you have a Windows server installed with the xampp install of apache and mysql, you will have the module pre-compiled into the apache server,
however testing that it’s loaded can be done with:

C:\xampp\apache\bin\httpd.exe -t -D DUMP_MODULES
the output should have these lines:
authnz_ldap_module (shared)
ldap_module (shared)

Once you have the mod_ldap modules loaded you can add to the apache configuration file the user authentication support:

Any Authenticated user from the Domain:

<Location /Finance_Wiki>
Require valid-user
AuthType Basic
AuthName “Finance Wiki Access”
AuthBasicProvider “ldap”
AuthLDAPBindDN “CN=proxy_user,OU=sub_group,OU=main_group,DC=some,DC=domain,DC=com”
AuthLDAPBindPassword “proxy_user_pass”
AuthLDAPURL “ldap://pdc.some.domain.com:389/OU=main_group,DC=some,DC=domain,DC=com?sAMAccountName?sub?(objectClass=*)”
</Location>

The AuthLDAPBindDN and AuthLDAPBindPassword settings are for setting a user that will allow the apache server to browse the Active Directory structure,
the user created for this should have the minimum rights possible in the domain.

This specific apache configuration will allow any user from the domain to share the /Finance_Wiki folder, but if you want to allow access for a specific group you need to add this configuration line:

require ldap-group CN=groupname,OU=group.container,OU=main_group,DC=some,DC=domain,DC=com

This is the part that will require the active directory authentication for a specific group.

This way you can prepare a wiki branch for each group in your company to securely share internal files.

Technorati Tags: , , , , ,

Test http server from windows command line

curl for windows

So you went ahead and did a little change to your web site, or web server redirect,
and you want to test it out without a sniffer,
the fastest way to test the http server headers and output is from the command line so you can see exactly what the servers is sending.

Now from Linux you have built in tools like GET, and wget ad curl,
wget and curl you can also install on windows to work from the command line.

Curl For Windows

Go ahead and download curl from their main website, you should get the Win32 – General version,
or the Win64 binary.
Better take the SSL enabled version if you will ever need to test SSL.
Take the curl.exe file from the zip file and place it somewhere in your windows PATH.

To find which directories are already in the windows path open the command line and write:

C:\>echo %PATH%

You will get the listing for such directories, just place the curl.exe in one of them.

Now for the tests:
To get only the headers and not the file contents itself use “curl -I http://address”

C:\>curl -I http://some.site.com/blocked_folder/blocked.php
HTTP/1.0 403 Forbidden
Server: Apache
Accept-Ranges: bytes
Content-Type: text/html
Expires: Tue, 27 Oct 2009 19:32:38 GMT
Cache-Control: max-age=0, no-cache, no-store
Pragma: no-cache
Date: Tue, 27 Oct 2009 19:32:38 GMT
Connection: keep-alive

From this test you can see the file is forbidden, what are the caching setings for the server, and other headers information.

If you would like to see the full page contents just remove the “-I”.

another sample:

C:\>curl -I http://www.cisco.com/
HTTP/1.1 200 OK
Date: Tue, 27 Oct 2009 19:36:28 GMT
Server: Apache/2.2
Set-Cookie: CP_GUTC=62.214.121.218.123463458258569; path=/; expires=Sat, 21-Oct-34 19:36:28 GMT; domain=.cisco.com
Last-Modified: Tue, 27 Oct 2009 16:34:14 GMT
ETag: “5985”
Accept-Ranges: bytes
Content-Length: 22917
CDCHOST: cdcxweb-prod1-02
Content-Type: text/html

this time we got a 200 reply which means the apache sent us the page,
we can see the page’s size from the “Content-Length” header,
and the other info the apache wants to send us.

Testing for Virtual hosts

Virtual hosting on apache can mean having more domain names on the same IP,
and you can test each of these domains by adding a “Host” header to the curl test line:

curl -H “Host: sub1.host.com” http://www.hosting.com/
curl -H “Host: sub2.host.com” http://www.hosting.com/

These 2 lines will bring back the html code for each of the different virtual hosts on the same server.

Here are some more ideas of using curl -for example:
Sending POST data through curl

Technorati Tags: , , ,

Solution for Windows 7 samba connection problem

samba_linux

A fresh install of windows 7 might have a problem with samba shares,

if you setup samba logging you will see errors like this:

[2009/08/26 09:15:53, 3] smbd/connection.c:yield_connection(76)
yield_connection: tdb_delete for name  failed with error Record does not exist.
[2009/08/26 09:15:53, 3] smbd/server.c:exit_server(614)

although the user was able to connect from a different PC with a different operating system.

I found this great solution for the samba connection problem,

and to break it to a few simple steps:

  1. from the run command or from a cmd window run secpol.msc
  2. go to “Local Policies” -> “Security Options” -> “Network Security: LAN Manager authentication level”
  3. change to “LM and NTLM – use NTLMV2 session security if negotiated”
  4. Press the OK button

This solution worked just fine on a fresh windows 7 install.

Need Help Cleaning up your registry?

Technorati Tags: , ,

Free Photo Editor – Top 4

There are many great photo and graphic software for a nice amount of dollars out there, but finding the few good applications that are also free is harder.

Here are a few good ones – both the online version and those you install on your desktop:

Online Photo Editor

The first one I like is from aviary.com :

aviary2

They have a flash interface for editing the image, which allows the app to work well in Linux as well as on windows, and its a decent enough image editor, but the most impressive application on their site is not the image editor but the color editor tool Toucan:

toucan2

What is so good about this tool? well, part of my job is to make graphs,
some of them are dynamic, some of them are RRD based or excel based, or just a static graph to show some stats to the management, but they should be nice to look at, and here is my problem as i have no sense for color picking, i usually get some ugly graphs.

Toucan color picking wheelbut this is where this tools steps in – it allows you to pick a group of colors that go well together.

you choose how many colors you need and it will help you group them from these options:

  • equidistant
  • Circular
  • Alternate

etc…

and you can save your color groups for later use:

Toucan clipboard

So this tool helps in creating good looking graphs…

Colorjack

now this is another nice color picking tool, it loads faster then Toucan,
and does the same work.

Another Online image editor

Pixlr

pixlr online photo editor

Pixlr gives an easy feel of photoshop application, while it is also a flash application which loads into your browser – no install needed.

The best part about this app is the tools it lets you use on the image you load into it:

  • Red eye reduction tool
  • Bloat
  • Pinch
  • Dodge
  • Smudge (my favorite as you can see in the image above)
  • gradient
  • crop

And many more, if you need to quickly edit an image, without buying a software to do that, pixlr can be a very handy tool.

Offline Free Image Editors

paint.net

cat_pumpkin2

This is a great easy to use image editor, its quickly installed and its very simple interface is smooth to work with, the great plus about this app is it will allow you to easily drop a print screen image on it and start editing and cropping it as needs be.

The only drawback for paint.net is that its using the .net framework, which is not Linux native (ha!),
which brings us to the finalist:

Free Linux Photo editor

Gimp !!!

gimp2

Gimp is the all time champion when it comes to Linux free image editors,
It is a very strong software with many options and features, and filters and brushes,
and people keep creating more free filters and brushes all the time.

gimp brush tool

It comes with a lot of default brushes, but you can easily download some beautiful brushes some other happy user created.

Creative Commons

Now – combine all or any of these tools together with free images downloaded which you can search for at the CC search web page and you are ready to create some fine images which you can use anywhere.

Technorati Tags: , ,

nagios love – vote on SourceForge.net Community Choice Awards

nagios

SourceForge.net Community Choice Awards have opened up for voting,
now is your time to go and vote for your favorite Open Source applications,
Show the love for those Linux apps your have been using for free for so long :)

I’m voting for nagios in the “Best Tool or Utility for SysAdmins” Category,
and here is the direct link to vote for nagios.

But don’t stop there – other apps I’ve been lovingly using for the last years and I’m gonna give some voting love for are:

  • xampp  –  apache mysql php and perl on windows/linux
  • TortoiseSVN  –  SVN client for windows
  • Notepad++  –  The best simple text editor
  • Audacity  –  Sound editor
  • phpMyAdmin  –  Management system for MySQL Database
  • OpenOffice.org  –  MS office replacement
  • KeePass  —  Password manager

There where some hard choices to do there, since in the same categories I had more then one app that I’m totally depending on for day to day work.

phpMyAdmin changed the way I’m working with Mysql databases,
Notepad++ is my favorite editor on my windows box,
and with Audacity i make all my ring tones :)

what are your favorite Opensource apps?

Technorati Tags: , , ,

installing wordpress on windows

installing wordpress on windows image

In my last post i talked about installing apache and mysql on windows for development needs, and now we can add to that install a wordpress blog.

when i do changes to the php code on wordpress i first test it on the local version of the them to make sure its good before going with it public.

1) get the wordpress files

first thing – download the wordpress install file from the website,
the default html folder for xampp is C:\xampp\htdocs so lets create a folder for our blog there: C:\xampp\htdocs\testblog and unzip the wordpress files into that location.

2) setup the MySQL user and database

go to http://localhost/phpmyadmin/index.php and choose the Privileges tab,
find the “Add a new User” link.
fill in a user name – anything you want, and a password.
in the “Database for user” section make sure to check: “Global privileges” press the “Check All” link to give the user all the privileges (this is something you should do only on a development server!!! )

press the Go button.

at this point its best to reload the privileges tab and use the “reload the privileges” link to make sure the user is loaded.

3) edit the wp-config.php file

go to C:\xampp\htdocs\testblog where all the blog files are located and rename wp-config-sample.php to wp-config.php, edit the file and setup:
edit the DB-NAME line and replace “putyourdbnamehere” with the username we created a minute ago,
replace “usernamehere” with the the same user name we just used,
“yourpasswordhere” should be replaced with the user’s password,
and also you have the “Authentication Unique Keys” part where you need to create keys for your blog,
you can use this wordpress.org page which will create the keys for you. copy and paste the keys to the config file.

4) run the wordpress config php

if you installed the wordpress files into “testblog” folder, the install file will be at: http://localhost/testblog/wp-admin/install.php

choose a blog title and an email, and you have your own development blog running.
don’t forget to change the admin password first thing…

you can access your new blog at: http://localhost/testblog/

from here now you can do all the changes and testing you want, including themes and plugins, before you upload them to your live blog.

Technorati Tags: , , , ,

Apache and MySQL on windows

xampp apache and mysql on windows

Although I’m a great Linux fan, i still have Windows on my personal computer, since the computer is not used by me alone, and although i have various Linux OS installed on this same computer, most of the time its on the windows mode. so what do i do when i need to test something on wordpress or mediawiki?

For that reason i needed a development environment on my home computer that will run Apache, MySQL, php and Perl. There are some ways to go about that – i could have installed Cygwin, which is a Linux-like environment for windows.

Another way to go about it is to install the windows version Apache and mysql and php and perl.

These two options are fine solutions but they will need some more work on them , other then the point and click option which is xampp.
xampp for windows version 1.7.1 on default will include all of these:

  • Apache HTTPD 2.2.11 + Openssl 0.9.8i
  • MySQL 5.1.33
  • PHP 5.2.9
  • phpMyAdmin 3.1.3.1

and if you want to can add Perl 5.10.0-2.2.11 from their Add-Ons page.

The install process is a next,next,next version of a regular windows install, and in the the end you have everything installed into the default location at C:\xampp.

xampp control panel

This is the windows control panel that stops and starts the Apache and MySQL for you if you don want to install them as services, personally i prefer to start them when I’m developing since they are resource heavy applications.

Some default file locations:
the html and php files are installed to C:\xampp\htdocs
Perl scripts should be placed here: C:\xampp\cgi-bin
the php.ini (php config file) can be found at: C:\xampp\apache\bin\php.ini
httpd.conf (apache config file) is located in: C:\xampp\apache\conf

Note that for Unix Perl scripts you need to replace the first line with the location of the Perl binary on your windows, so it should look like:
#!”C:\xampp\perl\bin\perl.exe”

Another not is that the xampp on default is set to work with php 5 , but you can from the xampp configure page which is at http://localhost/xampp/ , use the “PHP switcher” and change the install to work with php 4 instead.

And that’s it – your local development website is ready and is available at: http://localhost/ to play with.

Technorati Tags: , , , ,