1 day 2 logging in, passwords, man, talk, write. 2 logging in unix is a multi user system –many...

30
1 Day 2 Logging in, Passwords, Man, talk, write

Upload: loren-stewart

Post on 06-Jan-2018

221 views

Category:

Documents


0 download

DESCRIPTION

3 Telnet Application To connect to a UNIX machine from a MS- Windows machine, you will need a telnet program. –All versions of Windows have a built in program called “telnet”. You can run it by clicking on “Start” – “Run” and type telnet. However, it does not support SSH, and is frequently confused by the terminal emulation. –Putty.exe is another telnet application. We will be using it in this class.

TRANSCRIPT

Page 1: 1 Day 2 Logging in, Passwords, Man, talk, write. 2 Logging in Unix is a multi user system –Many people can be using it at the same time. –Connections

1

Day 2

Logging in,Passwords,

Man, talk, write

Page 2: 1 Day 2 Logging in, Passwords, Man, talk, write. 2 Logging in Unix is a multi user system –Many people can be using it at the same time. –Connections

2

Logging in• Unix is a multi user system

– Many people can be using it at the same time.– Connections are made through a text connection

• telnet– A simple text based window which allows you to type commands

and see the response.

• ssh– Secure shell. Makes the text typed between you and the UNIX

machine unreadable to anyone on the Internet.

• ftp– Allows you to transfer files from your machine to the UNIX

machine and back again.

Page 3: 1 Day 2 Logging in, Passwords, Man, talk, write. 2 Logging in Unix is a multi user system –Many people can be using it at the same time. –Connections

3

Telnet Application• To connect to a UNIX machine from a MS-

Windows machine, you will need a telnet program.– All versions of Windows have a built in program

called “telnet”. You can run it by clicking on “Start” – “Run” and type telnet.

• However, it does not support SSH, and is frequently confused by the terminal emulation.

– Putty.exe is another telnet application.• We will be using it in this class.

Page 4: 1 Day 2 Logging in, Passwords, Man, talk, write. 2 Logging in Unix is a multi user system –Many people can be using it at the same time. –Connections

4

Putty• Putty is a free piece of software.

– Available from the class web site:• http://newcollege.clayton.edu/ITSK1601

– Runs on any version of windows.

Page 5: 1 Day 2 Logging in, Passwords, Man, talk, write. 2 Logging in Unix is a multi user system –Many people can be using it at the same time. –Connections

5

Logging in• The unix machine we will be using is called

– kahuna.clayton.edu– It does not accept regular “telnet” connections. You

must connect via “SSH”– You will need your username and password.– Username: First part of email address.

• E.g. [email protected] would – log in with csu1111

– Password: Social security number• E.g. 111223333

Page 6: 1 Day 2 Logging in, Passwords, Man, talk, write. 2 Logging in Unix is a multi user system –Many people can be using it at the same time. –Connections

6

Start Putty

Page 7: 1 Day 2 Logging in, Passwords, Man, talk, write. 2 Logging in Unix is a multi user system –Many people can be using it at the same time. –Connections

7

Login

Page 8: 1 Day 2 Logging in, Passwords, Man, talk, write. 2 Logging in Unix is a multi user system –Many people can be using it at the same time. –Connections

8

Logged in

Page 9: 1 Day 2 Logging in, Passwords, Man, talk, write. 2 Logging in Unix is a multi user system –Many people can be using it at the same time. –Connections

9

Exercise:• Download putty from our class web site:

– http://newcollege.clayton.edu/ITSK1601• Log into kahuna.clayton.edu with your username

and password– When you get done, help your partner.– If you are both done, type the following command:– tetris-bsd

• Learn to play and have fun for a few minutes while we get everyone logged in.

Page 10: 1 Day 2 Logging in, Passwords, Man, talk, write. 2 Logging in Unix is a multi user system –Many people can be using it at the same time. –Connections

10

Passwords• Passwords help us prove to the machine that we

are who we say we are.– Often a UNIX machine performs an important

function. Its important to know if someone has authorization to do what he/she says to

– Each user should keep their password very secure• If someone knew your password here they could:

– Send email pretending it came from you– Read your email on kahuna– Get to any of your files, possibly steal your homework

Page 11: 1 Day 2 Logging in, Passwords, Man, talk, write. 2 Logging in Unix is a multi user system –Many people can be using it at the same time. –Connections

11

Good/Bad passwords• You should choose a password which would be

hard for someone to guess.– Bad ideas:

• Social Security number, Phone number, Date of birth, Name, parents names.

• Any word in any language dictionary– Good ideas:

• User CAPITAL letters and numbers as much as possible• User special characters like: []{}-_=+!@#$%^&*()?/><‘:’”• Length is important

Page 12: 1 Day 2 Logging in, Passwords, Man, talk, write. 2 Logging in Unix is a multi user system –Many people can be using it at the same time. –Connections

12

Examples• Good passwords:

– First letter of each word in a rhyme/sentence• Jajwuahtfapow [Jack and Jill went up a hill to fetch a pail of

water]– A group of words together with numbers substituted

for letters• B4its0Ver [Before it’s over]

• Just be sure you will remember the password later. It sucks to have to go to the sysadmin and ask for your password to be reset.

Page 13: 1 Day 2 Logging in, Passwords, Man, talk, write. 2 Logging in Unix is a multi user system –Many people can be using it at the same time. –Connections

13

Changing your password• Type the command

– passwd• It will prompt you to enter your OLD password

again, and then your new password twice.

• You should change your password approx every 6 months, and anytime you think it has been compromised.

Page 14: 1 Day 2 Logging in, Passwords, Man, talk, write. 2 Logging in Unix is a multi user system –Many people can be using it at the same time. –Connections

14

Who is root?• There is one special account on every UNIX

machine:– root

• Anyone logged in as root, has permission to do anything on the system. – They can change passwords, view any file, setup

hardware.• The root password for a system must be kept very

secure.

Page 15: 1 Day 2 Logging in, Passwords, Man, talk, write. 2 Logging in Unix is a multi user system –Many people can be using it at the same time. –Connections

15

What if you forget your password?• There are no back doors in UNIX.• Nobody can tell you what your password was, not

even the system administrator• The root user can type:

– passwd enda• Since it is root requesting this, they will not be

asked for the old password. So they can set it to some new password.

Page 16: 1 Day 2 Logging in, Passwords, Man, talk, write. 2 Logging in Unix is a multi user system –Many people can be using it at the same time. –Connections

16

Oops…who do I get out?• If you type any command and don’t know how to

get out try:– Hit q– Hold down the control key and hit c

• One of those will work 99% of the time. For the other 1% try:– Hold down the control key and hit z– Type:

• kill %1– Close the window you have and log in again.

Page 17: 1 Day 2 Logging in, Passwords, Man, talk, write. 2 Logging in Unix is a multi user system –Many people can be using it at the same time. –Connections

17

Communicating in UNIX• UNIX offers the following:

– Email – Real time messages– Chat sessions

Page 18: 1 Day 2 Logging in, Passwords, Man, talk, write. 2 Logging in Unix is a multi user system –Many people can be using it at the same time. –Connections

18

E-mail• Sending an email:

– mail [email protected]– You will be prompted for a subject.– Type the message. When you are done, hit enter once

then press the period “.” and then press enter again.

– If you type mail by itself without an email address it will show you what is in your mail box.

Page 19: 1 Day 2 Logging in, Passwords, Man, talk, write. 2 Logging in Unix is a multi user system –Many people can be using it at the same time. –Connections

19

Pine• The first UNIX application we are going to look

at is called PINE (Program for Internet News and Email)

• This is one of the many UNIX mail programs• Easy to use, has menus at the bottom of the screen

which tells you the options.• ^C would mean “hold down the control key and

hit C”

