HOME  |    TRAINING  |   FREE TUTORIALS   |   JOBS
Find out more about our new RSS feed.
FREE Tutorial
LINUX - ACCESSING THE SYSTEM

CATEGORY
SEARCH OUR OTHER TUTORIALS

DESCRIPTION

This tutorial goes through the logging on and exiting process of the Linux system.


TUTORIAL TAKEN FROM COURSE : LINUX USER INTRODUCTION

FULL COURSE DETAILS

This course covers the competencies and skills identified as key to intending Linux users. The course aims are to give readers sufficient skills to allow them to run applications in a Linux environment and the associated procedures this requires, such as organising, copying, moving and deleting files. Providing hands-on experience, on completion of the course the reader will be able to: understand the concepts underlying Linux and the benefits offered; be able to log on and off the system and run their chosen applications; be able to manage their files; and be able to use a variety of commands, tools and utilities.

TO ACCESS THE FULL COURSE AND HUNDREDS OF OTHERS, CLICK HERE.


Logging On

When a terminal linked to a Linux system is switched on, a login prompt should appear on the screen.

If the login prompt does not appear

  • Press the Return key once

The prompt that appears depends on the version of Linux and the system setup. However, it will contain the following prompt as part of the display and the cursor will remain at the prompt, waiting for user entry:

login:

  • The user must then type in the correct user identification name, followed by pressing the Return key

If the user has a security password associated with the username, the password will now be prompted for:

password:

  • The user must then type in the password correctly, followed by pressing the Return key. The password will not be written to the screen, for security reasons.

If the password is entered correctly - or if there is no password for that user - the following will then appear:

Last successful login for user1: Tue May 14 10:56:40 BST 1991 on tty01
Last unsuccessful login for user1: NEVER
.
.
.
$

The $ is the prompt that will appear for ordinary users to show that the system is now awaiting commands. For the super-user (root) the prompt will be the # (or pound Sterling sign, depending on the terminal's setup). These prompts may be altered to suit the user.

Notes

1. If the username is entered incorrectly, you will be prompted for the password. Press the Return key - once - and wait for the login prompt to appear again.

2. Although most systems allow you to type ahead, do not do so for the password. Those characters entered before the password prompt appears will be written to the screen and will not be recorded as part of the password.

The Login Process

The process of logging on to a Linux system is a complex affair. The operating system stores a list of what terminals are attached. Once the system is running, it constantly monitors each terminal to see if it is switched on and if there is any response to it. Once it senses such a response, it starts the login procedure described in the section on Logging On. This is achieved by running a program called login on the terminal.

Once the program receives the user's identification name (the username), it looks through a file called /etc/passwd to find the name. Each line in /etc/passwd has the following syntax:

username:password:userid:groupid:comments:home directory:shell

For example, for user jon:

jon:*:201:50:Login for Jon Harvey:/home/jon:/usr/bin/ksh

The asterisk in the second field informs the system that there is a password. The password is held in a hidden (shadow) file, for security reasons. On older systems, if there is a password, the second field will contain a 13-character string that is an encryption of the password.

201 is the user's identification number. It is used to find out what files are owned by the user.

50 is the user's group identification number. It refers to a file called /etc/group to find the group's name.

The fifth field is just a comment field. Anything may be placed in it.

/home/jon identifies the name of the user's Home directory and will move to that directory when the login process is completed.

/usr/bin/ksh informs the login process what type of shell the user will be given, once the process is completed - in this instance, it is a Korn shell.

If the user enters the username and password (if there is one) correctly, the process then runs a series of commands stored in a file called /etc/profile. This is a Shell Script. The profile commands set up a number of parameters for all users on the system. This may include things such as the timezone, terminal type, the search-path for commands, default access permissions, etc. These form part of the user's environment - that is, the user's setup and abilities on the system.

The system then moves to the user's Home directory and searches for a file called .profile. It is very much like /etc/profile, except that it contains information for this specific user's environment. It may contain extra search-paths and a customised command-line prompt, for example. If the .profile exists, its commands are run, before the $ prompt is displayed.

Exiting from the System

To log off from a Linux system

At a $ prompt, either:

  • Type the command exit and then press the Return key

OR

  • Hold down the Ctrl key and press D

If successful, a login prompt will be displayed on the screen. You may then switch off the terminal.

Note: It is good practise to log off the system before leaving the terminal unattended. This is not only for security reasons, but also for the safety of any files that may have been in use.

Warning: Never switch off a terminal before logging off.




10 RELATED COURSES AVAILABLE
LINUX FUNDAMENTALS
This course covers the competencies and skills identified as key to intending Linux users and developers. The cou....
LINUX USER INTRODUCTION
This course covers the competencies and skills identified as key to intending Linux users. The course aims are to....
LINUX OVERVIEW
To provide technical users new to Linux with a sound appreciation of the operating system. The course provides re....
UNIX NETWORKING ADMINISTRATION INTRODUCTION
Following the UNIX International Courseware Accreditation standards, this course covers the competencies and the ....
UNIX SYSTEM ADMINISTRATION SVR3
This course covers the competencies and skills identified as key to Unix System administrators. The course intro....
 
1 RELATED JOBS AVAILABLE
UNIX, LINUX (HIGH AVAILABILITY CLUSTERS) & QNX SYSTEMS ADMIN N/WEST
Computer Futures Solutions are seeking an experienced Linux/Unix/QNX Systems Administrator with a knowledge of Ne....
CONTACT US
Saturday 22nd November 2008  © COPYRIGHT 2008 - VISUALSOFT