You are not logged in.
i did the following:
#!/bin/bash
pacman -Syu | tee -a /update.log
and i set it with permissions of 4755 and it runs but says not permitted unless root but it should since i gave it SUID bit. i want it to run each morning and just grab all the updates available.
i did this and installed it in my crontab but maybe if i put it into the root crontab?
Last edited by archlinux2011 (2011-08-10 13:58:16)
Offline
Unattended upgrades are strongly discouraged, but if you must, use sudo. Also, pacman already has a log.
Offline
im using this to test writing scripts since i dont know of anything else useful. also where should i put them? should i create a /bin in my home directory?
Last edited by archlinux2011 (2011-08-10 13:26:29)
Offline
@archlinux2011: For security reasons linux ignores the SUID-Bit on scripts.
Offline
How often will you read the log?
Offline
i was using the log to test things. i rewrote it to be this:
#!/bin/bash
date >> /home/<username>/dateout.log
again just to test things and its in crontab as
*/*5 8 * * * /home/<username>/bin/dateout.sh
and it doesnt seem to work.
this is to get used to writing scripts and becoming familiar with cron so its nothing useful just a small test.
Offline
this is to get used to writing scripts and becoming familiar with cron so its nothing useful just a small test.
I think you should pick another title for this thread.
Offline
archlinux2011 wrote:this is to get used to writing scripts and becoming familiar with cron so its nothing useful just a small test.
I think you should pick another title for this thread.
changed it
Offline
i was using the log to test things. i rewrote it to be this:
#!/bin/bash date >> /home/<username>/dateout.log
again just to test things and its in crontab as
*/*5 8 * * * /home/<username>/bin/dateout.sh
and it doesnt seem to work.
this is to get used to writing scripts and becoming familiar with cron so its nothing useful just a small test.
I think you crontab should say
*/5 8 * * * /home/<username>/bin/dateout.sh
That'll run every 5 minutes from 8:00 - 8:55, if that's what you were going for.
Offline
Read again lunar's post. Is this a user cron job, or a system cron job. If I missed that, I'm sorry -- I'm hurrying off to a meeting.
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline