Friday, June 11, 2010

Customize the BASH PS1 command prompt

SkyHi @ Friday, June 11, 2010
The PS1 environment controls the appearance of the BASH command line prompt. There are a variety of default prompts but they usually include username, hostname, and working directory. You can easily customize your prompt to display information important to you as well as add color and style formatting.
Here we can see the default prompt is “username@hostname working_directory $”.
ryan@workstation ~ $
You can echo the PS1 environment variable and see the character codes which are used to create the output.
ryan@workstation ~ $ echo $PS1
\u@\h \w \$
Here is a list of all the special character codes you can use to build your PS1 command prompt.

Special Character Codes

\a – an ASCII bell character (07)
\d – the date in “Weekday Month Date” format (e.g., “Tue May 26″)
\D{format} – the format is passed to strftime(3) and the result is inserted into the prompt string; an empty format results in a locale-specific time representation. The braces are required
\e – an ASCII escape character (033)
\h – the hostname up to the first `.’
\H – the hostname
\j – the number of jobs currently managed by the shell
\l – the basename of the shell’s terminal device name
\n – newline
\r – carriage return
\s – the name of the shell, the basename of $0 (the portion following the final slash)
\t – the current time in 24-hour HH:MM:SS format
\T – the current time in 12-hour HH:MM:SS format
\@ – the current time in 12-hour am/pm format
\A – the current time in 24-hour HH:MM format
\u – the username of the current user
\v – the version of bash (e.g., 2.00)
\V – the release of bash, version + patchelvel (e.g., 2.00.0)
\w – the current working directory
\W – the basename of the current working directory
\! – the history number of this command
\# – the command number of this command
\$ – if the effective UID is 0, a #, otherwise a $
\nnn – the character corresponding to the octal number nnn
\\ – a backslash
\[ - begin a sequence of non-printing characters, which could be used to embed a terminal control sequence into the prompt
\] – end a sequence of non-printing characters
Lets try a simple change. Make sure you use double quotes so the escape characters get passed on to the variable and not expanded in the shell.
ryan@workstation ~ $ PS1="My Prompt: $ "
My Prompt: $
As you can see the prompt will immediately change to reflect the changes.
We can add the date to the prompt.
ryan@workstation ~ $ PS1="\d \u@\h \w \$ "
Sun Oct 19 ryan@workstation ~ $
Now lets add some color to our original prompt.
ryan@workstation ~ $ PS1="\[\e[1;32m\]\u@\h\[\e[1;34m\] \w \$\[\e[0m\] "
Let go over this in detail.
A style block will display all text that follows with the style it defines. The block contains 3 elements.
Lets look at the first block.
“\[\e[1;32m\]”
\[" - begin a sequence of non-printing characters
"\e[1;32m" - the semicolon separated list of style/color codes (in this case bold;green)
"\]” – end a sequence of non-printing characters
The first block will display the following username@hostname text in BOLD green.
\[\e[1;32m\]\u@\h\[\e[1;34m\] \w \$\[\e[0m\] ”
The second block will display the following working_directory text in BOLD blue.
“\[\e[1;32m\]\u@\h\[\e[1;34m\] \w \$\[\e[0m\] ”
The final block resets the colors.
“\[\e[1;32m\]\u@\h\[\e[1;34m\] \w \$\[\e[0m\]
Here is a rundown of all the color and style codes.

Color and Style Codes

Style
0 – default
1 – bold
4 – underline
7 – inverse
9 – strikeout
Foreground Colors
30 – foreground Black
31 – foreground Red
32 – foreground Green
33 – foreground Yellow
34 – foreground Blue
35 – foreground Magenta
36 – foreground Cyan
37 – foreground White
Background Colors
40 – background Black
41 – background Red
42 – background Green
43 – background Yellow
44 – background Blue
45 – background Magenta
46 – background Cyan
47 – background White
You can combine multiple codes to create the exact style you want.
“\[\e[1;4;36;47m\]”
This style block defines bold and underlined cyan text with a white background.
To make these changes permanent place your new prompt string like the one below in your ~/.bashrc file in your home directory.
PS1="\[\e[1;32m\]\u@\h\[\e[1;34m\] \w \$ \[\e[0m\]"
This file is sourced every time you start a new interactive shell.


REFERENCES
http://www.wiredrevolution.com/bash-programming/customize-the-bash-ps1-command-prompt


shell colors colorizing shell scripts

SkyHi @ Friday, June 11, 2010
Shell scripts commonly used ANSI escape codes for color output.
Following table shows Numbers representing colors in Escape Sequences.
ColorForegroundBackground
Black 30 40
Red 31 41
Green 32 42
Yellow 33 43
Blue 34 44
Magenta 35 45
Cyan 36 46
White 37 47
The numbers in the above table work for xterm terminal.Result may vary for other terminal emulators. Use the following template for writing colored text. echo -e "\033[COLORm Sample text" The "\033[" begins the escape sequence.You can also use "\e[" instead of "\033[". COLOR specifies a foreground color, according to the table above.The "m" terminates escape sequence, and text begins immediately after that. Note: With an echo, the -e option enables the escape sequences.You can also use printf instead of echo. printf "\e[COLORm sample text\n" To print Green text echo -e "\033[32m Hello World" or printf "\e[32m Hello World" The problem with above statement is that the blue color that starts with the 32 color code is never switched back to the regular color, so any text you type after the prompt and even prompt also is still in the Green color. To return to the plain, normal mode, we have yet another sequence. echo -e "\033[0m" Now you won't see anything new on the screen, as this echo statement was not passed any string to display. But it has done its job, which was to restore the normal viewing mode. Whatever yor type now will be avoid of any fancy effects. Escape sequence also allow you to control the manner in which characters are displayed on the screen. The following table summarizes numbers representing text attributes in Escape Sequences.
ANSI CODEMeaning
0Normal Characters
1Bold Characters
4Underlined Characters
5Blinking Characters
7Reverse video Characters
Note: Blink attribute doesn't work in any terminal emulator, but it will work on the console. Combining all these Escape Sequences, you can get more fancy effect. Use the following template for writing colored text on a colored background. echo -e "\033[COLOR1;COLOR2m sample text\033[0m"; The semicolon separated numbers "COLOR1" and "COLOR2" specify a foreground and a background color.The order of the numbers does not matter, since the foreground and background numbers fall in non- overlapping ranges."m" terminates the escape sequence, and the text begins immediately after that.Although setting the colors separately also work (i.e. \033[44m\033[32m). There are some differences between colors when combining colors with bold text attribute. The following table summarises these differences.
Bold offcolorBold oncolor
0;30Balck1;30Dark Gray
0;31Red1;31Dark Red
0;32Green1;32Dark Green
0;33Brown1;33Yellow
0;34Blue1;34Dark Blue
0;35Magenta1;35Dark Magenta
0;36Cyan1;30Dark Cyan
0;37Light Gray1;30White
The following shell script prints all the colors and codes on the screen. #!/bin/bash # This script echoes colors and codes echo -e "\n\033[4;31mLight Colors\033[0m \t\t\t \033[1;4;31mDark Colors\033[0m" echo -e " \e[0;30;47m Black \e[0m 0;30m \t\t \e[1;30;40m Dark Gray \e[0m 1;30m" echo -e " \e[0;31;47m Red \e[0m 0;31m \t\t \e[1;31;40m Dark Red \e[0m 1;31m" echo -e " \e[0;32;47m Green \e[0m 0;32m \t\t \e[1;32;40m Dark Green \e[0m 1;32m" echo -e " \e[0;33;47m Brown \e[0m 0;33m \t\t \e[1;33;40m Yellow \e[0m 1;33m" echo -e " \e[0;34;47m Blue \e[0m 0;34m \t\t \e[1;34;40m Dark Blue \e[0m 1;34m" echo -e " \e[0;35;47m Magenta \e[0m 0;35m \t\t \e[1;35;40m Dark Magenta\e[0m 1;35m" echo -e " \e[0;36;47m Cyan \e[0m 0;36m \t\t \e[1;36;40m Dark Cyan \e[0m 1;36m" echo -e " \e[0;37;47m Light Gray\e[0m 0;37m \t\t \e[1;37;40m White \e[0m 1;37m" OUTPUT: Some examples: Block background and white text echo -e "\033[40;37m Hello World\033[0m" Reverse video text attribute option interchanges fg and bg colors. Bellow statement prints block on white echo -e "\033[40;37;7m Hello World\033[0m" echo -e "\033[33;44m Yellow text on blue background\033[0m" echo -e "\033[1;33;44m Bold yellow text on blue background\033[0m" echo -e "\033[1;4;33;44mBold yellow underlined text on blue background\033[0m" The "tput" command: Other than echo there is a command called tput using which we can control the way the output is displayed on the screen.But it is less flexible than ANSI escape sequences.
 
 
REFERENCES
http://bashscript.blogspot.com/2010/01/shell-colors-colorizing-shell-scripts.html

Modify Your Command Prompt

SkyHi @ Friday, June 11, 2010

You may find that you want to modify the prompt. This can help you create visibility for special features or just modify it to something more useful. You can view the default settings for the prompt by using this command:


echo $PS1


As stated above it will show user, hostname, location and definition whether it is a normal user or root.


Create a single character


PS1=”$ ”


The space behind the $ is enforced by placing the quotes so it does not run into your text. The $ is typically used to show that it is a normal user not the root user indicated by the “#”.


Change options for the prompt


\d : the date Weekday Month Date format

\h : the hostname up to the first ‘.’

\A : the current time in 24-hour HH:MM format

\u : the username of the current user

\w : the current working directory, with $HOME abbreviated with a tilde

\$ : if the effective UID is 0, a #, otherwise a $




Create a colored prompt


You may want to create a color prompt that you can use for visibility. In this example the hostname has been dropped to make a shorter prompt and the prompt is turned red but the commands that you enter will be black. The export command will change these features.


mike@ub:~$ export PS1=’\e[0;31m[\u:\w]\$ \e[m '

[mike:~]$


This will color the prompt but not any commands that you enter.


List of Color codes

Color Code

Black 0;30

Blue 0;34

Green 0;32

Cyan 0;36

Red 0;31

Purple 0;35

Brown 0;33

Blue 0;34

Green 0;32

Cyan 0;36

Red 0;31

Purple 0;35

Brown 0;33


Replace digit 0 with 1 for a lighter color.


Make Changes permanent

All of the changes you make will be lost when you close the terminal or log out. Here are directions to make them permanent.


Ubuntu

# uncomment for a colored prompt, if the terminal has the capability; turned

# off by default to not distract the user: the focus in a terminal window

# should be on the output of commands, not on the prompt

#force_colored_prompt=yes


The .bashrc file in each user’s home directory allows you to change the default for the prompt to a color prompt by uncommenting the line:


#force_colored_prompt=yes


Unfortunately a typo in the line must also be corrected so that it should read:

force_color_prompt=yes


Ubuntu or CentOS

Place your custom prompt in the user .bashrc file with this command:


export PS1=’\e[0;31m[\u:\w]\$ \e[m ‘


REFERENCES

http://beginlinux.wordpress.com/2008/09/12/modify-your-command-prompt/

How to move a SSL Certificate from Server to Server?

SkyHi @ Friday, June 11, 2010
There may be certain instances in which an SSL certificate must be moved from one server to another. An SSL certificate is bound to the server software and the common name. Therefore, the certificate and its corresponding private key may be exported from the original server and imported into the target server as long as both servers run the same server software (i.e. Apache to Apache) and the target server will be hosting a site that matches the common name. To do this copy the .key and the .crt files to be imported into the new servers certificate
control panel.

Suppose, you have purchased a new Linux server and going to transfer all your domains residing on existing server to new server. In such case, you may require to transfer the shared SSL certificate installed on your domain to new server.

If your domain name and host name remains same for both the servers then you can directly transfer existing SSL certificate for the domain hosted on old server to a new server.

You just need to copy and paste following files from your old server to new server:

* /etc/httpd/conf/ssl.key (private key)
* /etc/httpd/conf/ssl.csr ( CSR key)
* /etc/httpd/conf/ssl.crt (certificate file)

REFERENCES
https://knowledge.verisign.com/support/ssl-certificates-support/index?page=content&id=AR215
http://kb.mediatemple.net/questions/707/Moving+an+SSL+Certificate+from+another+server
http://discussion.accuwebhosting.com/linux-server/1059-how-transfer-ssl-certificate-one-server-other-server.html
http://www.webhostingresourcekit.com/252.html


Moving SSL Certs from IIS to Apache

I found some instructions for converting SSL certificates generated for IIS to private key, and cert files you can use on unix, or Apache for windows.

First Export your IIS certificate into a pfx file (this is something you should do anyways for backup)

* Run mmc.exe
* Click the 'Console' menu and then click 'Add/Remove Snap-in'.
* Click the 'Add' button and then choose the 'certificates' snap-in and click on 'Add'.
* Select 'Computer Account' then click 'Next'.
* Select 'Local Computer' and then click 'OK'.
* Click 'Close' and then click 'OK'.
* Expand the menu for 'Certificates' and click on the 'Personal' folder.
* Right click on the certificate that you want to export and select 'All tasks' -> 'Export'.
* A wizard will appear. Make sure you check the box to include the private key and continue through with this wizard until you have a .PFX file.

Next run openssl to extract the private key, and the cert file.

# Export the private key file from the pfx file
openssl pkcs12 -in filename.pfx -nocerts -out key.pem
# Export the certificate file from the pfx file
openssl pkcs12 -in filename.pfx -clcerts -nokeys -out cert.pem
# This removes the passphrase from the private key so Apache won't
# prompt you for your passphase when it starts
openssl rsa -in key.pem -out server.key

REFERENCES
http://www.sslshopper.com/move-or-copy-an-ssl-certificate-from-a-windows-server-to-another-windows-server.html
http://serverfault.com/questions/92324/moving-ssl-on-another-server


VI/VIM Avoid tabs when making a copy/paste

SkyHi @ Friday, June 11, 2010

Issue




By default, when you make a copy and paste in vi or vim (through an
remote SSH session), it adds incremented tabs at each line.

Solution




To solve this problem,simply type: set paste in the window or add
the set paste in /etc/vim/vimrc or in the ~/.vimrc file

Thursday, June 10, 2010

Deflecting DDoS In Apache

SkyHi @ Thursday, June 10, 2010

Denial of service attacks are popular nowadays. The most dangerous are the so-called distributed denial of service attacks, when network activity aimed at shutting the service down, is launched from a vast number of different locations (IPs). To handle that, in most cases one should have an expensive type of network hardware and software; however, there may be simpler solutions. Atlas Tuesday offers an example in Fighting off a DDOS attack on an Apache web server.


The story goes, when it rains it pours! It’s hard enough to keep websites running without hackers trying to break in. An even worse situation is when hackers simply want you off-line. A few days ago I experienced just that… my first DDOS (distributed denial of service) attack against a high-profile website we host.


The attacker original exploited some legacy code to gain access to the web sites administration tool. After thwarting their attack, our web server immediately started to hit “max client connections”. Even after restarting Apache the max client connections were reached within seconds.


We quickly created bad routes for IP addresses associated with the hack attempts; however this did not resolve the problem. Below is the syntax we used to add bad routes.


Route add –host xxx.xxx.xxx.xxx reject

The Apache log files left no clues as to who was connecting so we had to look elsewhere. After some quick searching we found a terrific PHP script which shows which IP’s are connecting to your web server too much. The script was just want we needed. After about a ½ hour of blocking listed IP addresses the problem went away. In all we blocked a little over 100 IP addresses.


If you’re ever in a situation where Apache is clearly being flooded with connections. Run this script! It will save you a ton of time identifying the attacker(s).


<pre class="php" name="code">

– BEGIN SCRIPT –


&lt;?php


## Functions ##


function getIP($line) {

ereg("[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}",$line,$regMatch);

$ip = $regMatch[0];

if($ip) return $ip; else return "false";

}


function processString($string, $size = 18) {

$string = "[ ".$string;

$length = strlen($string);

$toAdd = $size - $length;


for($x = 0; $x < $toAdd; $x++) {

$string = $string." ";

}

$string = $string."]";

return $string;

}


## Code ##


while (true) {

$cmd = "netstat -n | awk '{ print $5 }'";

exec($cmd, $netstatArray);

$ipArray = array();


foreach($netstatArray as $line) {

$ip = getIP($line);

if($ip != "false" && ip != "127.0.0.1") {

if(array_key_exists($ip, $ipArray))

{

$ipArray[$ip]+=1;

}

else // if not, count=1

{

$ipArray[$ip] = 1;

}

}

}


asort($ipArray);


system("clear");

foreach($ipArray as $ip => $count) {

if ($count < 15)

continue;

echo processString($ip);

echo "\t" .processString(gethostbyaddr($ip), 55);

echo "\tTimes Accessed: " .$count ."\n";

}


echo str_repeat("-", 50) ."\n";

exec("top -n 1", $top_str);

preg_match("#load average:(.+)#i", $top_str[0], $match);

echo "Load Average: " .$match[1] ."\n";

echo str_repeat("-", 50) ."\n";

echo 'Showing $count >= 15: (Escape with ctrl+c)' ."\n";


sleep(10);

}

?>


One should also add that even the basic software firewall products, such as free iptables, are capable of thwarting most kidns of simple DoS attempts, by banning addresses temporarily when the rate of connections becomes too high.


For example, this is how SMTP connections can be limited to 1 per second per IP (burstable 10):



iptables -A INPUT -p tcp --dport 25 --syn -m limit --limit 1/s \

--limit-burst 10 -j ACCEPT

iptables -A INPUT -p tcp --dport 25 --syn -j DROP


Protection against DDoS is a hard task, and in most cases it should be handled with proper tools.




mod_rewrite with Fedora 10 and ISPConfig for WordPress

SkyHi @ Thursday, June 10, 2010
This relates to Fedora 10 and ISPConfig 3.0.1 set up as described in this HowtoForge post One of my colleagues recently got interested in offering our clients Wordpress as a content management system, so he's been trying it out. Yesterday he found out that if he wanted to change the permalink style in Wordpress he needed write access to .htaccess, which he didn't have because the user rights haven't been set up very well there. So I gave him write access by using
chown apache:apache .htaccess
Unfortunately this resulted in a 500 Interal Server Error. Looking at the error log for the website I tried this for it let me know that RewriteEngine directives were not allowed in the .htaccess. Since I didn't want to mess with the base configurations of ISPConfig I started looking around for other options. Eventually I found that I had to add something similar to this to the Apache directives field under options under the website's settings


Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

Of course [sitename] should be replaced with the name of your website. It all works after I restarted the apache server myself, but I do not know if that is completely necessary. Also it might take a few seconds before ISPConfig finishes editing the configuration file.

REFERENCES
http://www.linux.com/community/blogs/modrewrite-with-fedora-10-and-ispconfig-for-wordpress.html

Change the settings of your email account in Microsoft Outlook 2003/2007

SkyHi @ Thursday, June 10, 2010

Email Configuration

Create Account Account Settings Create Account Account Settings Create Account Account Settings

Setup your email account in Microsoft Outlook 2003

The following instructions describe in detail how to create and setup your email account when using Microsoft Outlook 2003. The instructions concentrate on how to setup your email account for emails provided or web-hosted by Exarsis Business Solutions Ltd and given that internet service is provided by Internet Service Provides (ISP) in Cyprus (e.g. Cytanet, PrimeTel, NetWay, OTEnet, Avacomnet and Wave Speed) or Greece (e.g. Forthnet, Hellas on Line, Otenet, Tellas and Vovodi). Despite, the instructions are easy to follow and can be used to setup emails provided also by other web-hosting providers.


Go to "Tools" » "Account Settings …"

MS Outlook 2003

From the following screen "E-mail Accounts" select "View or change an existing e-mail accounts" and then click "Next".

MS Outlook 2003

From "E-Mail Accounts" select the account that you have already created for emails provided (or web-hosted) by Exarsis Business Solutions Ltd and then click "Change …".

MS Outlook 2003

On the next window "Internet E-mail Settings (POP3)" you are required to complete various fields related to your personal data, server and logon information:

  • In "Your Name" enter your name, your nick name, or your company’s name depending on how you want to be displayed when you send an email.
  • In "E-mail Address" enter your e-mail address (in the example we are creating an email account for an imaginary email: user@yourdomain.com).
  • In "Incoming mail server (POP3)" insert: mail.exarsisnet.com
  • For the “Outgoing mail server (SMTP)" you must use the Outgoing Mail Server Name of your current Internet Server Provider (ISP). For Cyprus the main Internet Service Providers and the associated Outgoing Mail Server Names are:
Cyprus Internet Service Provider (ISP)
Outgoing Mail Server Name
AvacomNet
mail.avacom.net
Cytanet
mail-out.cytanet.com.cy
Logos Net
mail.logos.net.cy
NetWay
mail.netmail.com.cy
OTEnet
smtp.otenet-telecom.net
PrimeTel
mail.primehome.com
Spidernet
nautilus.spidernet.net
Wave Speed
mail-out.mailspeed.net

For Greece the main Internet Service Providers and the associated Outgoing Mail Server Names are:

Greek Internet Service Provider (ISP)
Outgoing Mail Server Name
Forthnet mailgate.forthnet.gr
Hellas On Line smtp.hol.gr
Otenet mailgate.otenet.gr
Tellas smtp.tellas.gr
Vivodi mail.vivodinet.gr

(in the example here we are using the one of Cytanet).
  • Your "User Name" is the email address you have been given.
  • Do not forget to enter the "Password". Please note that "Password" is case sensitive. So make sure that you have selected English language before start typing.
  • Decide if you want to check the "Remember password" field.
The option "Log on using Secure Password Authentication (SPA) "should be unchecked (at the default value).

MS Outlook 2003

When you complete all fields required click on the "Test Account Settings …". If you have entered correctly all needed information you should see the following screen verifying the validity of your inputs.

MS Outlook 2003
Click on the "Close" button to close this window and also click on the "Next" button of the former window "Internet E-mail Settings (POP3)" to move to the next step.

At this stage you have completed your email setup. The process is completed when you click "Finish" on the previous window entitled "E-mail Accounts"

MS Outlook 2003




Setup your email account in Microsoft Outlook 2007

The following instructions describe in detail how to create and setup your email account when using Microsoft Outlook 2007.
The instructions concentrate on how to setup your email account for emails provided or web-hosted by Exarsis Business Solutions Ltd and given that internet service is provided by Internet Service Provides (ISP) in Cyprus (e.g. Cytanet, PrimeTel, NetWay, OTEnet, Avacomnet and Wave Speed) or Greece (e.g. Forthnet, Hellas on Line, Otenet, Tellas and Vovodi). Despite, the instructions are easy to follow and can be used to setup emails provided also by other web-hosting providers.

From "Start" choose "Microsoft Office Outlook 2007" (it is assumed that you have used this program before so as the Internet Connection Wizard is not initiated). Then go to "Tools" » "Account Settings …"

Setup your email account in Microsoft Outlook 2007

Click "New … " which is the first button on the left

Account Settings

On the next window that appears select the check box at the bottom "Manually configure server settings or additional server types" and then click "Next"

Add  new email account
On the next window "Choose E-mail Service" the option "Internet E-mail" should be selected (this is the default choice) and then click "Next".

E-mail Service

On the next window "Internet E-mail Settings" you are required to complete various fields related to your personal data, server and logon information:

  • In "Your Name" enter your name, your nick name, or your company’s name depending on how you want to be displayed when you send an email.
  • In "E-mail Address" enter your e-mail address (in the example we are creating an email account for an imaginary email: user@yourdomain.com).
  • "Account Type" should be POP3 (this is the default option).
  • In "Incoming mail server " insert: mail.exarsisnet.com
  • For the “Outgoing mail server (SMTP)" you must use the Outgoing Mail Server Name of your current Internet Server Provider (ISP). For Cyprus the main Internet Service Providers and the associated Outgoing Mail Server Names are:
Cyprus Internet Service Provider (ISP)
Outgoing Mail Server Name
AvacomNet
mail.avacom.net
Cytanet
mail-out.cytanet.com.cy
Logos Net
mail.logos.net.cy
NetWay
mail.netmail.com.cy
OTEnet
smtp.otenet-telecom.net
PrimeTel
mail.primehome.com
Spidernet
nautilus.spidernet.net
Wave Speed
mail-out.mailspeed.net

For Greece the main Internet Service Providers and the associated Outgoing Mail Server Names are:

Greek Internet Service Provider (ISP)
Outgoing Mail Server Name
Forthnet mailgate.forthnet.gr
Hellas On Line smtp.hol.gr
Otenet mailgate.otenet.gr
Tellas smtp.tellas.gr
Vivodi mail.vivodinet.gr

(in the example here we are using the one of Cytanet).
  • Your "User Name" is the email address you have been given.
  • Do not forget to enter the "Password". Please note that "Password" is case sensitive. So make sure that you have selected English language before start typing.
  • Decide if you want to check the "Remember password" field.
The option "Reguire logon using Secure Password Authentication (SPA) "should stay unchecked (at the default value).



When you complete all fields required click on the "Test Account Settings …". If you have entered correctly all needed information you should see the following screen verifying the validity of your inputs.

Test Account Settings

Click on the "Close" button to close this window and also click on the "Next" button of the former window "Internet E-mail Settings" to move to the next step.

At this stage you have completed your email setup. " The process is completed when you click "Finish"



Finally click "Close" to exit the "E-mail Accounts" window.




Setup your email account in Vista Mail

The following instructions describe in detail how to create and setup your email account by using the Vista Mail. The instructions concentrate on how to setup your email account for emails provided or web-hosted by Exarsis Business Solutions Ltd and given that internet service is provided by Internet Service Provides (ISP) in Cyprus (e.g. Cytanet, PrimeTel, NetWay, OTEnet, Avacomnet and Wave Speed) or Greece (e.g. Forthnet, Hellas on Line, Otenet, Tellas and Vovodi). Despite, the instructions are easy to follow and can be used to setup emails provided also by other web-hosting providers.

From "Start" choose "Email". Windows Mail is already installed on Windows Vista.

Then go to "Tools" » "Account Settings …"

Vista Mail

From the available email accounts "Mail" select the account that you have already created for emails provided (or web-hosted) by Exarsis Business Solutions Ltd and then click "Add Properties".

Vista Mail

In the tabbed window entitled "General" make sure that:

  • In " Name" enter your name, your nick name, or your company’s name depending on how you want to be displayed when you sent an email.
  • In "E-mail address" enter your e-mail address and then click "Next" (in the example we are creating an email account for an imaginary email: user@yourdomain.com).
  • Also check (select) the box "Include this account when receiving mail or synchronizing".
Afterwards select the tabbed window entitled: "Servers"

Vista Mail

In the window that appears do the following:

  • In "Incoming mail server (POP3)" insert: mail.exarsisnet.com
  • For the “Outgoing mail server (SMTP)" you must use the Outgoing Mail Server Name of your current Internet Server Provider (ISP). For Cyprus the main Internet Service Providers and the associated Outgoing Mail Server Names are:
Cyprus Internet Service Provider (ISP)
Outgoing Mail Server Name
AvacomNet
mail.avacom.net
Cytanet
mail-out.cytanet.com.cy
Logos Net
mail.logos.net.cy
NetWay
mail.netmail.com.cy
OTEnet
smtp.otenet-telecom.net
PrimeTel
mail.primehome.com
Spidernet
nautilus.spidernet.net
Wave Speed
mail-out.mailspeed.net

For Greece the main Internet Service Providers and the associated Outgoing Mail Server Names are:

Greek Internet Service Provider (ISP)
Outgoing Mail Server Name
Forthnet mailgate.forthnet.gr
Hellas On Line smtp.hol.gr
Otenet mailgate.otenet.gr
Tellas smtp.tellas.gr
Vivodi mail.vivodinet.gr

(in the example here we are using the one of Cytanet).

  • In "E-mail Address" enter the email you have been given (in the example we are creating an email account for an imaginary email: user@yourdomain.com).
  • Do not forget to enter the "Password". Please note that "Password" is case sensitive. So make sure that you have selected English language before start typing.
  • Decide if you want to check the "Remember password" field.
  • The option "Log on using Secure Password Authentication" and " My server requires authentication" should stay unchecked (at the default value).

After finishing with the above click "Ok".

Finally click "Close" to exit the "Internet Accounts" window.

Vista Mail


Setup your email account in Outlook Express 6

The following instructions describe in detail how to create and setup your email account when using Microsoft Outlook Express 6. The instructions concentrate on how to setup your email account for emails provided or web-hosted by Exarsis Business Solutions Ltd and given that internet service is provided by Internet Service Provides (ISP) in Cyprus (e.g. Cytanet, PrimeTel, NetWay, OTEnet, Avacomnet and Wave Speed) or Greece (e.g. Forthnet, Hellas on Line, Otenet, Tellas and Vovodi). Despite, the instructions are easy to follow and can be used to setup emails provided also by other web-hosting providers.

From "Start" choose "Outlook Express" (it is assumed that you have used this program before so as the Internet Connection Wizard is not initiated).

Go to "Tools" » "Account Settings …"

Outlook Express 5.0

Click "Add … " On the first button on the left and then "Mail … ".

Outlook Express 5.0

In "Display name" enter your name, your nick name, or your company’s name depending on how you want to be displayed when you send an email and then click "Next"

Outlook Express 5.0

In "E-mail address" enter your e-mail address and then click "Next" (in the example we are creating an email account for an imaginary email: user@yourdomain.com).

Outlook Express 5.0
On the next window "E-mail Server Names" you are required to complete various fields related to your server:

  • "My incoming mail server is" should be "POP3" (this is the default option).
  • In "Incoming mail" insert: mail.exarsisnet.com
  • For the “Outgoing mail (SMTP) server" you must use the Outgoing Mail Server Name of your current Internet Server Provider (ISP).
  • For Cyprus the main Internet Service Providers and the associated Outgoing Mail Server Names are:
Cyprus Internet Service Provider (ISP)
Outgoing Mail Server Name
AvacomNet
mail.avacom.net
Cytanet
mail-out.cytanet.com.cy
Logos Net
mail.logos.net.cy
NetWay
mail.netmail.com.cy
OTEnet
smtp.otenet-telecom.net
PrimeTel
mail.primehome.com
Spidernet
nautilus.spidernet.net
Wave Speed
mail-out.mailspeed.net

For Greece the main Internet Service Providers and the associated Outgoing Mail Server Names are:

Greek Internet Service Provider (ISP)
Outgoing Mail Server Name
Forthnet mailgate.forthnet.gr
Hellas On Line smtp.hol.gr
Otenet mailgate.otenet.gr
Tellas smtp.tellas.gr
Vivodi mail.vivodinet.gr

(in the example here we are using the one of Cytanet).

Outlook Express 5.0

When you complete all fields required click "Next".

On the next window "Internet Mail Logon" you are required to complete various fields related to your logon information:
  • In "Account name" enter the email you have been given (in the example we are creating an email account for an imaginary email: user@yourdomain.com).
  • Do not forget to enter the "Password". Please note that "Password" is case sensitive. So make sure that you have selected English language before start typing.
  • Decide if you want to check the "Remember password" field.
When you complete all fields required click "Next".

Outlook Express 5.0

At this stage you have completed your email setup. The process is completed when you Click " Finish".

Outlook Express 5.0

Also click "Close" to finalize.

E-mail Service


Setup your email account in Mozzila Thunderbird (Version 2.0)

The following instructions describe in detail how to create and setup your email account when using Mozzila Thunderbird. The instructions concentrate on how to setup your email account for emails provided or web-hosted by Exarsis Business Solutions Ltd and given that internet service is provided by Internet Service Provides (ISP) in Cyprus (e.g. Cytanet, PrimeTel, NetWay, OTEnet, Avacomnet and Wave Speed) or Greece (e.g. Forthnet, Hellas on Line, Otenet, Tellas and Vovodi). Despite, the instructions are easy to follow and can be used to setup emails provided also by other web-hosting providers.

From "Start" choose "Mozzila Thunderbird" (it is assumed that you have used this program before so as the Internet Connection Wizard is not initiated).

Then go to "Tools" » "Account Settings …"

Thunderbird

If this is the very first time you are using this email client, then you must define separately an outgoing server. To do so, below the block entitled "Outgoing Server (SMTP) Settings" click "Add..." which is the first button on the right.

Thunderbird

On the following window that appears entitled "SMTP Server" you are required to complete various fields related with SMTP server:

  • In "Description" enter a name that you will associate with your outgoing server settings.
  • For the “Server Name" you must use the Outgoing Mail Server Name of your current Internet Server Provider (ISP). For Cyprus the main Internet Service Providers and the associated Outgoing Mail Server Names are:
Cyprus Internet Service Provider (ISP)
Outgoing Mail Server Name
AvacomNet
mail.avacom.net
Cytanet
mail-out.cytanet.com.cy
Logos Net
mail.logos.net.cy
NetWay
mail.netmail.com.cy
OTEnet
smtp.otenet-telecom.net
PrimeTel
mail.primehome.com
Spidernet
nautilus.spidernet.net
Wave Speed
mail-out.mailspeed.net

For Greece the main Internet Service Providers and the associated Outgoing Mail Server Names are:

Greek Internet Service Provider (ISP)
Outgoing Mail Server Name
Forthnet mailgate.forthnet.gr
Hellas On Line smtp.hol.gr
Otenet mailgate.otenet.gr
Tellas smtp.tellas.gr
Vivodi mail.vivodinet.gr

(in the example here we are using the one of Cytanet).

After entering "Description" and "Server Name" click "OK".

Thunderbird

After completing your outgoing server, you must input the settings of your outgoing server (SMTP) related with your email account. To do so, click "Add Account..." which is the first button on the bottom left.

Thunderbird
On the window entitled "New Account Setup" select "Email account" (this is the default option) and click "Next".

Thunderbird

On the next window "Identify" you are required to complete various fields related to your personal data:
  • In "Your Name" enter your name, your nick name, or your company’s name depending on how you want to be displayed when you send an email.
  • In "E-mail Address" enter your e-mail address (in the example we are creating an email account for an imaginary email: user@yourdomain.com).
After completing the above click "Next".

Thunderbird

On the next window "Server Information" you are required to complete various fields related to your email account data:

  • "Account Type" should be POP3 (this is the default option).
  • In "Incoming mail server" insert: mail.exarsisnet.com
Also choose whether which you like to have a "Global Inbox" for your email accounts in case you will use Mozzila Thunderbird for additional email accounts. Also note that the outgoing server you defined earlier is by default selected to be used as your "outgoing server (SMTP)".

After completing the above click "Next".

Thunderbird

On the next window "Incoming User Name" you must enter your user name that is the email address you have been given and click "Next".

Thunderbird

On the next window "Account Name" Thunderbird allows you to give a name at this email account to be easier to identify in case you will use it for additional email accounts. After that click "Next".

Thunderbird
On the following, the account wizard summarizes the information you have put until know. If you have inserted all properly, click "Finish".

Thunderbird

The following window "Account Settings" summarizes your email accounts along with your outgoing server. Click "OK" to finalize.

Thunderbird




REFERENCES
http://www.soeasysetup.com/outlook2003_settings.php?title=Account%20Settings
http://www.soeasysetup.com/MO_2007_create.php?title=Create%20Account
http://www.soeasysetup.com/vista_settings.php?title=Account%20Settings
http://www.soeasysetup.com/outlook_express_settings.php?title=Account%20Settings
http://www.soeasysetup.com/thunderbird_settings.php?title=Account%20Settings

RHEL6 (Beta) minimal installation

SkyHi @ Thursday, June 10, 2010

I’ve just started testing the Red Hat Enterprise Linux 6 Beta, and I was really happy to see that the Minimal installation option is back at last. I know it’s always been possible to achieve something similar with RHEL5 and kickstart, or even something close enough by choosing to not install anything except the Base group in the interactive installer, but it was no longer as easy as just selecting a “Minimal” option and be done with it.


With the current trends, where virtualization is omnipresent, and automatic provisioning getting more accessible every day thanks to tools like puppet, it makes perfect sense to avoid as much complexity as possible in the OS installation step and have all changes applied once the minimal system is up and running, as those can easily be applied to both new and existing systems. Uniformity and reproducibility are both key when dealing with servers on a large scale.


So here’s a quick overview of what you get right after the system gets installed :


  • Only 665MB disk space used (tested for the x86_64 architecture).
  • Only one service listening on all network interfaces : sshd.
  • Postfix as the local MTA listening on the loopback interface only, replacing sendmail at last.
  • Rsyslogd as the syslog daemon, replacing the basic syslogd/klogd at last.
  • A few basic daemons running : udevd, auditd, dbus, hald, crond.

All this is pretty neat, and many of the other changes look very interesting too. You can read all about them in the RHEL6 Beta documentation.


There is also a rhelv6-beta-list for discussions during RHEL6’s beta cycle, and the Red Hat bugzilla for tracking all problems one might encounter.


The output of df -h :


1Filesystem            Size  Used Avail Use% Mounted on
2/dev/sda1             7.4G  665M  6.4G  10% /
3tmpfs                 499M     0  499M   0% /dev/shm

The output of ps ax (with 4 cores) :


01PID TTY      STAT   TIME COMMAND
02   1 ?        Ss     0:01 /sbin/init
03   2 ?        S      0:00 [kthreadd]
04   3 ?        S      0:00 [migration/0]
05   4 ?        S      0:00 [ksoftirqd/0]
06   5 ?        S      0:00 [watchdog/0]
07   6 ?        S      0:00 [migration/1]
08   7 ?        S      0:00 [ksoftirqd/1]
09   8 ?        S      0:00 [watchdog/1]
10   9 ?        S      0:00 [migration/2]
11  10 ?        S      0:00 [ksoftirqd/2]
12  11 ?        S      0:00 [watchdog/2]
13  12 ?        S      0:00 [migration/3]
14  13 ?        S      0:00 [ksoftirqd/3]
15  14 ?        S      0:00 [watchdog/3]
16  15 ?        S      0:00 [events/0]
17  16 ?        S      0:00 [events/1]
18  17 ?        S      0:00 [events/2]
19  18 ?        S      0:00 [events/3]
20  19 ?        S      0:00 [cpuset]
21  20 ?        S      0:00 [khelper]
22  21 ?        S      0:00 [netns]
23  22 ?        S      0:00 [async/mgr]
24  23 ?        S      0:00 [pm]
25  24 ?        S      0:00 [sync_supers]
26  25 ?        S      0:00 [bdi-default]
27  26 ?        S      0:00 [kintegrityd/0]
28  27 ?        S      0:00 [kintegrityd/1]
29  28 ?        S      0:00 [kintegrityd/2]
30  29 ?        S      0:00 [kintegrityd/3]
31  30 ?        S      0:00 [kblockd/0]
32  31 ?        S      0:00 [kblockd/1]
33  32 ?        S      0:00 [kblockd/2]
34  33 ?        S      0:00 [kblockd/3]
35  34 ?        S      0:00 [kacpid]
36  35 ?        S      0:00 [kacpi_notify]
37  36 ?        S      0:00 [kacpi_hotplug]
38  37 ?        S      0:00 [ata/0]
39  38 ?        S      0:00 [ata/1]
40  39 ?        S      0:00 [ata/2]
41  40 ?        S      0:00 [ata/3]
42  41 ?        S      0:00 [ata_aux]
43  42 ?        S      0:00 [ksuspend_usbd]
44  43 ?        S      0:00 [khubd]
45  44 ?        S      0:00 [kseriod]
46  49 ?        S      0:00 [khungtaskd]
47  50 ?        S      0:00 [kswapd0]
48  51 ?        SN     0:00 [ksmd]
49  52 ?        SN     0:00 [khugepaged]
50  53 ?        S      0:00 [aio/0]
51  54 ?        S      0:00 [aio/1]
52  55 ?        S      0:00 [aio/2]
53  56 ?        S      0:00 [aio/3]
54  57 ?        S      0:00 [crypto/0]
55  58 ?        S      0:00 [crypto/1]
56  59 ?        S      0:00 [crypto/2]
57  60 ?        S      0:00 [crypto/3]
58  66 ?        S      0:00 [kpsmoused]
59  67 ?        S      0:00 [usbhid_resumer]
60  95 ?        S      0:00 [kstriped]
61 182 ?        S      0:00 [scsi_eh_0]
62 183 ?        S      0:00 [scsi_eh_1]
63 236 ?        S      0:00 [jbd2/sda1-8]
64 237 ?        S      0:00 [ext4-dio-unwrit]
65 238 ?        S      0:00 [ext4-dio-unwrit]
66 239 ?        S      0:00 [ext4-dio-unwrit]
67 240 ?        S      0:00 [ext4-dio-unwrit]
68 246 ?        S      0:00 [flush-8:0]
69 315 ?        S<s    0:00 /sbin/udevd -d
70 580 ?        S      0:00 [kauditd]
71 704 ?        S<sl   0:00 auditd
72 720 ?        Sl     0:00 /sbin/rsyslogd -c 4
73 737 ?        Ssl    0:00 dbus-daemon --system
74 760 ?        Ss     0:00 hald
75 761 ?        S      0:00 hald-runner
76 787 ?        S      0:00 hald-addon-input: Listening on /dev/input/event3 /dev/input/event1 /dev/input/event0
77 800 ?        S      0:00 hald-addon-storage: polling /dev/sr0 (every 2 sec)
78 801 ?        S      0:00 hald-addon-acpi: listening on acpi kernel interface /proc/acpi/event
79 835 ?        Ss     0:00 /usr/sbin/sshd
80 915 ?        Ss     0:00 /usr/libexec/postfix/master
81 921 ?        S      0:00 pickup -l -t fifo -u
82 922 ?        S      0:00 qmgr -l -t fifo -u
83 925 ?        Ss     0:00 crond
84 943 ?        Ss     0:00 login -- root
85 945 tty2     Ss+    0:00 /sbin/mingetty /dev/tty2
86 947 tty3     Ss+    0:00 /sbin/mingetty /dev/tty3
87 951 tty4     Ss+    0:00 /sbin/mingetty /dev/tty4
88 953 tty5     Ss+    0:00 /sbin/mingetty /dev/tty5
89 955 ?        S<     0:00 /sbin/udevd -d
90 956 ?        S<     0:00 /sbin/udevd -d
91 957 tty6     Ss+    0:00 /sbin/mingetty /dev/tty6
92 963 ?        Sl     0:00 /usr/sbin/console-kit-daemon --no-daemon
931029 tty1     Ss     0:00 -bash
941052 tty1     R+     0:00 ps ax

If you decide to try this Beta release, here are a few tips :


  • With the minimal installation, there is no ssh client installed, but yum is available, so just run yum install openssh-clients to get ssh and sftp installed.
  • There is a currently known limitation where network interfaces aren’t configured at install time (unless performing a network-based installation). If you have DHCP working for the system, you can temporarily run dhclient eth0 to get eth0 up. Don’t forget to edit /etc/sysconfig/network-scripts/ifcfg-eth0 to make changes persistent.

Happy beta testing!


REFERENCES

http://thias.marmotte.net/2010/04/rhel6-beta-minimal-installation/