środa, 12 października 2011

How to transfer files from Windows 2003 to 2008 with permissions?


Moving files from Windows server 2003 to 2008 is a simple matter. Really matters is that the files were stored on an NTFS partition and not the version of the system.
If you copy files using Windows Explorer that permissions can be changed to whatever is the destination folder. More precisely, if you copy the files within the same volume permissions do not change. You become a creator-owned. If you copy to another volume permission are inherited from the parent folder. If you copy the example file using Total Commander you can tick the option "Copy NTFS Permissions" (the old permissions will be transferred).
We can also copy our files using xcopy.
For example, the command: xcopy source destination / O / X / E / H / move files with NTFS permissions from the source server to the destination.

wtorek, 11 października 2011

How to install (configure) syslog?

Syslog is a standard login (service) information from network devices (router, pix), Unix hosts,
printers ...
Events can be logged either locally or remotely on the syslog host .
Syslog allows the separation of applications, operating systems .. from the host on which the logged events are stored.
This is a very useful feature because it can be for example:
- In case of system failure to check the smooth running of the event was preceded by a host crash
- In many hardware solutions, there is no enough place for store logging events. If you have configured syslog, it is not problem behavior logs over the years
- Syslog is also very useful in case of intrusion, both external, internal and if necessary
use of logged data such as in court.
Syslog installation is not difficult. Possibly a little more difficult to configure the log distribution (arrangement) for each day of the month, year .. but we can handle this.

Stages of installation (configure logging for pix'a cisco).
1. Will do the installation on Debian (a Linux operating system).
- Start with the updates (you do not have to do it;)
aptitude update
aptitude upgrade
- Install syslog-ng
aptitude install syslog-ng
- Install openssl stunnel
aptitude install openssl stunnel
- After installation, edit the configuration file
nano /etc/syslog-ng/syslog-ng.conf and at the end add:


source net { udp(ip(0.0.0.0) port(514)); }; #0.0.0.0 will allow all hosts to send their logs to your host.
destination d_cisco { file("/var/log/cisco/$YEAR.$MONTH.$DAY/cisco.log"); };
filter f_cisco_info { level(info); };
filter f_cisco_notice { level(notice); };
filter f_cisco_warn { level(warn); };
filter f_cisco_crit { level(crit); };
filter f_cisco_err { level(err); };
filter f_cisco_debug { level(debug); };
log { source(net); filter(f_cisco_info); destination(d_cisco); };
log { source(net); filter(f_cisco_notice); destination(d_cisco); };
log { source(net); filter(f_cisco_warn); destination(d_cisco); };
log { source(net); filter(f_cisco_crit); destination(d_cisco); };
log { source(net); filter(f_cisco_err); destination(d_cisco); };
log { source(net); filter(f_cisco_debug); destination(d_cisco); };

- Thanks to this we were able to configure the syslog (in a simplified way), so that port 514 (syslog port official) receive the information logged.
- We can restart our syslog
/etc/ init.d/syslog-ng stop
/etc/init.d/syslog-ng start
- We can configure the login for our device. For example, if your syslog host address is 192.168.1.100 in this example, Cisco pix type command:
- Enable logging:
logging host inside 192.168.1.100
so briefly, of course we have to choose the login detail, or interface
- We can preview our current log
tail /var/log/cisco/(current date)/cisco.log
- Login now works, but as it usually is, not every day we look for logged events. Sometimes it can be a very
long time, during which our logs will grow to exorbitant size of a directory structure to expand beautifully;)
To avoid this, install logrotate and introduce a little order into our system.
- aptitude install logrotate
logrotate is a program dealing with log rotation
- Edit configuration
nano /etc/ logrotate.conf

# rotate log files weekly
weekly
# keep 4 weeks worth of backlogs
rotate 4
# create new (empty) log files after rotating old ones
create
# uncomment this if you want your log files compressed
compress
# packages drop log rotation information into this directory
include /etc/logrotate.d
# no packages own wtmp, or btmp -- we'll rotate them here
/var/log/wtmp {
missingok
monthly
create 0664 root utmp
rotate 1
}
/var/log/btmp {
missingok
monthly
create 0660 root utmp
rotate 1
}
# system-specific logs may be configured here

- To start logrotate type (force start)
logrotate -f
- If we want rotate only syslog then you would run
logrotate -f /etc/logrotate.d/syslog-ng
That's all, our logon service  works. Of course, your configuration may be significantly more sophisticated.

niedziela, 9 października 2011

For the it professionals working abroad


A word of advice for working abroad. How cheaply transfer money from abroad?
Offer transfers from abroad is very rich and really is the pick.
If you are working abroad, you or your family is probably looking for a company that does not rip one of you for a transfer while the transfer of foreign operations account will be painless.
With a wide range of interested me most MoneyBookers account on why below quotes from their site:

Key features:

  • Fully integrated worldwide banking network, provides more than 100 payment options, with 41 currencies covering 200 countries and territories
  • Sophisticated internal risk and fraud management
  • Transparent fee structure
  • Multi-language website and customer service
  • First licensed e-money issuer in the UK authorised and regulated by the FSA
  • Cost-effective, offering competitive prices and unique proven benefits

