![]() depending on your use case, you may want Write a simple C program, smartctl_wrapper.c, that simply runs the script or program you need, like this: #include Or even less, if you set up a public key with a forced command as mentioned later. The main advantage of this is that if someone steals your laptop, they can run smartctl -a /dev/sda as root, but otherwise only has your user privileges. Setuid executables are run as root, no matter which user executes them. For somewhat less of a security nightmare than putting the root password in a script, you can use a setuid executable.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |