Birmingham mumbai



Download 15,21 Mb.
Pdf ko'rish
bet74/482
Sana13.01.2022
Hajmi15,21 Mb.
#355107
1   ...   70   71   72   73   74   75   76   77   ...   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)

[
 47 
]
It probably goes without saying, but the 
rm
 command can be extremely dangerous. 
If you're logged in as 
root
 or using 
sudo
 while using 
rm
, you can easily destroy 
your entire installed system if you're not careful. 
DO NOT run this command
, but as 
a hypothetical example, the following command (while seemingly innocent at first 
glance) will likely completely destroy your entire filesystem:
sudo rm -r / home/dscully
At this point, we understand how to add and remove users. In the next section, we'll 
look deeper into passwords. 
Understanding the /etc/passwd and /etc/
shadow files
Now that we know how to create (and delete) user accounts on our server, we 
are well on our way to being able to manage our users. But where exactly is this 
information stored? We know that users store their personal files in 
/home
, but is 
there some kind of database somewhere that keeps track of which user accounts are 
on our system? Actually, user account information is stored in two special text files:
• 
/etc/passwd
• 
/etc/shadow
You can display the contents of each of those two files with the following commands. 
Note that any user can look at the contents of 
/etc/passwd
, while only 
root
 has 
access to 
/etc/shadow
:
cat /etc/passwd 
sudo cat /etc/shadow
Go ahead and take a look at these two files (just don't make any changes), and I will 
help you understand them.
Notice the typo: I accidentally typed a space after the first forward 
slash. I literally accidentally told my system to remove the contents 
of the entire filesystem. If that command was executed, the server 
probably wouldn't even boot the next time we attempted to start it. 
All user and program data would be wiped out. If there was ever 
any single reason for us to be protective over the 
root
 account, the 
rm
 command is certainly it!


Managing Users and Permissions

Download 15,21 Mb.

Do'stlaringiz bilan baham:
1   ...   70   71   72   73   74   75   76   77   ...   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