2.4 Given a scenario, configure and execute remote connectivity for system management Flashcards
Command: su
Substitute User, allows switching accounts to run commands as a user, i.e. root
Syntax: su -[user]
Command: sudo
allows user to execute commands using elevated privileges assigned by system admin
Syntax: sudo [….command]
What is the best security practice regarding the su and sudo commands?
Instead of allowing admins to use the su command, use the sudo structure to assign specific rights to specific admins
What file contains the admin rights assigned to specific users?
/etc/sudoers
What is visudo used for?
To edit the /etc/sudoers file and assign admin permissions to users
What switch is used with visudo to check the file?
-c checks for syntax errors before saving
What switch is used with visudo to specify a file location, other than default location /etc/sudoers?
-f
What switch for visudo can be used to also check for errors, such as non-existent users/groups?
-s checks file in strict mode
What switch for visudo outputs the file in JSON format?
-x
Command: pkexec
an alternate to sudo, allowing the command to execute with elevated privileges
Syntax: pkexec [command]
Why should sudo be used instead of pkexec?
sudo is more flexible and has better security than pkexec