In the project, a hierarchy of operating system users is implemented. The users are divided into four levels with different access rights:
- Has unrestricted access to the system.
- Created during the initial system setup.
- Cannot be deleted.
- Manages the rights of users in lower classes.
- Has limited privileges compared to root.
- Can change the rights of lower class users.
- Has no permission to modify users or their roles.
The project provides a set of commands for user and list management, as well as system administration. Below are the main commands that can be used in various administrative areas:
- 'userlist' — displays all users.
- 'create' — creates a new user and password.
- 'delete' — deletes a user.
- 'rename' — renames a user.
- 'repass' — changes the user's password.
- 'rerole' — changes the user's role.
- 'createlist' — creates a new user list.
- 'deletelist' — deletes a user list.
- 'accesslist' — allows a user to access an existing list.
- 'movelist' — allows a user with the appropriate permissions to move a list.
- 'editlist' — allows a user with the appropriate permissions to edit a list.
- 'showlist' — displays all available lists in the system.
- 'changeuser' — switches the user.
- 'exit' — exits the program.
- 'reboot' — restarts the system.
Each command that modifies the system requires a check of the current user's permissions, which is taken into account in the program logic.
Depending on the current user's access level, certain actions are permitted. To verify permissions, the system prompts for the current user's password with every change.