En Mon, Aug 20, 2001 at 04:30:13PM +0800, Raymund dos Remedios escribio:
#_
#_ Now, I'm lost. While sync can be run by anybody, why would you want to do
#_ that? I am assuming that the crontab mentioned is the root crontab? And if
#_ it was not a root crontab, I don't know that it would be a good idea to
#_ simply allow a user to define "root" to fire up a system daemon that should
#_ only really be run by a root user simply by prepending "root" to the command?
#_ Could I do a * * * * * root passwd .... type of deal? I guess as I've often
#_ done in the past, I may have missed the boat, err ... the point. My
#_ apologies again if that is the case. :-)
That sync is in /etc/crontab because I am the "sysad" of my own box. However
some people do not have root privs, but the developers of sync has given
them access to it.
Any normal user can have his/her own crontab to schedule any program or
shell script he has permission to, specially one he wrote himself. Just run
"crontab -u user" man crontab(1) for more details. crontab(5) for the format
of the crontab file.
#_ P.S. I made a simple test. I did a * * * * * root /sbin/sync and my mailbox
#_ automagically filled up with "Cron <root@...> /bin/sync". Opening up the
#_ e-mail, it said "/bin/sh: root: command not found". Go figure ;->
I think because it should be /bin/sh, or sometimes /bin/bash. Check out some
shell scripts, they have the shebang in it... #!/bin/bash or #!/bin/sh.
--
Juan Miguel Cacho [EMAIL PROTECTED]
Philippines
...the poor count their blessings, the affluent count their calories.
_
Philippine Linux Users Group. Web site and archives at http://plug.linux.org.ph
To leave: send "unsubscribe" in the body to [EMAIL PROTECTED]
To subscribe to the Linux Newbies' List: send "subscribe" in the body to
[EMAIL PROTECTED]