Birmingham mumbai



Download 15,21 Mb.
Pdf ko'rish
bet75/482
Sana13.01.2022
Hajmi15,21 Mb.
#355107
1   ...   71   72   73   74   75   76   77   78   ...   482
Bog'liq
Mastering Ubuntu Server Gain expertise in the art of deploying, configuring, managing, and troubleshooting Ubuntu Server by Jay LaCroix (z-lib.org)

[
 48 
]
Using /etc/passwd
First, let's go over the 
/etc/passwd
 file. What follows is some example output from 
this file on my test server. For brevity, I have limited the output to the last eight lines:
Figure 2.5: Example /etc/passwd file
Each line within this file corresponds to a user account on the system. Entries are split 
into columns, separated by a colon (
:
). The username is in the first column, so you can 
see that I've created users 
jay
 and 
jdoe
. The next column on each is simply an 
x
. I'll go 
over what that means a bit later. For now, let's skip to the third and fourth columns, 
which reference the UID and GID respectively. On a Linux system, user accounts and 
groups are actually referenced by their IDs. While it's easier for you and I to manage 
users by their names, usernames and group names are nothing more than a label 
placed on the UID and GID in order to help us identify them easier. 
For example, it may be frustrating to try to remember that 
jdoe
 is UID 
1001
 on our 
server each time we want to manage this account. Managing it by referring to the 
account as 
jdoe
 is easier for humans, since we don't remember numbers as well as 
we do names. But to Linux, each time we reference user 
jdoe
, we're actually just 
referencing UID 
1001
. When a user is created, the system (by default) automatically 
assigns the next available UID to the account. If you manage multiple Ubuntu 
servers, note that the UIDs will not match from one system to another, so keep in 
mind that UIDs don't synchronize between installations.
In my case (as shown in 
Figure 2.5
), the UID of each user is the same as their GID. 
This is just a coincidence on my system and it isn't always that way in practice. While 
I'll discuss creating groups later in this chapter, understand that creating groups 
works in a similar way to creating users, in the sense that the group is assigned the 
next available GID in much the same way as new user accounts are assigned the 
next available UID. When you create a user, the user's primary group is the same as 
their username (unless you request otherwise). For example, when I created 
jdoe
, the 
system also automatically created a 
jdoe
 group as well. 


Chapter 2

Download 15,21 Mb.

Do'stlaringiz bilan baham:
1   ...   71   72   73   74   75   76   77   78   ...   482




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

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish