Friday, December 4, 2009

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.

No comments:

Post a Comment

Privacy policy

At http://linux4fresher.blogspot.com/, the privacy of our visitors is of extreme importance to us. This privacy policy document outlines the types of personal information is received and collected by http://linux4fresher.blogspot.com/ and how it is used.

Log Files
Like many other Web sites, http://linux4fresher.blogspot.com/ makes use of log files. The information inside the log files includes internet protocol ( IP ) addresses, type of browser, Internet Service Provider ( ISP ), date/time stamp, referring/exit pages, and number of clicks to analyze trends, administer the site, track user’s movement around the site, and gather demographic information. IP addresses, and other such information are not linked to any information that is personally identifiable.

Cookies and Web Beacons
http://linux4fresher.blogspot.com/ does use cookies to store information about visitors preferences, record user-specific information on which pages the user access or visit, customize Web page content based on visitors browser type or other information that the visitor sends via their browser.

DoubleClick DART Cookie
Google, as a third party vendor, uses cookies to serve ads on http://linux4fresher.blogspot.com/.
Google's use of the DART cookie enables it to serve ads to users based on their visit to http://linux4fresher.blogspot.com/ and other sites on the Internet.
Users may opt out of the use of the DART cookie by visiting the Google ad and content network privacy policy at the following URL - http://www.google.com/privacy_ads.html

Some of our advertising partners may use cookies and web beacons on our site. Our advertising partners include ....
Google Adsense


These third-party ad servers or ad networks use technology to the advertisements and links that appear on http://linux4fresher.blogspot.com/ send directly to your browsers. They automatically receive your IP address when this occurs. Other technologies ( such as cookies, JavaScript, or Web Beacons ) may also be used by the third-party ad networks to measure the effectiveness of their advertisements and / or to personalize the advertising content that you see.

http://linux4fresher.blogspot.com/ has no access to or control over these cookies that are used by third-party advertisers.

You should consult the respective privacy policies of these third-party ad servers for more detailed information on their practices as well as for instructions about how to opt-out of certain practices. http://linux4fresher.blogspot.com/'s privacy policy does not apply to, and we cannot control the activities of, such other advertisers or web sites.

If you wish to disable cookies, you may do so through your individual browser options. More detailed information about cookie management with specific web browsers can be found at the browsers' respective websites.

Disclaimer :
All the pictures and material on this blog are assumed to be taken from public domain. The copyright (if any) of these pictures and articles belongs to their orginal publisher / photographer / copyright holder as the case may be. We claim no ownership to them. If anybody has reservations / objection on the use of these material/images or find any copy-righted material on this site, then please e-mail us with the details of copy right etc. In case, the objections is found to be appropriate, the offensive material / pictures will be removed from this site immediately.