Linux Server Configuration


Chapter 5: Managing User Accounts


Download 493.5 Kb.
bet22/48
Sana16.06.2023
Hajmi493.5 Kb.
#1495871
1   ...   18   19   20   21   22   23   24   25   ...   48
Bog'liq
0501-linux-server-configuration

Chapter 5: Managing User Accounts


5.1 What is an Account?


When a computer is used by many people it is usually necessary to differentiate between the users, for example, so that their private files can be kept private. This is important even if the computer can only be use by a single person at a time, as with most microcomputers. Thus, each user is given a unique username, and that name is used to log in. There's more to a user than just a name, however. An account is all the files, resources, and information belonging to one user. The term hints at banks, and in a commercial system each account usually has some money attached to it, and that money vanishes at different speeds depending on how much the user stresses the system. For example, disk space might have a price per megabyte and day, and processing time might have a price per second


5.2 Creating User Account: adduser


To create a user account, you use the adduser command, which has the form:


# adduser userid


where userid specifies the name of the user account that you want to create. The command prompts you for the information needed to create the account.


Here's a typical example of using the command, which creates a user account named newbie:


# adduser newbie


Adding user newbie...
Adding new group newbie (1001).
Adding new user newbie (1001) with group newbie.
Creating home directory /home/newbie.
Copying files from /etc/skel
Changing password for newbie
Enter the new password (minimum of 5, maximum of 8 characters)
Please use a combination of upper and lower case letters and numbers.
Re-enter new password:
Password changed.
Changing the user information for newbie
Enter the new value, or press return for the default
Full Name []: Newbie Dewbie
Room Number []:
Work Phone []:
Home Phone []:
Other []:
Is the information correct? [y/n]
y
#
Notice that the lines where the password was typed were overwritten by the subsequent lines. Moreover, for security, passwords are not echoed to the console as they are typed. Notice also that several of the information fields were omitted - for example, Room Number. You can specify such information if you think it may be useful, but the system makes no use of the information and doesn't require you to provide it. The similarly named useradd command also creates a user account, but does not prompt you for the password or other information.


Download 493.5 Kb.

Do'stlaringiz bilan baham:
1   ...   18   19   20   21   22   23   24   25   ...   48




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling