Wednesday, March 21, 2018
ເພີ່ມ user ໃນ Cent OS
login ເຂົ້າໃນເຄື່ອງທີ່ຕ້ອງການແອດດ້ວຍສິດ root
# adduser username
ຕັ້ງລະຫັດຜ່ານ
# passwd username
ຈະຟ້ອງຂຶ້ນມາໃຫ້ໃສ່ລະຫັດ ໃສ່ໃຫ້ຄືກັນທັງສອງເທື່ອ
Changing password for user username.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.
ແອດໃສ່ໃນກຸ່ມ wheel, ຄ່າເລີ່ມຕົ້ນໃນ CentOS, ສະມາຊິກທີ່ຢູ່ໃນ wheel group ຈະມີ sudo privileges.
usermod -aG wheel username
ທົດລອງດ້ວຍການລອງລ໋ອກອິນຜ່ານ ຍູສເຊີ້ ທີ່ສ້າງຂື້ນໃຫມ່
su - username
ຫລັງຈາກນັ້ນກໍ່ລອງຄຳສັ່ງປະເພດທີ່ຕ້ອງການສິດ root
[root@Prime01 ~]# su - smsc
[smsc@Prime01 ~]$ ls /root
ls: cannot open directory /root: Permission denied
[smsc@Prime01 ~]$ sudo ls /root
We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:
#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.
[sudo] password for smsc:
anaconda-ks.cfg
[smsc@Prime01 ~]$ exit
logout
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment