How to protect root user from root privileged custom user?
I have created a user named as <username> in my local network server and prevented all root access and password login to the server instead i use SSH authentication. I would like to know how to protect root user by validation with password if access a file belongs to root. Lets say an example,
I have updated OS by `sudo apt-get update` and first time it asks for the password. Image - Asking for the password for the first time. Image - https:/
Second time i ran any command (e.g. `sudo ls -la /root`) in which the files or permissions all belongs to root user / other root privileged user rather than me. But this time, the command runs without asking for password because session of terminal was not closed. Image - https:/
My concern is how can i validate all actions (terminal commands) by a user with a password if permissions belongs to root user?.
Example validation message "Those files belongs to root user, are you sure wish to continue the operation?". Image - https:/
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- Ubuntu Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Rinshan Kolayil for more information if necessary.