Friday, December 18, 2009

SCP How to.

To copy a file from a remote computer to the computer you are working at, you type:

scp user@remote-computer:/remote/path/remote-file /local/path/local-file

You will then be prompted for the user's password on the remote computer. After you enter it, the file will be copied.

Friday, December 11, 2009

Want to send and receive mail via telnet?

Want to send and receive mail via telnet? This can be a very good troubleshooting tool.

To send mail:

Bring up telnet

Type "open (your mail server here) 25"
This will connect to your mail server on port 25 (the smtp port) SMTP stands for Simple Mail Transfer Protocol.


Type "HELO (site you want the mail server to record you connecting from...this can be anything you want)" Some mail servers do not require this line.


If you want the mail server/receiver of the email to know who this email is from type "MAIL FROM: yourname@yourmaildomain.com"

(replace this with whatever you want)" **Note: Some mail servers require this line...if you get an error that blank sender is not allowed than use this command.


To tell the mail server where you want your mail to go to type

"RCPT TO: (where you want the mail to go)".

**Warning: If you incorrectly enter the destination of the mail it will be sent to the postmaster of the receiving server (usually the mail server will give you an error informing you that the user does not exist and that this message will be sent to the postmaster).

Then type

"DATA"


The mail server will give you specific instructions on how to terminate the message (usually a "." on a line by itself) you must use this or else you will not be able to send the message!

Type your message


Then terminate the message with the appropriate character
At this point you generally type "QUIT" to disconnect as your message is sent.


To receive email using telnet in windows do the following (this is the same for linux...except for the directions to open telnet and connect...but if you use linux you should be smart enough to figure it out yourself).

If you think that something isn't working look at the notes first.

Go to the start menu and hit run
Type in "telnet". This will bring up a window that will display microsoft telnet etc.
Type in "open (name of your mail server here) 110"
This should connect to your mail server if it uses POP (Post office protocol) on port 110. For those of you who use yahoo this won't work (though you can send mail)
Now type "USER (your username here)"
When asked for a password type "PASS (your password here)"

*** As a side not this is where your user name and password go accross the internet in clear text as will the rest of your message ****


It should give you a little mailbox stat message if you typed everything in correctly.

To retrieve the status of your mailbox type "STAT"

This first number will be the number of messages you have and the second number will be the amount of space they take up.

Now type "LIST" to the list the messages

It will list the message numbers followed by how large they are.

To retrieve a message type "RETR (message number)"
To delete a message type "DELE (message number)"
To quit type "QUIT"


You may quit at any time during this process by typing "QUIT". Also using the escape character or control-c may work. Note: this applies to my mail server and mail servers that I've used but may not apply to all. For example, Netscape will submit an "AUTH" command after the username is entered and my mail server will return an error message. It will then try the "PASS" command and this will work.

Add a route to the Windows routing table.

A route is used to describe the gateway IP address and network interface to use when sending packets to a network. The routing table on a host computer contains a list of destination networks and the routes to those networks. This article describes adding entries to this routing table that will be deleted on reboot.

First we are going to add a route to the 192.168.10.1/24 network through the gateway of 10.10.0.1 to do this we would use the following command

Start->Run->CMD->Enter

route add 192.168.10.1 mask 255.255.255.0 10.10.0.1

This is the easiest way to add a temporary route. As a note the subnet mask is optional but if you don't specify one it is defaulted to 255.255.255.255. This says that the target is a single ip and not a subnet.

You can also add a routing metric to the route command. This could be refered to a a cost for the route. If a routing table contains multiple routes to the same destination, the cheapest route or lowest metric will be used.
To add a route with a metric of 10 to the host 192.168.10.2 through the gateway of 10.10.0.1 we would use the following command

Start->Run->CMD->Enter

route add 192.168.10.2 10.10.0.1 metric 10

Notice that we didn't specify a subnet mask so here we let it default to 255.255.255.255

If multiple nics are available to route to the same destination, the interface to use can be specified in the route command. The interface number associated with the interface is shown using the route print command. Windows will automatically pick which interface is the best for the given route. If you want to specify which interface to use , the if {interface} parameter can be used. To specify that the previous route example should use interface 2, this is identified with the hexadecimal value 0x2 from the route print command, use the following command:

