Unformatted text preview:

Getting StartedGetting started: logging in and outLogging in (1)Logging in (2)Logging in (3)Changing your password (1)Changing your password (2)About passwordsLogging outLogging in using SSHThe SSH connectionSSH: step 1SSH: step 2SSH: step 3SSH: step 4Logging in at the consoleLogging in at the console (2)Slide 18Getting help in UNIXThe man commandAmbiguityOrganization of manual pagesDiscovering section numbersMore about man page organizationFinding the man page for the passwd fileHow to use a man pageMore about the man pageSearching for commandsMan page optionsMan page options (2)Using grep to Help SearchingMore about grepUsing grep to help searchingOther ways to get helpExploring a Command: whoMore about whoAnother Form of who: wThings to tryCopyright 2006 Stewart WeissCopyright 2006 Stewart WeissGetting StartedGetting StartedLogging In and Out2 CSci 132 Practical UNIX with PerlGetting started: logging in and outEvery user in UNIX has a username (also called login name or account name) and a password. Logging in requires that you enter your username and password. Your username and initial password are given to you by the system administrator.3 CSci 132 Practical UNIX with PerlLogging in from a terminal window (1)You have to identify yourself by typing your username at the login prompt:login: and then your password at the password prompt:login: stewartPassword:When you type the password, you won't see the cursor move until you press the Enter key.4 CSci 132 Practical UNIX with PerlLogging in from a terminal window (2)If you enter either your username or password incorrectly, you will see this message:login incorrectlogin:and you will have to repeat the previous steps. Usernames are case-sensitive!! You have to type them exactly as they are given to you.5 CSci 132 Practical UNIX with PerlLogging in from a terminal window (3)If you are successful, you will see a message like this: The '$' is called the shell prompt. It is the indication by UNIX that it is waiting for you to enter a command.Last login: Mon Jun 26 21:32:48You have new mail.$6 CSci 132 Practical UNIX with PerlChanging your password (1)When you login for the first time, you must change your password. No exceptions. Type the command 'passwd' at the prompt. Note that it is 'password' without the 'or'.You will be asked to enter the current password and then asked for the new password, twice. If you make any mistakes, the password will not be changed.7 CSci 132 Practical UNIX with PerlChanging your password (2)$ passwdChanging password for user sweiss.(current) UNIX password: you type hereNew UNIX password: you type hereRetype new UNIX password: you type herepasswd: password has been changed.$ The session will look something like this:8 CSci 132 Practical UNIX with PerlAbout passwordsYour password must be difficult to "crack". Some rules to follow:Must be at least 8 characters longMust contain a digit, an uppercase and lowercase letterMust contain punctuation (period, comma, hyphen, etc)Must not be a word in a dictionary or encyclopediaShould not be guessable (your birthday, ss#, etc)9 CSci 132 Practical UNIX with PerlLogging outBefore going any further, try logging out.To logout, type "logout" at the shell prompt. This is the safest way to logout:You can also type "exit". They work the same in a login shell. (Soon you will learn what a login shell is.) $ logout10 CSci 132 Practical UNIX with PerlLogging in using SSHTo login to a UNIX machine over a network, you usually have to use SSH. SSH is a protocol that encrypts what you type on your "local" computer, sends the encrypted text to the "remote" computer, and decrypts it there.The remote computer has a program called an SSH server. Your computer has an SSH client.SSH stands for "secure shell."11 CSci 132 Practical UNIX with PerlThe SSH connection Conceptually it looks like this::12 CSci 132 Practical UNIX with PerlSSH: step 1You start up your SSH client and see a window something like the one on the right (which is what you see using the Windows SSH client.)13 CSci 132 Practical UNIX with PerlSSH: step 2Find the button that connects to a server. It is usually called Connect or something similar. You must then enter the full name of the host (e.g. eniac.cs.hunter.cuny.edu ) and your login name.14 CSci 132 Practical UNIX with PerlSSH: step 3If you enter the correct hostname and login name, you will then see a window in which you can enter your password. It might look like the one below.15 CSci 132 Practical UNIX with PerlSSH: step 4If the password is correct, you will then be at the command prompt, as shown on the right.16 CSci 132 Practical UNIX with PerlLogging in at the consoleIf you are sitting at a Unix machine, the login procedure will be slightly different. You will see a screen something like this one.17 CSci 132 Practical UNIX with PerlLogging in at the console (2)You just enter your login name, after which you will be prompted to enter your password.When you sit at the machine, the monitor is called a console. After you login, you will have a desktop environment like the one found in Windows and Macintosh computers.18 CSci 132 Practical UNIX with PerlOpening a “Terminal” WindowIf you are sitting at the console, to open a terminal window, you need to start a terminal application.On most versions of Linux, there will be an Applications menu, and within that menu, a sub-menu named System Tools. The System Tools menu usually has a Terminal application. Find it and start it up. Then you can continue with the next slide.19 CSci 132 Practical UNIX with PerlGetting help in UNIXUNIX provides a complete and extensive set of on-line documentation to help you find and understand the commands that you need. You only need to remember a three-letter command: man, which is short for "manual."The man pages are a collection of individual pages that describe all of the commands, system files, kernel functions, and library functions on your UNIX system.20 CSci 132 Practical UNIX with PerlThe man commandWithin the terminal, the man command displays the manual page that you specify. For example,man passwdwill display the passwd man page, which describes how to use the passwd command.man man displays the man page for the man command itself, and is the best place to start learning about UNIX.21 CSci 132 Practical UNIX with PerlAmbiguity Often, the same name is used for many purposes!For example, passwd is a shell command, but passwd is also the name of


View Full Document

CUNY CSCI 132 - Logging In and Out

Download Logging In and Out
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Logging In and Out and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Logging In and Out 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?