Advantages to consumers:

  • Instant deposits and withdrawals
  • Send money globally for only 1% or €0.50, whichever is less
  • Market-leading security, protecting personal data
  • Wide range of payment options
  • Prepaid MasterCard® offers extra flexibility

Advantages to businesses:

  • Direct processing of credit and debit cards
  • One contract and one interface offers 100 payment and banking options
  • Facilitates substantial increase in customer conversion and acquisition rates
  • Free risk checks and anti-fraud management
  • Marketing access to over 19million account holders

czwartek, 6 października 2011

Making Money on Facebook?


On Facebook, you can make money in different ways:

-  You can lead Advertising campaigns for companies
- You can also write posts and articles
- You can help establish Fanpage

Recently I came across the website fanslave, which is interesting. In this site they paying registered facebook users for clicking "like it" on the site ((fanpages targeted by fanslave owners. (the company has a fanpage and fanslave pays for the fact that we click for them on "I like it ".))
Quote from fanslave:

"FanSlave is a ground-breaking new service, which was designed to revolutionize the marketing of Fanpages. With our easy connection system you can increase the growth of your social network and therefore increase the people following your brand, your company or product."

Really interesting, especially becouse at the beginning we get some credits and page to like:)
If you fall into any other ideas on how you can earn on facebook type in comments.
ps.You can also use fanslave to get users to your fanpage

How to add to Joomla - Facebook "I like it" (and Google+)


Adding links in Joomla to Facebook is a simple matter. You can use ready-madeextensions that will do it for us, but more flexible will be to modify the Joomla code.In this way we will decide exactly where you will find our Facebook buttons.
Below are some examples of modification obtained with the help of one of the forum members  (link to his web page http://www.landkiting.pl/).


In our examples we use a modified button "f add to wall" (you should create your custom icon), which looks a little different than the standard "I like it." In addition, we use the standard "f" button. We save the image files to / images / icons / (or any folder created by you).
(Note we can also use the following article to add a  google+ button. For example, before facebook button, typing <g:plusone> </ g: plusone> and on the main page in the head section </ script> {lang: 'en'} <script type="text/javascript" src="https://apis.google.com/js/plusone.js">)


- Let's insert Facebook button on our home page in Joomla.
We need to edit the file (for example, after logging in via ftp / ssh, etc. .. on our server) is located
in components / com_content / views / frontpage / tmpl / default_item.php. Bellow the lines:

<?php if ($canEdit || $this->item->params->get('show_title') || $this->item->params->get('show_pdf_icon') || $this->item->params->get('show_print_icon') || $this->item->params->get('show_email_icon')) : ?>
<table class="contentpaneopen<?php echo $this->escape($this->item->params->get( 'pageclass_sfx' )); ?>">
<tr>
<?php if ($this->item->params->get('show_title')) : ?>
<td class="contentheading<?php echo $this->escape($this->item->params->get( 'pageclass_sfx' )); ?>" width="100%">
<?php if ($this->item->params->get('link_titles') && $this->item->readmore_link != '') : ?>
<a href="/<?php echo $this->item->readmore_link; ?>" class="contentpagetitle<?php echo $this->escape($this->item->params->get( 'pageclass_sfx' )); ?>">
<?php echo $this->escape($this->item->title); ?></a>
<?php else : ?>
<?php echo $this->escape($this->item->title); ?>
<?php endif; ?>
</td>
<?php endif; ?>
add:


<td align="right" width="100%" class="contentheading">
<a target="_blank" href=http://www.facebook.com/share.php?u=your site address without the http at the beginning<?php echo $this->item->readmore_link; ?> title="Add to Facebook" ><img src="/images/icons/facebook.png"  border="0" alt="Dodaj do Facebook`a"></a>
</td>

and now we have a beautiful button "f add to wall" :)
- If you want to add a button to each new article well enough to modify a file in components / com_content / views / article / tmpl / default.php. Bellow the lines:


<table class="contentpaneopen<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>">
<tr>
<?php if ($this->params->get('show_title')) : ?>
<td class="contentheading<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>" width="100%">
<?php if ($this->params->get('link_titles') && $this->article->readmore_link != '') : ?>
<a href="/<?php echo $this->article->readmore_link; ?>" class="contentpagetitle<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>">
<?php echo $this->escape($this->article->title); ?></a>
<?php else : ?>
<?php echo $this->escape($this->article->title); ?>
<?php endif; ?>
</td>

add:




<td align="right" width="100%" class="contentheading">

<a target="_blank" href=http://www.facebook.com/share.php?u=your site address without the http at the beginning<?php echo $this->item->readmore_link; ?> title="Add to facebook" ><img src="/images/icons/facebook.png"  border="0" alt="Add to Facebook"></a>
</td>

- We can also add a menu button to display a list of articles in the category. We need to edit the file components / com_content / views / category / tmpl / default_item.php and insert code:

<?php foreach ($this->items as $item) : ?>
<tr class="sectiontableentry<?php echo ($item->odd +1 ) . $this->escape($this->params->get('pageclass_sfx')); ?>" >
<td align="right">
<?php echo $this->pagination->getRowOffset( $item->count ); ?>
</td>
<?php if ($this->params->get('show_title')) : ?>
<?php if ($item->access <= $this->user->get('aid', 0)) : ?>
<td>
<a href="/<?php echo $item->link; ?>">
<?php echo $this->escape($item->title); ?></a>
<?php $this->item = $item; echo JHTML::_('icon.edit', $item, $this->params, $this->access) ?>
your site address without the http at the beginning<a target="_blank" href=http://www.facebook.com/share.php?u=
<?php echo $this->item->readmore_link; ?> title="Add to facebook" ><img src="/images/icons/facebook1.gif"  border="0" alt="Add to facebook"></a>

</td>

That's it folks ;)

środa, 5 października 2011

Apache restart using crontab

If you have problem with your Apache server (for example when your server hang from time to time)this may be associated with too many apache processes. If the server crashes from time to time it is a hassle for you and your Customer.
You can add RAM to your server, but not sure if this will solve the problem.
A better method is to add the crontab job that will restart the Apache process (You should also upgrade your Apache version).
Download Video Tutorial
Let's start:
- login as root to your apache server (you can use ssh, direct access, webmin etc.)
- type crontab -e to edit crontab
That will put you in the Vi editor editing your crontab. The Vi keystrokes you need to edit your crontab are: "i" for insert (or insert key), then type out your cron line following the format below , then press the "escape" key on your keyboard to get out of insert mode, then ":" to get a prompt, then "wq" and then "enter" and it is saved.
- in the last line type
5 0 * * * /etc/init.d/httpd restart >/dell/null 2>&1
Run at 5 minutes after midnight, every day (restart apache)
- save crontab esc : wq! and exit
it's all
ps. if you start Apache using then type in crontab
5 0 * * * /usr/local/apache/bin/apachectl restart
or 5 0 * * * /usr/sbin/apachectl restart

wtorek, 4 października 2011

Psexec commands, usage


PsExec
is one of the tools in the excellent PsTools package suite . It is a command line tool allowing the execution of processes on a remote system and transfer the results of operations to the console (to your computer) To work PsExec needs on the local and remote computer file and printer sharing and remote system service should be enabled and also default administrative share Admin $.

 To start, download PsTools  to your computer and then unpack to a directory eg c: \.

Then enter the command line (cmd), go to the directory c: \ PsTools and we can use psexec.exe.

Generally, if you have administrative privileges for easest use, you can copy files in the directory PsTools to% systemroot% \ system32.

This enables us regardless of our position in the hierarchy of folders, use the commands contained in the package.

Examples of use psexec:

The name of the remote computer (SCA)

- Run a command prompt on the remote computer

psexec \ \ cmd SCA

- Run the show network settings on a remote computer and pass this information to local console command line

psexec \ \ SCA ipconfig / all


- These commands were performed assuming that you run from an account that has administrative privileges on the second computer also. In another situation, we must specify the administrator login and password.

Here is an example remote shutdown.

psexec \ \ SCA-u username-p password shutdown 

- The following command will copy the program to the remote computer and run it interactively

psexec \ \ SCA-u username-p password-cc: \ jakas_sciezka \ program.exe 
- Setting the firewall on a remote computer to allow you to connect remote desktop

psexec \ \ SCA - u user-p password netsh firewall set service enable remotedesktop

- Displays detailed information about processes on a remote computer

psexec \ \ SCA - u user-p password tasklist / v

niedziela, 2 października 2011

How to format FAT32 external drive - Windows


If you want to format the portable drive
(if you wan't for example, connect to the DVD player) on a FAT32 file system when its size is over 32GB
, we encounter an unexpected problem. Windows will not allow us to format the drive in FAT32 instead of NTFS format will propose. To circumvent the problem, we can use a boot disk and format the drive but it would be too burdensome. - Instead, download the fat32format.zip (by which format the 1TB drive for example) and unpack it to any path. Then enter the command prompt (start menu> run> "cmd"). You should log on as an administrator or run the command line by going to Start> Programs> Accessories and select right-click "Command Prompt" and from the context menu choose "Run as administrator" We should check twice what the drive letter of your disk is going into eg the Computer Management> Disk Management, or by using diskpart - Navigate to the path where you unpack file for example by typing cd C: \ Documents and Settings \ user \.
- Type fat32 format g: (if your portable drive letter is g:) After a while, your disk is formatted

sobota, 1 października 2011

How to open, convert the DAA file

DAA (Direct Access Archive) is an image file format created for the PowerISO program. This format provides compression, password protection, divid into multiple volumes. PowerISO is a great application, but paid.It's very difficult to find a free program that supports this file type.
But after what they hinder? We can convert the Daa file to iso using a free program DAA2ISO

In brief:
1.We download DAA2ISO file and unpack Zip file
2.Run daa2iso.exe and select *.daa file from your file system.
3.We show where to save the converted file iso. After the conversion is complete press enter and that's it ;)

From now on we can burn the iso file to disc, eg free ImgBurn (also for commercial use), or mount a free MagicDisc (also for commercial use (as opposed to the daemon-tools, which is free only for home use;))