In my organization, we want to implement a user management standard after an utter chaos. Where we(organization) and the client was able to access root user and they made changes which took down the server. However, the blame came on us for playing with the configuration files.
To resolve any issues in the future we have designed a model and it would be helpful to get inputs whether it's best practice or not.
Step 1 - Root user and non-root users with sudo access
We want to have users in the following fashion -
- Root user -> Either disabled to log in through SSh for security purpose or access only through SSH key and paraphrase. Root account will be only accessible by one member from my team.
- Two non-root users -> One for my team and other for the client.
Step 2 - Non-root users with limited access to the services
These will be individual users having access to only one service.
- Complete access to server - Apache or Nginx
- Complete access to MySQL
We can have more users to handle different services. And no other user can access a different service, except for the allotted service.
Step 3 - Auditing each user's commands in a log file
- We want to run a cronjob which logs each and every command executed on the server by any user.
- We need this to identify who made the changes and when.
For auditing I looked for few solutions and most of them involved to start a command, like script, before starting your work. I want something to run at all the times without any manual intervention. Even when the server reboots.
Please let me know if this is something which we can do or is there any better approach to manage them.