Objective:
Define the privileges of each user of the Info360 project and configure the log (logs) of actions taken with administrator permissions.
Privileges per user:
Here’s how the privileges were assigned to each user:
User | sudo access | Description |
---|---|---|
super | Yeah | You can run any command with sudo |
major | No (full access without sudo) | Can run commands as root without prompting for password (set to sudoers) |
brayan | Yeah | Has sudo permissions as a student |
alex | Yeah | Has sudo permissions as a student |
angel | Yeah | Has sudo permissions as a student |
operator | No | I don’t have sudo permissions |
technician | No | I don’t have sudo permissions |
Enabling Privilege Usage Logs:
Linux operating systems (Ubuntu, CentOS) already have command activity logging enabled by default with sudo.
The log files are:
– Ubuntu/Debian: /var/log/auth.log
– CentOS/RHEL: /var/log/secure
To see which commands have been executed with sudo you can do:
grep sudo /var/log/auth.log
the
journalctl | grep sudo
Configuration in sudoers file:
So that the senior user can run commands without needing to put sudo or a password, this line has been added to the end of the /etc/sudoers file:
major ALL=(ALL) NOPASSWD: ALL
This line has been safely added with the visudo tool to avoid syntax errors.