sudo without password to write to file that need root right
It is necessary that sometimes you need to write the data to the root files with "sudo" and "password". But if you need to set auto-run scripts, then it is a problem to enter the password. Here is the way how you do it in Linux system.
Change the owner of the file defaultly with root right to the username and group who you are used to write the data:
sudo chown -R username:group /path/to/root/directory
That is all, pretty simple. Then you can set a cronjob to write and modify the directory now.
Comments
Post a Comment