forked from poz/sudo-parental-control
Compare commits
3 commits
de545c9e4f
...
7691162b95
Author | SHA1 | Date | |
---|---|---|---|
|
7691162b95 | ||
|
bf45fc550f | ||
|
1685eb1d54 |
6 changed files with 48 additions and 0 deletions
33
README.md
Normal file
33
README.md
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
# Sudo Parental Control
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
Sudo Parental Control is a project aimed at implementing a system where children can use the `sudo` command, which then sends the request to a server for parental approval. This system allows parents to monitor and control the commands executed by their children on a shared server environment.
|
||||||
|
|
||||||
|
## Features
|
||||||
|
- Child users can use the `sudo` command with restrictions.
|
||||||
|
- Requests made by children are sent to a server for parental approval.
|
||||||
|
- Parents can monitor and approve/reject commands executed by their children.
|
||||||
|
- Detailed logs and activity tracking for better monitoring.
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
1. Clone the repository: `git clone https://github.com/your-username/sudo-parental-control.git`
|
||||||
|
2. Install dependencies: `npm install`
|
||||||
|
3. Configure the server and client settings.
|
||||||
|
4. Run the application: `npm start`
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
1. Child users can use the `sudo` command followed by the desired command.
|
||||||
|
2. The request is sent to the server for parental approval.
|
||||||
|
3. Parents can approve or reject the command through the provided interface.
|
||||||
|
4. Logs and activity can be viewed for monitoring purposes.
|
||||||
|
|
||||||
|
## Contributing
|
||||||
|
We welcome contributions to improve and enhance the Sudo Parental Control project. Feel free to fork the repository and submit pull requests with your changes.
|
||||||
|
|
||||||
|
## License
|
||||||
|
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
||||||
|
|
||||||
|
## Contact
|
||||||
|
For any questions or feedback, please contact us at [email@example.com](mailto:email@example.com).
|
||||||
|
|
||||||
|
Thank you for considering Sudo Parental Control for your parental monitoring needs. We hope this project helps in creating a safer and controlled environment for your children's online activities.
|
15
client/sudo
Executable file
15
client/sudo
Executable file
|
@ -0,0 +1,15 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
url="https://sudo-parental-control.jacekpoz.pl"
|
||||||
|
|
||||||
|
json=$(echo '{"username":"'$USER'","command":"'$@'"}')
|
||||||
|
r=$(curl -s -X POST $url --data "$json")
|
||||||
|
|
||||||
|
if [ "$r" = "ok" ]; then
|
||||||
|
echo "Parental control approves the request"
|
||||||
|
sudo $@
|
||||||
|
else
|
||||||
|
echo "Parental control prohibits the usage of sudo"
|
||||||
|
echo "Reason: $r"
|
||||||
|
fi
|
||||||
|
|
0
Cargo.lock → server/Cargo.lock
generated
0
Cargo.lock → server/Cargo.lock
generated
Loading…
Reference in a new issue