Complete Idiot's Guide to Linux:Users, Groups, and Passwords
function GetCookie (name)
{
var arg = name + "=";
var alen = arg.length;
var clen = document.cookie.length;
var i = 0;
while (i < clen)
{
var j = i + alen;
if (document.cookie.substring(i, j) == arg) {
var end = document.cookie.indexOf (";", j);
if (end == -1)
end = document.cookie.length;
return unescape(document.cookie.substring(j, end));
}
i = document.cookie.indexOf(" ", i) + 1;
if (i == 0) break;
}
return null;
}
var m1='';
var gifstr=GetCookie("UsrType");
if((gifstr!=0 ) && (gifstr!=null)) { m2=gifstr; }
document.write(m1+m2+m3);
Keyword
Title
Author
ISBN
Publisher
Imprint
Brief
Full
Advanced Search
Search Tips
Please Select
-----------
Components
Content Mgt
Certification
Databases
Enterprise Mgt
Fun/Games
Groupware
Hardware
IBM Redbooks
Intranet Dev
Middleware
Multimedia
Networks
OS
Prod Apps
Programming
Security
UI
Web Services
Webmaster
Y2K
-----------
New Titles
-----------
Free Archive
To access the contents, click the chapter and section titles.
Complete Idiot's Guide to Linux
(Publisher: Macmillan Computer Publishing)
Author(s): Manuel Ricart
ISBN: 078971826x
Publication Date: 12/22/98
function isIE4()
{
return( navigator.appName.indexOf("Microsoft") != -1 && (navigator.appVersion.charAt(0)=='4') );
}
function bookMarkit()
{
var url="../../../../../www.itknowledge.com/PSUser/EWBookMarks.html@url="+window.location+"&isbn=0";
parent.location.href=url;
//var win = window.open(url,"myitk");
//if(!isIE4())
// win.focus();
}
Search this book:
Previous
Table of Contents
Next
Part 3Essential System Tasks Under Linux
Youve checked out KDE, and youve gotten down and dirty with the command line. Whats left to do? With Linux, just as with everything else in life, there are those things you just have to do. Dont worry, its not nearly as bad as it soundsyouve got the information in Part 3 to help you along the way. These chapters walk you through backing up your box, installing software, monitoring your system, and you even get to meet LISA. Theres even a chapter for the truly adventurous on how to customize your Linux system. Theres your heads up, now lets get cracking!
Chapter 18Users, Groups, and Passwords
In This Chapter
Adding Users
Modifying Users: usermod
Deleting Users: userdel
Adding, Modifying, and Removing Groups
Users and Passwords
Linux and Shadow Passwords
If you have a standalone system, you probably dont have to worry much about managing multiple users and accounts. Its also a strong possibility that youll continue to use the same account you created when you installed the system.
If you are in a networked environment, however, you might want to grant access to other users to your system. Therefore, the topics in this chapter are of moderate importance to you. If you are administering a system with multiple accounts, you should make certain to read this chapter and understand what this is all about. For further help, be certain to refer to the Linux System Administrators Guide, discussed in Chapter 15, Help Please.
The entire reason for logins and passwords is for securitys sake. In UNIX, we want to protect our work from others. And unlike a Windows 95/98/NTbased PC, UNIX systems can support a great number of concurrent users. In other words, multiple users can work on and make use of your computer and its services at the same time you are working on it through the network or some other attached terminal. If you havent read Chapter 16, Permissions: Protecting and Sharing your Work, it is probably a good time for you to do this.
Adding, removing, and managing users is an administration chore. Luckily, nowadays this chore is fairly automated, as the tools are more flexible and are able to take care of some of the many steps. In the earlier days, you had to add, remove, and manage users by hand, maybe with the help of a custom script that you developed yourself.
Although the tools automate the process somewhat, it is useful to know what goes on behind the scenes. At the center of these activities are /etc/passwd, /etc/shadow, and /etc/group. These files are really system databases that contain user and group information. The /etc/passwd file stores the following:
A list of usernames (logins)
A User ID (UID) number to represent the login
A Group ID (GID) that represents the default group membership for a login
Optional information about the user such as phone number, office, and so on
The location of the home directories
The users default shell
The group database, /etc/group, stores the following:
A list of user groups
A password for the group (group names could be enabled to work as an account, although public use accounts of this type are usually a really bad idea)
The GID number
A list of all the usernames that belong to the group separated by commas
The shadow passwords file, /etc/shadow, readable only by root, stores an encrypted password for each login
Lets take a look at what you would need to do if you werent using tools. When you add a user, you need to enter the appropriate information into the /etc/passwd and /etc/group files. You also have to create the users home directory, copy all the necessary initialization files to the new home directory (rc files like .bashrc, .login, .logout, and .profile), create a mailbox for the user, and, if the user belongs to some sort of email alias, add the alias. It is crucial that you keep your UIDs and GIDs straight and that they are not duplicated. After building all this, you have to verify that directories you create for the user, like the users home directory, have the appropriate permissions and so on. In the end, it is a lot of tedious work, especially if you need to add more than a few users!
Luckily, nowadays UNIX tools manage most of this tedium. Some tools do a better job than others. Which one you use for your administration will depend on your choice and on the number of users that you need to manage. Some of the tools, such as useradd, are mediocre, whereas some, such as adduser, are fantastic!
The useradd and adduser tools are installed in the /usr/sbin directory. Your shell should be able to see these programs if you are logged in as root. Managing user accounts is a privileged role for the superuser.
Previous
Table of Contents
Next
Products | Contact Us | About Us | Privacy | Ad Info | Home
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is prohibited.
Wyszukiwarka
Podobne podstrony:
logika 205205 06slub;wesele;suknie,kategoria,205205 1S1209 06209 indwięcej podobnych podstron