Welcome to Linux Knowledge Base and Tutorial
"The place where you learn linux"
Bread for the World

 Create an AccountHome | Submit News | Your Account  

Tutorial Menu
Linux Tutorial Home
Table of Contents
Up to --> Linux Tutorial

· Working with the System
· Backing-up and Restoring Files
· Interacting with the System
· Logging In
· Logging Out
· When Things Go Wrong
· Accessing Disks

Glossary
MoreInfo
Man Pages
Linux Topics
Test Your Knowledge

Site Menu
Site Map
FAQ
Copyright Info
Terms of Use
Privacy Info
Disclaimer
WorkBoard
Thanks
Donations
Advertising
Masthead / Impressum
Your Account

Communication
Feedback
Forums
Private Messages
Recommend Us
Surveys

Features
HOWTOs
News
News Archive
Submit News
Topics
User Articles
Web Links

Google
Google


The Web
linux-tutorial.info

Who's Online
There are currently, 249 guest(s) and 6 member(s) that are online.

You are an Anonymous user. You can register for free by clicking here

  
Linux Tutorial - Working with the System - Logging In
  Interacting with the System ---- Logging Out  


Logging In

Like many contexts, the name you use as a "real person" is not necessarily the way the system identifies you. With Linux you see yourself as a particular user, such as jimmo, whereas the system might see you as the number 12709. For most of the time this difference is pretty much irrelevant, as the system makes the conversion between user name and this number (the user ID or UID) itself. There are a few cases where the difference is important, which we will get to in other sections. In addition, you could make the conversion yourself to see what your user ID is, which we will also get to elsewhere.

The place where this system makes this conversion is the file /etc/passwd. You can take a look at it by typing

cat /etc/passwd

from the command line. Here you find one user per line. The details of this file can be found in the section on administering user accounts. Note that there are a number of predefined, system users in the /etc/passwd file and they do not relate to real users. For security reasons, some system administrators will delete many of these users. However, you should leave them alone unless you know what you are doing.

If you are installing Linux on your system at home, more than likely you are prompted to select a user name and password during installation. This is the account you should use for normal day-to-day work. You should not use the system administration account: root. The root account is "all powerful" and can essentially do anything to the system you can imagine. If you make a mistake, the system is unforgiving and if you are working as root, the results can be catastrophic. If you are used to Windows, this is a major difference. If you administer a Windows NT/2000 system, you are typically in the Administrators group. This means you automatically have administrator privileges, which means you can accidentally cause damage. With Linux, you generally have to make a conscious effort to switch to the root user to carry out your administrative task (which is fairly easy and safer).

if you are using a Linux system that someone else installed (perhaps at work), then an account will need to be created for you. The name of the account will more than likely be unique to your company, so there's no real need to discuss the different possibilities here. Ask your system administrator for details.

Keep in mind that both the user name and password are case sensitive. That means it will make a difference if you spell either with upper or lowercase letters. Using a lowercase letter when creating the account, then using an uppercase letter when attempting to login, will prevent you from gaining access to the system.

The process of identifying yourself to the system, whereby you provide your user name and password, is referred to as " logging in". When the system is ready for you to login you are presented with a login prompt. That is, you are prompted to login. How the login prompt looks differs among the various Linux distributions, but generally has the word "login:". Once you input your username and press the enter key, you are then prompted to input your password. This is done simply by displaying the word " password:". Typically, you end up seeing something like this:

This example shows a login across a network using telnet. (interactive)

It is possible that even after installing Linux and rebooting you do not see a login prompt. One possible reason is that the login prompt is there, but you just don't see it. Perhaps, some one turned off a monitor, the machine has gone into power saving mode, and so forth. It is also possible that your Linux system has been configured to automatically start into the GUI. If the video card was not correctly configured, you may not be able to see anything on the screen at all. In this case all is not lost because Linux provides you with something called "virtual consoles". We go into these in detail in the section on what Linux does.

Bear in mind that the system keeps track of who is currently logged into the system as well as who has logged in in the past. Since you might be held accountable for things which were done with your account, it is important to keep your password secret in order to prevent someone from gaining improper access to the system. This is the reason that when you login you see your username displayed on the screen as you type it, but not your password. It is possible that someone could be looking over your shoulder and sees your password as you type.

Once you login to system it starts your "login shell". In essence, a shell is a command line interpreter, meaning that the shell interprets and executes the commands you enter. If you are familiar with either DOS or Windows, the command prompt is basically the same thing as a Linux shell, in that it is also a command line interpreter. The shell indicates that it is ready to accept a new command by displaying a shell prompt or command prompt. Typical prompts are the #,%, or $. It is also possible that your system administrator has defined a different prompt. It is common to include your username, your current directory, the system you are working on or other pieces of information. You can find more details about how the system perceives the shell in the section on processes in the operating system introduction.

One of the first things that you should do when you login to a system where someone else created the user account for you is to change your password. Obviously, the person creating your account will have to know your password in order to be able to tell you what it is. Your password should be something which is easy for you to remember (so you do not need to write it down), but extremely difficult for someone else to guess. What constitutes good and bad passwords is something we get into in the section on security.

The Linux command which is used to change your password is called passwd, which you can start from any shell prompt. As a security feature, the passwd program will first prompt you for your old password before allowing you to change to a new one. This is to ensure that you are the person the system thinks you are. Perhaps you have left your desk for a moment and someone wants to play a trick on you and changes your password.

The exception is the root account. The system administrator must have the ability to change any password and could not do this in every case if the old password was always required. For example, you may have forgotten your password and need the administrator to change it for you. It would do no good to ask the administrator to change your password if he had to know it first. This is one reason why you need to be careful when you are working with the root user account.

 Previous Page
Interacting with the System
  Back to Top
Table of Contents
Next Page 
Logging Out


MoreInfo

Test Your Knowledge

User Comments:


You can only add comments if you are logged in.

Copyright 2002-2009 by James Mohr. Licensed under modified GNU Free Documentation License (Portions of this material originally published by Prentice Hall, Pearson Education, Inc). See here for details. All rights reserved.
  
Show your Support for the Linux Tutorial

Purchase one of the products from our new online shop. For each product you purchase, the Linux Tutorial gets a portion of the proceeds to help keep us going.


Login
Nickname

Password

Security Code
Security Code
Type Security Code


Don't have an account yet? You can create one. As a registered user you have some advantages like theme manager, comments configuration and post comments with your name.

Help if you can!


Amazon Wish List

Did You Know?
You can help in many different ways.


Friends



Tell a Friend About Us

Bookmark and Share



Web site powered by PHP-Nuke

Is this information useful? At the very least you can help by spreading the word to your favorite newsgroups, mailing lists and forums.
All logos and trademarks in this site are property of their respective owner. The comments are property of their posters. Articles are the property of their respective owners. Unless otherwise stated in the body of the article, article content (C) 1994-2013 by James Mohr. All rights reserved. The stylized page/paper, as well as the terms "The Linux Tutorial", "The Linux Server Tutorial", "The Linux Knowledge Base and Tutorial" and "The place where you learn Linux" are service marks of James Mohr. All rights reserved.
The Linux Knowledge Base and Tutorial may contain links to sites on the Internet, which are owned and operated by third parties. The Linux Tutorial is not responsible for the content of any such third-party site. By viewing/utilizing this web site, you have agreed to our disclaimer, terms of use and privacy policy. Use of automated download software ("harvesters") such as wget, httrack, etc. causes the site to quickly exceed its bandwidth limitation and are therefore expressly prohibited. For more details on this, take a look here

PHP-Nuke Copyright © 2004 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
Page Generation: 0.06 Seconds