Birmingham mumbai



Download 15,21 Mb.
Pdf ko'rish
bet82/482
Sana13.01.2022
Hajmi15,21 Mb.
#355107
1   ...   78   79   80   81   82   83   84   85   ...   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)

[
 55 
]
Switching users
Now that we have several users on our system, we need to know how to switch 
between them. Of course, you can always just log in to the server as one of the users, 
but you can actually switch to any user account at any time, provided you either 
know that user's password or have 
sudo
 access.
The command you will use to switch from one user to another is the 
su
 command. 
If you enter 
su
 with no options, it will assume that you want to switch to 
root
 and 
will ask you for your 
root
 password. As I mentioned earlier, Ubuntu locks the 
root
 
account by default, so at this point you may not have a 
root
 password.
Unlocking the 
root
 account is actually really simple; all you have to do is create a 
root
 password. To do that, you can execute the following command as any user with 
sudo
 access:
sudo passwd
The command will ask you to create and confirm your 
root
 password. From this 
point on, you will be able to use the 
root
 account as any other account. You can log 
in as 
root
, switch to 
root
—it's fully available now. You really don't have to unlock 
the 
root
 account in order to use it. You certainly can, but there are other ways to 
switch to 
root
 without unlocking it, and it's typically better to leave the 
root
 account 
locked unless you have a very specific reason to unlock it. The following command 
will allow you to switch to 
root
 from a user account that has 
sudo
 access:
sudo su - 
Now you'll be logged in as 
root
 and will be able to execute any command you want 
with no restrictions whatsoever. To return to your previous logged-in account, 
simply type 
exit
. You can tell which user you're logged in as by the value at the 
beginning of your 
bash
 prompt. What if you want to switch to an account other than 
root
? Of course, you can simply log out and then log in as that user. But you really 
don't have to do that. The following command will do the job, providing you know 
the password for the account:
su -
Even though Ubuntu doesn't create a password for 
root
 by 
default, some 

Download 15,21 Mb.

Do'stlaringiz bilan baham:
1   ...   78   79   80   81   82   83   84   85   ...   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