You should really read man page of cron(tab). Variables are defined inside
the file scope, they are not global.

--
Eero

2015-10-22 22:52 GMT+03:00 Diego Gomes <[email protected]>:

> # cat /etc/crontab
> SHELL=/bin/bash
> PATH=/sbin:/bin:/usr/sbin:/usr/bin
> MAILTO=root
> HOME=/
>
> already have!
>
> what is inside of cron.d does not respect the PATH from /etc/crontab
>
> I created a link for openvassd:
>
> # pwd
> /usr/bin
>
> # ls -la |grep open
> lrwxrwxrwx.   1 root root          6 Oct 19 01:21 open -> openvt
> -rwxr-xr-x.   1 root root     508680 Jun 29 09:48 openssl
> -rwx------    1 root root      33974 Jun  3 20:48 openvas-check-setup
> lrwxrwxrwx    1 root root         12 Oct 19 14:20 openvas-cli ->
> /usr/bin/omp
> -rwxr-xr-x    1 root root      20112 Oct 10 17:38 openvas-nasl
> -rwxr-xr-x    1 root root      11440 Oct 10 17:38 openvas-nasl-lint
> lrwxrwxrwx    1 root root         19 Oct 22 16:15 openvassd ->
> /usr/sbin/openvassd
> -rwx------    1 root root       4530 Jun  3 20:48 openvas-setup
> -rwxr-xr-x.   1 root root      19928 Mar  6  2015 openvt
>
> if I really need to insert the PATH again in the file here below:
>
> # cat openvas-sync-cert
> # start plugin sync daily at 130am
> 30 1 * * * root /usr/sbin/openvas-certdata-sync
>
> It was created by OpenVAS, so I understand that OpenVAS should be give me
> with this (if is really necessary, sure)
>
> Diego
>
> ------------------------------
> Date: Thu, 22 Oct 2015 22:39:59 +0300
>
> Subject: Re: [Openvas-discuss] Cron Jobs
> From: [email protected]
> To: [email protected]
> CC: [email protected]
>
> Well. just edit that crontab file and add
>
> PATH=/sbin:/bin:/usr/sbin:/usr/bin
>
> in top of that file.
>
> --
> Eero
>
> 2015-10-22 22:17 GMT+03:00 Diego Gomes <[email protected]>:
>
> I created a script to check for PATH over crontab, so:
>
> create a line inside /etc/crontab with this below:
> #!/bin/bash
> echo $PATH
> which openvassd
>
> the result is:
> /sbin:/bin:/usr/sbin:/usr/bin (ok, My /etc/crontad PATH)
> /sbin/openvassd
>
>
> The same script inside the /etc/crond.d/teste:
>
>
> /usr/bin:/bin
> /usr/bin/openvassd
>
>
> idea?
>
>
>
> ------------------------------
> Date: Thu, 22 Oct 2015 20:59:29 +0300
>
> Subject: Re: [Openvas-discuss] Cron Jobs
> From: [email protected]
> To: [email protected]
> CC: [email protected]
>
> Well. You need to add openvassd, openvasmd, gsad paths to global PATH
> variable or that specific crontab file.
>
> It's a bit hard to believe that it was broken after install. I have
> installed very many openvas installation from atomic repo and they all
> works fine.. without modifications.
>
> --
> Eero
>
> 2015-10-22 20:54 GMT+03:00 Diego Gomes <[email protected]>:
>
> No changes in crontab:
>
>  - Crontab was the same since fresh install. No changes
>
> Diego
>
> ------------------------------
> Date: Thu, 22 Oct 2015 20:50:34 +0300
> Subject: Re: [Openvas-discuss] Cron Jobs
> From: [email protected]
> To: [email protected]
> CC: [email protected]
>
> Did you modify PATH variable in crontab? Atomic packages should work
> without any modifications..
>
> If you modified PATH variable in crontab, remove that line from crontab...
>
> --
> Eero
>
> 2015-10-22 20:41 GMT+03:00 Diego Gomes <[email protected]>:
>
> Reindl,
>
> You seem a good guy, but you should have more patient! Look, you are not
> forced to help anyone, agree with that?
>
> Now, follow what you asked me: (and I sent many informations in other
> email before, you should take a look over there!)
>
>  - CentOS 7 64 bits (fresh install)
>  - Installed using atomic (yum)
>  - Crontab was the same since fresh install. No changes
>  - I said that it works over CLI, but for crontab I receive that message I
> showed in my first email in this discussion
>
> At the end of the day, I just would like to guarantee that OpenVAS is
> really receiving/doing the correct updates.
>
> I appreciate your help!
>
> Thanks,
>
> Diego
>
> ----------------------------
>
> To: [email protected]
> From: [email protected]
> Date: Thu, 22 Oct 2015 18:42:11 +0200
>
> Subject: Re: [Openvas-discuss] Cron Jobs
>
>
> Am 22.10.2015 um 18:28 schrieb Diego Gomes:
> > yes, just for crontab. take a look in my last email.
> >
> > Here my Crontab:
> >
> > # cat /etc/crontab
> > SHELL=/bin/bash
> > PATH=/sbin:/bin:/usr/sbin:/usr/bin
> > MAILTO=root
> > HOME=/
>
> after you changed it or before?
> doe sit work now?
>
> you really make it hard to help you providing no informations - for the
> sake of god on what operating system is your openvas installed and how
> did you install it?
>
> > To: [email protected]
> > From: [email protected]
> > Date: Thu, 22 Oct 2015 18:22:31 +0200
> > Subject: Re: [Openvas-discuss] Cron Jobs
> >
> >
> >
> > Am 22.10.2015 um 18:21 schrieb Reindl Harald:
> >>
> >>
> >> Am 22.10.2015 um 18:06 schrieb Diego Gomes:
> >>> Did you already see anything like this?
> >>>
> >>> Cron Job:
> >>> /usr/sbin/openvas-certdata-sync
> >>>
> >>> which: no openvassd in (/usr/bin:/bin)
> >>>
> >>> [e] Error: openvassd is not in the path, could not determine SCAP
> >>> directory.
> >>>
> >>> Any idea about it?
> >>
> >> what operating system?
> >> what environment?
> >> why is /usr/sbin and/or /sbin not in the PATH?
> >>
> >> [root@openvas:~]$ which openvassd
> >> /usr/sbin/openvassd
> >>
> >> [root@openvas:~]$ echo $PATH
> >> /usr/local/bin:/usr/bin:/usr/sbin:/scripts
> >
> > if that's *only* for conjobs just fix your crontab
> >
> > [root@openvas:~]$ cat /etc/crontab
> > SHELL=/usr/bin/bash
> > PATH=/usr/bin:/usr/sbin
> > LANG=en_GB.UTF-8
> > MAILTO=root
> > HOME=/
> >
> >
> >
> > _______________________________________________ Openvas-discuss mailing
> > list [email protected]
> > https://lists.wald.intevation.org/cgi-bin/mailman/listinfo/openvas-discuss
>
> --
>
> Reindl Harald
> the lounge interactive design GmbH
> A-1060 Vienna, Hofmühlgasse 17
> CTO / CISO / Software-Development
> m: +43 (676) 40 221 40, p: +43 (1) 595 3999 33
> icq: 154546673, http://www.thelounge.net/
>
> http://www.thelounge.net/signature.asc.what.htm
>
>
> _______________________________________________ Openvas-discuss mailing
> list [email protected]
> https://lists.wald.intevation.org/cgi-bin/mailman/listinfo/openvas-discuss
>
> _______________________________________________
> Openvas-discuss mailing list
> [email protected]
> https://lists.wald.intevation.org/cgi-bin/mailman/listinfo/openvas-discuss
>
>
>
>
>
_______________________________________________
Openvas-discuss mailing list
[email protected]
https://lists.wald.intevation.org/cgi-bin/mailman/listinfo/openvas-discuss

Reply via email to