Linux 16 - Local Security Principles on Linux

By Sheldon L Published at 2020-05-01 Updated at 2020-05-01


User Accounts

Understanding the root Account

Operations Not Requiring root Privileges

Operations that do not require Root privilege Examples of this operation
Running a network client Sharing a file over the network
Using devices such as printers Printing over the network
Operations on files that the user has proper permissions to access Accessing files that you have access to or sharing data over the network
Running SUID-root applications Executing programs such as passwd

Comparing sudo and su

su sudo
When elevating privilege, you need to enter the root password. Giving the root password to a normal user should never, ever be done. When elevating privilege, you need to enter the user’s password and not the root password.
Once a user elevates to the root account using su, the user can do anything that the root user can do for as long as the user wants, without being asked again for a password. Offers more features and is considered more secure and more configurable. Exactly what the user is allowed to do can be precisely controlled and limited. By default the user will either always have to keep giving their password to do further operations with sudo, or can avoid doing so for a configurable time interval.
The command has limited logging features. The command has detailed logging features.

sudo

sudo whoami
cat /var/log/auth.log | grep whoami
# Dec 8 14:20:47 server1 sudo: op : TTY=pts/6 PWD=/var/log USER=root COMMAND=/usr/bin/whoami

Process Isolation

Hardware Device Access

Keeping Current

Working with passwords

How Passwords Are Stored

Password Algorithm

echo -n string | sha512sum

Good Password Practices

chage --list [user]
sudo chage -E 2014-31-12 [user]