Super User Privileges from CompTIA Linux+ (XK0-004) | Best of ITProTV

ITPro
ITPro
1.2 هزار بار بازدید - 4 سال پیش - In this episode, Zach and
In this episode, Zach and Don discuss the best practices that should be used when applying administrative access. They then demonstrate how the su, sudo and sudoedit commands can be used to temporarily assume administrative access to prevent inadvertently using admin accounts for routine access.

Super User Privileges
#### [?] When do we need super user privileges?
System-wide changes
Changes that affect other users
Configuring some services
#### [?] What is the easiest way to access super user privileges?
su
Substitute user
su -
Switch to root
- loads normal environment
su -
Switch to user
#### [?] What if I just want to perform a single command?
sudo
Executes command as root
Password cached for five minutes by default
#### [?] Who is allowed to use the sudo command?
User must be authorized to run sudo
In some distros (like Ubuntu) simply add 'sudo' group as a secondary group
In others (like Red Hat) you must create your own group and add it to /etc/sudoers
visudo =
dpezet ALL=(ALL)
#### [?] What would it look like if we only wanted to grant access to a few commands?
%techsupport localhost=/sbin/mount /mnt/cdrom, /sbin/umount /mnt/cdrom
#### [?] Are there any shortcuts or aliases to help with all this?
sudoedit
Useful when editing a single write-protected file
sudoedit /etc/hosts

#Comptia #Linux #SuperUser
4 سال پیش در تاریخ 1399/01/05 منتشر شده است.
1,290 بـار بازدید شده
... بیشتر