Page 20: 1 Day 2 Logging in, Passwords, Man, talk, write. 2 Logging in Unix is a multi user system –Many people can be using it at the same time. –Connections

20

Pine basics• Sending a message

– Enter pine and hit C– Type the message, hit Control X to send.

• Viewing mail– Enter pine and hit L– Use the arrows to highlight “INBOX” click enter.– Select the message you want to see with the arrow

keys and hit enter to view it.– D will mark the message for deletion, when you exit it

will ask if you want them deleted.

Page 21: 1 Day 2 Logging in, Passwords, Man, talk, write. 2 Logging in Unix is a multi user system –Many people can be using it at the same time. –Connections

21

Exercise:• Send your partner a mail message on kahuna:

– Their address is: • [email protected]

• Each of you should check your mail on Kahuna and verify you got the message.

Page 22: 1 Day 2 Logging in, Passwords, Man, talk, write. 2 Logging in Unix is a multi user system –Many people can be using it at the same time. –Connections

22

write• You can send someone who is logged in on your

machine a real time message– write enda– Then type what you want to say.– When you are done, hit Control D

Page 23: 1 Day 2 Logging in, Passwords, Man, talk, write. 2 Logging in Unix is a multi user system –Many people can be using it at the same time. –Connections

23

Exercise• Send your partner a message using write• Remember to hold down the control key and hit D

when you are done.

Page 24: 1 Day 2 Logging in, Passwords, Man, talk, write. 2 Logging in Unix is a multi user system –Many people can be using it at the same time. –Connections

24

talk• If you want a full chat session, then “talk” is what

your looking for:– talk enda

• This would send me a message indicating that you want to talk to me. If I want to respond, I would answer with:– talk bob

• Now we have a window which I can see what you type, and you can see what I type.

Page 25: 1 Day 2 Logging in, Passwords, Man, talk, write. 2 Logging in Unix is a multi user system –Many people can be using it at the same time. –Connections

25

Talking to many at once• If you need to talk to 3 or more people at once,

talk cannot do that. – There is a program called “ytalk” which can do that.– ytalk enda– Again, to respond I must answer with “ytalk bob”– You can add additional people with by hitting the

escape key once, and then pressing a• You will be prompted for the other person to add.

Page 26: 1 Day 2 Logging in, Passwords, Man, talk, write. 2 Logging in Unix is a multi user system –Many people can be using it at the same time. –Connections

26

Feeling Anti-Social?• Just incase you are feeling anti-social, or incase

you are actually trying to get some work done.• You can prevent people from writing to you or

talking to you with:– mesg n

• This can be reversed with:– mesg y

• Each time you log in, you must run this to stop messages.

Page 27: 1 Day 2 Logging in, Passwords, Man, talk, write. 2 Logging in Unix is a multi user system –Many people can be using it at the same time. –Connections

27

Exercise• Get a talk session going with a few people around

you.– Talk about how wonderful UNIX is.– Be sure to add more than 2 people.

Page 28: 1 Day 2 Logging in, Passwords, Man, talk, write. 2 Logging in Unix is a multi user system –Many people can be using it at the same time. –Connections

28

Oh man!• What if you don’t know how to use one of these

programs?– Read the online manual.

• man talk• man ytalk• man pine• man write• man man

– Sometimes cryptic, but can give you a hint as to what options are supported, and how to use them.

Page 29: 1 Day 2 Logging in, Passwords, Man, talk, write. 2 Logging in Unix is a multi user system –Many people can be using it at the same time. –Connections

29

Manual Sections• Sometimes the same command can have 2 or

more meanings:– Write

• As we just saw, this allows you to send a message to someone else who is logged in.

• In many programming languages including C, write means put something on the screen

– To specify that you want the programming language version you would type:

» man 2 write

– This means you want section 2 of the manual.

Page 30: 1 Day 2 Logging in, Passwords, Man, talk, write. 2 Logging in Unix is a multi user system –Many people can be using it at the same time. –Connections

30

Logging out• To get out of a UNIX system type:

– exit