Birmingham mumbai



Download 15,21 Mb.
Pdf ko'rish
bet98/482
Sana13.01.2022
Hajmi15,21 Mb.
#355107
1   ...   94   95   96   97   98   99   100   101   ...   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)

[
 66 
]
By default, members of the 
sudo
 group are able to use 
sudo
 without any restrictions. 
Basically, members of this group can do anything 
root
 can do (which is everything). 
During installation, the user account you created was made a member of 
sudo
. To 
give additional users access to 
sudo
, all you would need to do is add them to the 
sudo
 group:
sudo usermod -aG sudo
But again, that gives those users access to everything, and that may or may not 
be what you want. To actually configure 
sudo
, we use the 
visudo
 command. This 
command assists you with editing 
/etc/sudoers
, which is the configuration file 
that governs 
sudo
 access. Although you can edit 
/etc/sudoers
 yourself with a text 
editor, configuring 
sudo
 in that way is strongly discouraged. The 
visudo
 command 
checks to make sure your changes follow the correct syntax and helps prevent you 
from accidentally destroying the file. This is a very good approach, because if you 
did make any errors in the 
/etc/sudoers
 file, you may wind up in a situation where 
no one is able to gain administrative control over the server. And while there are 
ways to recover from such a mistake, it's certainly not a very pleasant situation to 
find yourself in! So, the takeaway here is never to edit the 
/etc/sudoers
 file directly; 
always use 
visudo
 to do so.
Here's an example of the type of warning the 
visudo
 command shows when you 
make a mistake:
Figure 2.13: The visudo command showing an error
If you do see this error, press 
e
 to return to edit the file, and then correct the mistake.
The way this works is when you run 
visudo
 from your shell, you are brought into a 
text editor with the 
/etc/sudoers
 file opened up. You can then make changes to the 
file and save it like you would any other text file. By default, Ubuntu opens up the 
nano
 text editor when you use 
visudo
. With 
nano
, you can save changes using 
Ctrl
 + 
w
, and you can exit the text editor with 
Ctrl
 + 
x
.
Not all distributions utilize the 
sudo
 group by default, or even 
automatically install 
sudo
. Other distributions require you to 
install 
sudo
 manually and may use another group (such as 
wheel

to govern access to 
sudo
.


Chapter 2

Download 15,21 Mb.

Do'stlaringiz bilan baham:
1   ...   94   95   96   97   98   99   100   101   ...   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