Start->Run->CMD->Enter

route add 192.168.10.2 10.10.0.1 metric 10 if 2

Thursday, December 10, 2009

Windows could not start

Windows could not start because the following file is missing or corrupt:
\winnt\system\config\system

If a user gets this message it maybe be possible to repair the system with a Windows 200 Boot disk.

1) Boot the computer from the Windows 2000 CD-Rom
2) When it loads Choose Repair (Hit R)
3) The choose Console Mode (Hit C)
4) You will need to tell it the Windows 2000 installation you want to edit (Usually 1)
5) The you need to use the Administrator Password
6) At the Prompt type ren system system.bak (This renames the System file)
7) Then type ren system.alt system ( this renames the System.alt back up file to the correct name.
8) Type exit & it will reboot the computer


This usually works about 80% of the time for me..

Friday, December 4, 2009

CronTab Basics

CronTab Basics

Commands
__________
export EDITOR=vi ;to specify a editor to open crontab file.

crontab -e Edit your crontab file, or create one if it doesn't already exist.
crontab -l Display your crontab file.
crontab -r Remove your crontab file.
crontab -v Display the last time you edited your crontab file. (This option is only available on a few systems.)


Crontab file
___________
syntax :-
A crontab file has five fields for specifying day , date and time followed by the command to be run at that interval.

* * * * * command to be executed
- - - - -
| | | | |
| | | | +----- day of week (1 - 7) (monday = 1)
| | | +------- month (1 - 12)
| | +--------- day of month (1 - 31)
| +----------- hour (0 - 23)
+------------- min (0 - 59)


* Indicates all possible values as in braces for that column.



Here is an Example
_______

A line in crontab file like below removes the tmp files from /home/user/tmp each day at 6:30 PM.

30 18 * * * rm /home/user/tmp/*
| | | | |
| | | | +-----------------------day of week (1 - 7) (Monday = 1)
| | | +-------------------------month (1 - 12)
| | +----------------------------day of month (1 - 31)
| +-------------------------------hour (0 - 23)
+---------------------------------- min (0 - 59)

Thursday, December 3, 2009

Show hidden files in finder

Ok you need to see your hidden files in finder. Here is how to do so.

1. open a terminal window by going to finder then applications select Utilities open terminal
2. type the following command
a. defaults write com.apple.finder AppleShowAllFiles TRUE
b. killall Finder

Now to rehide your hidden files you will need to change the TRUE and the end of step 2a to False.
The steps go as so.

1. open a terminal window by going to finder then applications select Utilities open terminal
2. type the following command
a. defaults write com.apple.finder AppleShowAllFiles False
b. killall Finder

Wednesday, December 2, 2009

What uses that Port?

Have you ever needed to know what port a particular service uses?

Well the answer is in most cases right there on your pc.


Windows XP check out this file:
C:\WINDOWS\SYSTEM32\DRIVERS\ETC\SERVICES
You can open this file in notepad.

Linux check out this file:
/etc/services
You can cat this file or open it with vi.

Monday, November 30, 2009

Burn an ISO image using my Mac.

Ok so and I need to burn an .iso image to cd how do i do this on my Mac?
Well it is very simple and can be accomplished by following these 5 steps.

1. Insert a blank disc.
2. Start Disk Utility.
3. From the File menu, choose Open Disk Image and select the ISO you need to burn.
4. In the list of volumes, you will now see an item representing the ISO file. Select it.
5. Click the Burn button and follow the prompts.

There you go told you it was simple.

Tuesday, August 25, 2009

Riley

You know I am a grown man. Older than I would like to admit but not to old. Last night my dog got out of his kennel and managed to leave our neighbor hood. As it goes our subdivision is pretty secluded. Not really close to any major roads so no need to worry right. Well unfortunately that is a very wrong statement.

Riley was struck by a vehicle last night and lost his life..... What else can you say? My little buddy. My hunting companion gone just like that. I find my self with a ton of different emotion. I don't know what to think or say. I don't cope well with things like this that you can't fix.

Thursday, June 11, 2009

It's been a while

Wow it has really been a while since I have taken the time to post anything on my Blog maybe I can get better at keeping it up2date with whats going on.