Re: Faire un crontab pour un simple user...
Le Tue, 16 Sep 2008 21:18:51 +0200,
François Boisson <user.anti-spam@maison.homelinux.net> a écrit :
> Le Tue, 16 Sep 2008 21:08:24 +0200
> David BERCOT <debian@bercot.org> a écrit:
>
> > Bonjour,
> >
> > Dans un script lancé en tant que root, je souhaiterais créer une
> > tâche pour un utilisateur lambda.
> >
> > J'ai tenté un truc du genre (dans mon script) :
> > su mon_user
> > crontab -l > fichier_crontab
> > echo "40 20 * * * /home/mon_user/script" >> fichier_crontab
> > crontab fichier_crontab
> > rm fichier_crontab
> > exit
> >
> > Mais en fait, ça me rajoute la tâche au niveau du root et le 'exit'
> > ne fait pas ce que je veux (ça, c'est moins gênant ;-))) !!!
> >
> crontab -u toto ...
> fait les manipûlations pour l'utilisateur toto.
Hum, je n'ai pas bien lu l'aide alors ;-)
Merci beaucoup !
David.
Reply to: